diff options
| author | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2017-12-12 15:53:07 +0100 |
| commit | afcd268ea7b1149fbfb66bce4eca659b675da0a2 (patch) | |
| tree | c3fca2203ad17434daf3ccf576582bd66aa41ab2 /src/tests | |
| parent | 417f6015c3dc8c47cf27daa59f64e0e36c521b9c (diff) | |
New upstream version 1.10.2 upstream/1.10.2
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/config/test-config.c | 6 | ||||
| -rw-r--r-- | src/tests/test-general-with-expect.c | 8 | ||||
| -rw-r--r-- | src/tests/test-general.c | 2 | ||||
| -rw-r--r-- | src/tests/test-ip4-config.c | 2 |
4 files changed, 12 insertions, 6 deletions
diff --git a/src/tests/config/test-config.c b/src/tests/config/test-config.c index 80e17d01..89b22a9f 100644 --- a/src/tests/config/test-config.c +++ b/src/tests/config/test-config.c @@ -318,6 +318,7 @@ test_config_global_dns (void) g_object_unref (config); } +#if WITH_CONCHECK static void test_config_connectivity_check (void) { @@ -351,6 +352,7 @@ test_config_connectivity_check (void) g_assert (remove (CONFIG_INTERN) == 0); } +#endif static void test_config_no_auto_default (void) @@ -368,7 +370,7 @@ test_config_no_auto_default (void) g_assert_cmpint (nwrote, ==, 18); nwrote = write (fd, "44:44:44:44:44:44\n", 18); g_assert_cmpint (nwrote, ==, 18); - close (fd); + nm_close (fd); config = setup_config (NULL, SRCDIR "/NetworkManager.conf", "", NULL, "/no/such/dir", "", "--no-auto-default", state_file, @@ -1053,7 +1055,9 @@ main (int argc, char **argv) g_test_add_func ("/config/set-values", test_config_set_values); g_test_add_func ("/config/global-dns", test_config_global_dns); +#if WITH_CONCHECK g_test_add_func ("/config/connectivity-check", test_config_connectivity_check); +#endif g_test_add_func ("/config/signal", test_config_signal); diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index c5d26163..2911d84d 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -184,7 +184,7 @@ test_nm_utils_kill_child_create_and_join_pgroup (void) if (pgid == 0) { /* child process... */ - close (pipefd[0]); + nm_close (pipefd[0]); err = setpgid (0, 0); g_assert (err == 0); @@ -192,16 +192,16 @@ test_nm_utils_kill_child_create_and_join_pgroup (void) err = write (pipefd[1], &tmp, sizeof (tmp)); g_assert (err == sizeof (tmp)); - close (pipefd[1]); + nm_close (pipefd[1]); exit (0); } - close (pipefd[1]); + nm_close (pipefd[1]); err = read (pipefd[0], &tmp, sizeof (tmp)); g_assert (err == sizeof (tmp)); - close (pipefd[0]); + nm_close (pipefd[0]); err = setpgid (0, pgid); g_assert (err == 0); diff --git a/src/tests/test-general.c b/src/tests/test-general.c index d36a26ef..bfa2ea73 100644 --- a/src/tests/test-general.c +++ b/src/tests/test-general.c @@ -359,7 +359,7 @@ _match_connection (GSList *connections, } list[i] = NULL; - return nm_utils_match_connection (list, original, device_has_carrier, default_v4_metric, default_v6_metric, NULL, NULL); + return nm_utils_match_connection (list, original, FALSE, device_has_carrier, default_v4_metric, default_v6_metric, NULL, NULL); } static void diff --git a/src/tests/test-ip4-config.c b/src/tests/test-ip4-config.c index 649b443f..4c3c344e 100644 --- a/src/tests/test-ip4-config.c +++ b/src/tests/test-ip4-config.c @@ -38,6 +38,8 @@ build_test_config (void) /* Build up the config to subtract */ config = nmtst_ip4_config_new (1); + nm_assert (NM_IP_CONFIG_CAST (config)); + addr = *nmtst_platform_ip4_address ("192.168.1.10", "1.2.3.4", 24); nm_ip4_config_add_address (config, &addr); |