libnm: merge branch 'th/uuid-variant3-bgo740865'

https://bugzilla.gnome.org/show_bug.cgi?id=740865
This commit is contained in:
Thomas Haller 2014-12-04 17:02:53 +01:00
commit da8b201095
17 changed files with 311 additions and 35 deletions

View file

@ -526,6 +526,24 @@ _nm_connection_find_base_type_setting (NMConnection *connection)
return setting;
}
static gboolean
_normalize_connection_uuid (NMConnection *self)
{
NMSettingConnection *s_con = nm_connection_get_setting_connection (self);
char *uuid;
g_assert (s_con);
if (nm_setting_connection_get_uuid (s_con))
return FALSE;
uuid = nm_utils_uuid_generate ();
g_object_set (s_con, NM_SETTING_CONNECTION_UUID, uuid, NULL);
g_free (uuid);
return TRUE;
}
static gboolean
_normalize_connection_type (NMConnection *self)
{
@ -913,6 +931,7 @@ nm_connection_normalize (NMConnection *connection,
* We only do this, after verifying that the connection contains no un-normalizable
* errors, because in that case we rather fail without touching the settings. */
was_modified |= _normalize_connection_uuid (connection);
was_modified |= _normalize_connection_type (connection);
was_modified |= _normalize_connection_slave_type (connection);
was_modified |= _normalize_ip_config (connection, parameters);

View file

@ -117,6 +117,11 @@ char ** _nm_utils_strsplit_set (const char *str,
const char *delimiters,
int max_tokens);
#define NM_UTILS_UUID_TYPE_LEGACY 0
#define NM_UTILS_UUID_TYPE_VARIANT3 1
char *nm_utils_uuid_generate_from_string (const char *s, gssize slen, int uuid_type, gpointer type_args);
void _nm_dbus_errors_init (void);
extern gboolean _nm_utils_is_manager_process;

View file

@ -777,14 +777,7 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
return FALSE;
}
if (!priv->uuid) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_MISSING_PROPERTY,
_("property is missing"));
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_UUID);
return FALSE;
} else if (!nm_utils_is_uuid (priv->uuid)) {
if (priv->uuid && !nm_utils_is_uuid (priv->uuid)) {
g_set_error (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_INVALID_PROPERTY,
@ -908,6 +901,15 @@ verify (NMSetting *setting, NMConnection *connection, GError **error)
/* *** errors above here should be always fatal, below NORMALIZABLE_ERROR *** */
if (!priv->uuid) {
g_set_error_literal (error,
NM_CONNECTION_ERROR,
NM_CONNECTION_ERROR_MISSING_PROPERTY,
_("property is missing"));
g_prefix_error (error, "%s.%s: ", NM_SETTING_CONNECTION_SETTING_NAME, NM_SETTING_CONNECTION_UUID);
return NM_SETTING_VERIFY_NORMALIZABLE_ERROR;
}
if (normerr_base_type) {
g_set_error (error,
NM_CONNECTION_ERROR,

View file

@ -1952,6 +1952,11 @@ nm_utils_uuid_generate (void)
/**
* nm_utils_uuid_generate_from_string:
* @s: a string to use as the seed for the UUID
* @slen: if negative, treat @s as zero terminated C string.
* Otherwise, assume the length as given (and allow @s to be
* non-null terminated or contain '\0').
* @uuid_type: a type identifier which UUID format to generate.
* @type_args: additional arguments, depending on the uuid_type
*
* For a given @s, this function will always return the same UUID.
*
@ -1959,18 +1964,49 @@ nm_utils_uuid_generate (void)
* object's #NMSettingConnection:id: property
**/
char *
nm_utils_uuid_generate_from_string (const char *s)
nm_utils_uuid_generate_from_string (const char *s, gssize slen, int uuid_type, gpointer type_args)
{
uuid_t *uuid;
uuid_t uuid;
char *buf = NULL;
uuid = g_malloc0 (sizeof (*uuid));
crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (*uuid));
g_return_val_if_fail (slen == 0 || s, FALSE);
g_return_val_if_fail (uuid_type == NM_UTILS_UUID_TYPE_LEGACY || uuid_type == NM_UTILS_UUID_TYPE_VARIANT3, NULL);
g_return_val_if_fail (!type_args || uuid_type == NM_UTILS_UUID_TYPE_VARIANT3, NULL);
if (slen < 0)
slen = strlen (s);
else if (slen == 0)
s = "";
switch (uuid_type) {
case NM_UTILS_UUID_TYPE_LEGACY:
crypto_md5_hash (NULL, 0, s, slen, (char *) uuid, sizeof (uuid));
break;
case NM_UTILS_UUID_TYPE_VARIANT3: {
uuid_t ns_uuid = { 0 };
GString *str;
if (type_args) {
/* type_args can be a name space UUID. Interpret it as (char *) */
if (uuid_parse ((char *) type_args, ns_uuid) != 0)
g_return_val_if_reached (NULL);
}
str = g_string_sized_new (sizeof (ns_uuid) + slen + 1);
g_string_append_len (str, (const char *) ns_uuid, sizeof (ns_uuid));
g_string_append_len (str, s, slen);
crypto_md5_hash (NULL, 0, str->str, str->len, (char *) uuid, sizeof (uuid));
uuid[6] = (uuid[6] & 0x0F) | 0x30;
uuid[8] = (uuid[8] & 0x3F) | 0x80;
break;
}
default:
g_return_val_if_reached (NULL);
}
buf = g_malloc0 (37);
uuid_unparse_lower (*uuid, &buf[0]);
uuid_unparse_lower (uuid, &buf[0]);
g_free (uuid);
return buf;
}

View file

@ -121,7 +121,6 @@ GPtrArray *nm_utils_ip_routes_from_variant (GVariant *value,
int family);
char *nm_utils_uuid_generate (void);
char *nm_utils_uuid_generate_from_string (const char *s);
gboolean nm_utils_file_is_certificate (const char *filename);
gboolean nm_utils_file_is_private_key (const char *filename, gboolean *out_encrypted);

View file

@ -3029,6 +3029,25 @@ test_setting_old_uuid (void)
g_assert (success == TRUE);
}
/******************************************************************************/
static void
test_connection_normalize_uuid (void)
{
gs_unref_object NMConnection *con = NULL;
con = nmtst_create_minimal_connection ("test1", NULL, NM_SETTING_WIRED_SETTING_NAME, NULL);
nmtst_assert_connection_verifies_and_normalizable (con);
g_object_set (nm_connection_get_setting_connection (con),
NM_SETTING_CONNECTION_UUID, NULL,
NULL);
nmtst_assert_connection_verifies_after_normalization (con, NM_CONNECTION_ERROR, NM_CONNECTION_ERROR_MISSING_PROPERTY);
}
/******************************************************************************/
/*
* Test normalization of interface-name
*/
@ -3802,6 +3821,62 @@ test_hexstr2bin (void)
}
}
/******************************************************************************/
#define UUID_NIL "00000000-0000-0000-0000-000000000000"
#define UUID_NS_DNS "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
static void
_test_uuid (int uuid_type, const char *expected_uuid, const char *str, gssize slen, gpointer type_args)
{
gs_free char *uuid_test = NULL;
uuid_test = nm_utils_uuid_generate_from_string (str, slen, uuid_type, type_args);
g_assert (uuid_test);
g_assert (nm_utils_is_uuid (uuid_test));
if (strcmp (uuid_test, expected_uuid)) {
g_error ("UUID test failed: type=%d; text=%s, len=%lld, uuid=%s, expected=%s", uuid_type,
str, (long long) slen, uuid_test, expected_uuid);
}
if (slen < 0) {
/* also test that passing slen==-1 yields the same result as passing strlen(str). */
_test_uuid (uuid_type, expected_uuid, str, strlen (str), type_args);
} else if (str && slen == 0) {
/* also test if we accept NULL for slen==0 */
_test_uuid (uuid_type, expected_uuid, NULL, 0, type_args);
}
if (uuid_type == NM_UTILS_UUID_TYPE_VARIANT3 && !type_args) {
/* For NM_UTILS_UUID_TYPE_VARIANT3, a missing @type_args is equal to UUID_NIL */
_test_uuid (uuid_type, expected_uuid, str, slen, UUID_NIL);
}
}
static void
test_nm_utils_uuid_generate_from_string (void)
{
_test_uuid (NM_UTILS_UUID_TYPE_LEGACY, "d41d8cd9-8f00-b204-e980-0998ecf8427e", "", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_LEGACY, "0cc175b9-c0f1-b6a8-31c3-99e269772661", "a", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_LEGACY, "098f6bcd-4621-d373-cade-4e832627b4f6", "test", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_LEGACY, "70350f60-27bc-e371-3f6b-76473084309b", "a\0b", 3, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_LEGACY, "59c0547b-7fe2-1c15-2cce-e328e8bf6742", "/etc/NetworkManager/system-connections/em1", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "4ae71336-e44b-39bf-b9d2-752e234818a5", "", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "0531103a-d8fc-3dd4-b972-d98e4750994e", "a", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "96e17d7a-ac89-38cf-95e1-bf5098da34e1", "test", -1, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "8156568e-4ae6-3f34-a93e-18e2c6cbbf78", "a\0b", 3, NULL);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "c87ee674-4ddc-3efe-a74e-dfe25da5d7b3", "", -1, UUID_NS_DNS);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "4c104dd0-4821-30d5-9ce3-0e7a1f8b7c0d", "a", -1, UUID_NS_DNS);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "45a113ac-c7f2-30b0-90a5-a399ab912716", "test", -1, UUID_NS_DNS);
_test_uuid (NM_UTILS_UUID_TYPE_VARIANT3, "002a0ada-f547-375a-bab5-896a11d1927e", "a\0b", 3, UUID_NS_DNS);
}
/******************************************************************************/
NMTST_DEFINE ();
int main (int argc, char **argv)
@ -3849,6 +3924,7 @@ int main (int argc, char **argv)
g_test_add_func ("/core/general/test_connection_replace_settings_bad", test_connection_replace_settings_bad);
g_test_add_func ("/core/general/test_connection_new_from_dbus", test_connection_new_from_dbus);
g_test_add_func ("/core/general/test_connection_normalize_virtual_iface_name", test_connection_normalize_virtual_iface_name);
g_test_add_func ("/core/general/test_connection_normalize_uuid", test_connection_normalize_uuid);
g_test_add_func ("/core/general/test_connection_normalize_type", test_connection_normalize_type);
g_test_add_func ("/core/general/test_connection_normalize_slave_type_1", test_connection_normalize_slave_type_1);
g_test_add_func ("/core/general/test_connection_normalize_slave_type_2", test_connection_normalize_slave_type_2);
@ -3896,6 +3972,7 @@ int main (int argc, char **argv)
g_test_add_func ("/core/general/test_setting_ip6_gateway", test_setting_ip6_gateway);
g_test_add_func ("/core/general/hexstr2bin", test_hexstr2bin);
g_test_add_func ("/core/general/test_nm_utils_uuid_generate_from_string", test_nm_utils_uuid_generate_from_string);
return g_test_run ();
}

