keyfile/tests: rename internal test-only function to have nmtst prefix

We have some interal code that is only used to expose functionality for
the tests. Those functions should be easily distinguishable from code
that is used by the "real" code. Give a "nmtst" prefix. Rename
nms_keyfile_writer_test_connection() to nmtst_keyfile_writer_test_connection().
This commit is contained in:
Thomas Haller 2023-06-15 18:20:18 +02:00
parent c6b5dc2552
commit e5a6e16ce0
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728
3 changed files with 24 additions and 24 deletions

View file

@ -458,14 +458,14 @@ nms_keyfile_writer_connection(NMConnection *connection,
}
gboolean
nms_keyfile_writer_test_connection(NMConnection *connection,
const char *keyfile_dir,
uid_t owner_uid,
pid_t owner_grp,
char **out_path,
NMConnection **out_reread,
gboolean *out_reread_same,
GError **error)
nmtst_keyfile_writer_test_connection(NMConnection *connection,
const char *keyfile_dir,
uid_t owner_uid,
pid_t owner_grp,
char **out_path,
NMConnection **out_reread,
gboolean *out_reread_same,
GError **error)
{
return _internal_write_connection(connection,
FALSE,

View file

@ -30,13 +30,13 @@ gboolean nms_keyfile_writer_connection(NMConnection *connectio
gboolean *out_reread_same,
GError **error);
gboolean nms_keyfile_writer_test_connection(NMConnection *connection,
const char *keyfile_dir,
uid_t owner_uid,
pid_t owner_grp,
char **out_path,
NMConnection **out_reread,
gboolean *out_reread_same,
GError **error);
gboolean nmtst_keyfile_writer_test_connection(NMConnection *connection,
const char *keyfile_dir,
uid_t owner_uid,
pid_t owner_grp,
char **out_path,
NMConnection **out_reread,
gboolean *out_reread_same,
GError **error);
#endif /* __NMS_KEYFILE_WRITER_H__ */

View file

@ -138,14 +138,14 @@ write_test_connection_reread(NMConnection *connection,
connection_normalized = nmtst_connection_duplicate_and_normalize(connection);
success = nms_keyfile_writer_test_connection(connection_normalized,
TEST_SCRATCH_DIR,
owner_uid,
owner_grp,
testfile,
out_reread,
out_reread_same,
p_error);
success = nmtst_keyfile_writer_test_connection(connection_normalized,
TEST_SCRATCH_DIR,
owner_uid,
owner_grp,
testfile,
out_reread,
out_reread_same,
p_error);
g_assert_no_error(error);
g_assert(success);
g_assert(*testfile && (*testfile)[0]);