diff options
| author | Michael Biebl <biebl@debian.org> | 2022-06-17 22:03:19 +0200 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-06-17 22:03:19 +0200 |
| commit | f7c750061dab327e638c0129cfafd5b2215b3a2e (patch) | |
| tree | 228879a9047dcc8c06e11964fe23b3b73cf5fc70 /src/core/tests | |
| parent | 87d61411bb3453587d21487da04fcf770fee7d55 (diff) | |
New upstream version 1.38.2 upstream/1.38.2
Diffstat (limited to 'src/core/tests')
| -rw-r--r-- | src/core/tests/test-core.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/core/tests/test-core.c b/src/core/tests/test-core.c index b4e1c4d5..11a7f323 100644 --- a/src/core/tests/test-core.c +++ b/src/core/tests/test-core.c @@ -15,7 +15,6 @@ #include "NetworkManagerUtils.h" #include "libnm-core-intern/nm-core-internal.h" #include "nm-core-utils.h" -#include "libnm-systemd-core/nm-sd-utils-core.h" #include "dns/nm-dns-manager.h" #include "nm-connectivity.h" @@ -2314,7 +2313,6 @@ test_dns_create_resolv_conf(void) static void test_machine_id_read(void) { - NMUuid machine_id_sd; const NMUuid *machine_id; char machine_id_str[33]; gpointer logstate; @@ -2346,27 +2344,6 @@ test_machine_id_read(void) == machine_id_str); g_assert(strlen(machine_id_str) == 32); g_assert_cmpstr(machine_id_str, ==, nm_utils_machine_id_str()); - - /* double check with systemd's implementation... */ - if (!nm_sd_utils_id128_get_machine(&machine_id_sd)) { - /* if systemd failed to read /etc/machine-id, the file likely - * is invalid. Our machine-id is fake, and we have nothing to - * compare against. */ - - if (g_file_test(LOCALSTATEDIR "/lib/dbus/machine-id", G_FILE_TEST_EXISTS)) { - /* Hm. So systemd failed to read /etc/machine-id, but we may have the one from D-Bus. - * With LOCALSTATEDIR"/lib/dbus/machine-id", we don't really know whether we - * parsed that file. Assume we don't know and skip the test on this system. */ - g_assert(!nm_utils_machine_id_is_fake()); - return; - } - - /* OK, in this case, our function should have generated a random machine ID. */ - g_assert(nm_utils_machine_id_is_fake()); - } else { - g_assert(!nm_utils_machine_id_is_fake()); - g_assert_cmpmem(&machine_id_sd, sizeof(NMUuid), machine_id, 16); - } } /*****************************************************************************/ |