View file

@ -1487,9 +1487,11 @@ char *
nm_utils_uuid_generate_from_string (const char *s)
{
GError *error = NULL;
uuid_t *uuid;
uuid_t uuid;
char *buf = NULL;
g_return_val_if_fail (s && *s, NULL);
if (!nm_utils_init (&error)) {
g_warning ("error initializing crypto: (%d) %s",
error ? error->code : 0,
@ -1499,21 +1501,18 @@ nm_utils_uuid_generate_from_string (const char *s)
return NULL;
}
uuid = g_malloc0 (sizeof (*uuid));
if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (*uuid), &error)) {
if (!crypto_md5_hash (NULL, 0, s, strlen (s), (char *) uuid, sizeof (uuid), &error)) {
g_warning ("error generating UUID: (%d) %s",
error ? error->code : 0,
error ? error->message : "unknown");
if (error)
g_error_free (error);
goto out;
return NULL;
}
buf = g_malloc0 (37);
uuid_unparse_lower (*uuid, &buf[0]);
uuid_unparse_lower (uuid, &buf[0]);
out:
g_free (uuid);
return buf;
}

View file

@ -2490,6 +2490,48 @@ test_libnm_linking (void)
g_free (err);
}
/******************************************************************************/
static void
_test_uuid (const char *expected_uuid, const char *str)
{
gs_free char *uuid_test = NULL;
g_assert (str);
uuid_test = nm_utils_uuid_generate_from_string (str);
g_assert (uuid_test);
g_assert (nm_utils_is_uuid (uuid_test));
if (strcmp (uuid_test, expected_uuid)) {
g_error ("UUID test failed: text=%s, uuid=%s, expected=%s",
str, uuid_test, expected_uuid);
}
}
static void
test_nm_utils_uuid_generate_from_string (void)
{
gs_free char *uuid_test = NULL;
_test_uuid ("0cc175b9-c0f1-b6a8-31c3-99e269772661", "a");
_test_uuid ("098f6bcd-4621-d373-cade-4e832627b4f6", "test");
_test_uuid ("59c0547b-7fe2-1c15-2cce-e328e8bf6742", "/etc/NetworkManager/system-connections/em1");
g_test_expect_message ("libnm-util", G_LOG_LEVEL_CRITICAL, "*char *nm_utils_uuid_generate_from_string(const char *): *s && *s*");
uuid_test = nm_utils_uuid_generate_from_string ("");
g_assert (uuid_test == NULL);
g_test_assert_expected_messages ();
g_test_expect_message ("libnm-util", G_LOG_LEVEL_CRITICAL, "*char *nm_utils_uuid_generate_from_string(const char *): *s && *s*");
uuid_test = nm_utils_uuid_generate_from_string (NULL);
g_assert (uuid_test == NULL);
g_test_assert_expected_messages ();
}
/******************************************************************************/
NMTST_DEFINE ();
int main (int argc, char **argv)
@ -2567,6 +2609,8 @@ int main (int argc, char **argv)
test_libnm_linking ();
test_nm_utils_uuid_generate_from_string ();
base = g_path_get_basename (argv[0]);
fprintf (stdout, "%s: SUCCESS\n", base);
g_free (base);

View file

@ -793,7 +793,6 @@ global:
nm_utils_security_valid;
nm_utils_ssid_to_utf8;
nm_utils_uuid_generate;
nm_utils_uuid_generate_from_string;
nm_utils_wep_key_valid;
nm_utils_wifi_channel_to_freq;
nm_utils_wifi_find_next_channel;

View file

@ -1739,6 +1739,48 @@ nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 max
return v;
}
/**
* nm_utils_uuid_generate_from_strings:
* @string1: a variadic list of strings. Must be NULL terminated.
*
* Returns a variant3 UUID based on the concatenated C strings.
* It does not simply concatenate them, but also includes the
* terminating '\0' character. For example "a", "b", gives
* "a\0b\0\0".
*
* This has the advantage, that the following invocations
* all give different UUIDs: (""), ("",""), ("","a"), ("a",""),
* ("aa"), ("aa", ""), ("", "aa"), ...
*/
char *
nm_utils_uuid_generate_from_strings (const char *string1, ...)
{
GString *str;
va_list args;
const char *s;
char *uuid;
if (!string1)
return nm_utils_uuid_generate_from_string (NULL, 0, NM_UTILS_UUID_TYPE_VARIANT3, NM_UTILS_UUID_NS);
str = g_string_sized_new (120); /* effectively allocates power of 2 (128)*/
g_string_append_len (str, string1, strlen (string1) + 1);
va_start (args, string1);
s = va_arg (args, const char *);
while (s) {
g_string_append_len (str, s, strlen (s) + 1);
s = va_arg (args, const char *);
}
uuid = nm_utils_uuid_generate_from_string (str->str, str->len, NM_UTILS_UUID_TYPE_VARIANT3, NM_UTILS_UUID_NS);
g_string_free (str, TRUE);
return uuid;
}
/**************************************************************************/
static gint64 monotonic_timestamp_offset_sec;

View file

@ -160,6 +160,10 @@ void nm_utils_log_connection_diff (NMConnection *connection, NMConnection *diff_
gint64 nm_utils_ascii_str_to_int64 (const char *str, guint base, gint64 min, gint64 max, gint64 fallback);
#define NM_UTILS_UUID_NS "b425e9fb-7598-44b4-9e3b-5a2e3aaa4905"
char *nm_utils_uuid_generate_from_strings (const char *string1, ...) G_GNUC_NULL_TERMINATED;
#define NM_UTILS_NS_PER_SECOND ((gint64) 1000000000)
gint64 nm_utils_get_monotonic_timestamp_ns (void);
gint64 nm_utils_get_monotonic_timestamp_us (void);

View file

@ -384,7 +384,7 @@ connection_setting_add (const GPtrArray *block,
GError **error)
{
NMSetting *s_con;
char *id, *uuid, *uuid_data;
char *id, *uuid;
const char *s_hwaddr = NULL, *s_ip4addr = NULL, *s_vlanid;
if (!parse_ibft_config (block, error,
@ -404,12 +404,13 @@ connection_setting_add (const GPtrArray *block,
prefix ? prefix : "",
iface);
uuid_data = g_strdup_printf ("%s%s%s",
s_vlanid ? s_vlanid : "0",
s_hwaddr,
s_ip4addr ? s_ip4addr : "DHCP");
uuid = nm_utils_uuid_generate_from_string (uuid_data);
g_free (uuid_data);
uuid = nm_utils_uuid_generate_from_strings ("ibft",
s_hwaddr,
s_vlanid ? "V" : "v",
s_vlanid ? s_vlanid : "",
s_ip4addr ? "A" : "DHCP",
s_ip4addr ? s_ip4addr : "",
NULL);
s_con = nm_setting_connection_new ();
g_object_set (s_con,

View file

@ -148,7 +148,7 @@ make_connection_setting (const char *file,
uuid = svGetValue (ifcfg, "UUID", FALSE);
if (!uuid || !strlen (uuid)) {
g_free (uuid);
uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName);
uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName, -1, NM_UTILS_UUID_TYPE_LEGACY, NULL);
}
g_object_set (s_con,
@ -4588,7 +4588,7 @@ uuid_from_file (const char *filename)
uuid = svGetValue (ifcfg, "UUID", FALSE);
if (!uuid || !strlen (uuid)) {
g_free (uuid);
uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName);
uuid = nm_utils_uuid_generate_from_string (ifcfg->fileName, -1, NM_UTILS_UUID_TYPE_LEGACY, NULL);
}
svCloseFile (ifcfg);

View file

@ -1629,7 +1629,7 @@ ifnet_update_connection_from_config_block (const char *conn_name,
id = connection_id_from_ifnet_name (conn_name);
uuid = g_strdup (ifnet_get_data (conn_name, "uuid"));
if (!uuid)
uuid = nm_utils_uuid_generate_from_string (id);
uuid = nm_utils_uuid_generate_from_string (id, -1, NM_UTILS_UUID_TYPE_LEGACY, NULL);
g_object_set (setting,
NM_SETTING_CONNECTION_TYPE, type,

View file

@ -686,7 +686,7 @@ ifupdown_update_connection_from_if_block (NMConnection *connection,
idstr = g_strconcat ("Ifupdown (", block->name, ")", NULL);
uuid_base = idstr;
uuid = nm_utils_uuid_generate_from_string (uuid_base);
uuid = nm_utils_uuid_generate_from_string (uuid_base, -1, NM_UTILS_UUID_TYPE_LEGACY, NULL);
g_object_set (s_con,
NM_SETTING_CONNECTION_TYPE, type,
NM_SETTING_CONNECTION_INTERFACE_NAME, block->name,

View file

@ -1316,7 +1316,7 @@ nm_keyfile_plugin_connection_from_file (const char *filename, GError **error)
if (!nm_setting_connection_get_uuid (s_con)) {
char *hashed_uuid;
hashed_uuid = nm_utils_uuid_generate_from_string (filename);
hashed_uuid = nm_utils_uuid_generate_from_strings ("keyfile", filename, NULL);
g_object_set (s_con, NM_SETTING_CONNECTION_UUID, hashed_uuid, NULL);
g_free (hashed_uuid);
}

View file

@ -729,6 +729,53 @@ test_connection_sort_autoconnect_priority (void)
/*******************************************/
static void
__test_uuid (const char *expected_uuid, const char *str, gssize slen, char *uuid_test)
{
g_assert (uuid_test);
g_assert (nm_utils_is_uuid (uuid_test));
if (strcmp (uuid_test, expected_uuid)) {
g_error ("UUID test failed (1): text=%s, len=%lld, expected=%s, uuid_test=%s",
str, (long long) slen, expected_uuid, uuid_test);
}
g_free (uuid_test);
uuid_test = nm_utils_uuid_generate_from_string (str, slen, NM_UTILS_UUID_TYPE_VARIANT3, NM_UTILS_UUID_NS);
g_assert (uuid_test);
g_assert (nm_utils_is_uuid (uuid_test));
if (strcmp (uuid_test, expected_uuid)) {
g_error ("UUID test failed (2): text=%s; len=%lld, expected=%s, uuid2=%s",
str, (long long) slen, expected_uuid, uuid_test);
}
g_free (uuid_test);
}
#define _test_uuid(expected_uuid, str, strlen, ...) __test_uuid (expected_uuid, str, strlen, nm_utils_uuid_generate_from_strings(__VA_ARGS__, NULL))
static void
test_nm_utils_uuid_generate_from_strings (void)
{
_test_uuid ("b07c334a-399b-32de-8d50-58e4e08f98e3", "", 0, NULL);
_test_uuid ("b8a426cb-bcb5-30a3-bd8f-6786fea72df9", "\0", 1, "");
_test_uuid ("12a4a982-7aae-39e1-951e-41aeb1250959", "a\0", 2, "a");
_test_uuid ("69e22c7e-f89f-3a43-b239-1cb52ed8db69", "aa\0", 3, "aa");
_test_uuid ("59829fd3-5ad5-3d90-a7b0-4911747e4088", "\0\0", 2, "", "");
_test_uuid ("01ad0e06-6c50-3384-8d86-ddab81421425", "a\0\0", 3, "a", "");
_test_uuid ("e1ed8647-9ed3-3ec8-8c6d-e8204524d71d", "aa\0\0", 4, "aa", "");
_test_uuid ("fb1c7cd6-275c-3489-9382-83b900da8af0", "\0a\0", 3, "", "a");
_test_uuid ("5d79494e-c4ba-31a6-80a2-d6016ccd7e17", "a\0a\0", 4, "a", "a");
_test_uuid ("fd698d86-1b60-3ebe-855f-7aada9950a8d", "aa\0a\0", 5, "aa", "a");
_test_uuid ("8c573b48-0f01-30ba-bb94-c5f59f4fe517", "\0aa\0", 4, "", "aa");
_test_uuid ("2bdd3d46-eb83-3c53-a41b-a724d04b5544", "a\0aa\0", 5, "a", "aa");
_test_uuid ("13d4b780-07c1-3ba7-b449-81c4844ef039", "aa\0aa\0", 6, "aa", "aa");
_test_uuid ("dd265bf7-c05a-3037-9939-b9629858a477", "a\0b\0", 4, "a", "b");
}
/*******************************************/
NMTST_DEFINE ();
int
@ -751,6 +798,8 @@ main (int argc, char **argv)
g_test_add_func ("/general/connection-sort/autoconnect-priority", test_connection_sort_autoconnect_priority);
g_test_add_func ("/general/nm_utils_uuid_generate_from_strings", test_nm_utils_uuid_generate_from_strings);
return g_test_run ();
}