diff options
Diffstat (limited to 'src/tests')
| -rw-r--r-- | src/tests/test-general-with-expect.c | 3 | ||||
| -rw-r--r-- | src/tests/test-ip6-config.c | 9 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/tests/test-general-with-expect.c b/src/tests/test-general-with-expect.c index ab2b15b5..f04c147f 100644 --- a/src/tests/test-general-with-expect.c +++ b/src/tests/test-general-with-expect.c @@ -26,6 +26,7 @@ #include <netinet/ether.h> #include <sys/types.h> #include <sys/wait.h> +#include <fcntl.h> #include "NetworkManagerUtils.h" #include "nm-multi-index.h" @@ -173,7 +174,7 @@ test_nm_utils_kill_child_create_and_join_pgroup (void) int pipefd[2]; pid_t pgid; - err = pipe (pipefd); + err = pipe2 (pipefd, O_CLOEXEC); g_assert (err == 0); pgid = fork(); diff --git a/src/tests/test-ip6-config.c b/src/tests/test-ip6-config.c index 3eceec0c..de890141 100644 --- a/src/tests/test-ip6-config.c +++ b/src/tests/test-ip6-config.c @@ -238,10 +238,13 @@ test_nm_ip6_config_addresses_sort_check (NMIP6Config *config, NMSettingIP6Config { int addr_count = nm_ip6_config_get_num_addresses (config); int i, irepeat; - NMIP6Config *copy = nmtst_ip6_config_clone (config); - NMIP6Config *copy2 = nmtst_ip6_config_clone (config); + NMIP6Config *copy, *copy2; int *idx = g_new (int, addr_count); + nm_ip6_config_set_privacy (config, use_tempaddr); + copy = nmtst_ip6_config_clone (config); + copy2 = nmtst_ip6_config_clone (config); + /* initialize the array of indeces, and keep shuffling them for every @repeat iteration. */ for (i = 0; i < addr_count; i++) idx[i] = i; @@ -257,7 +260,7 @@ test_nm_ip6_config_addresses_sort_check (NMIP6Config *config, NMSettingIP6Config } /* reorder them again */ - nm_ip6_config_addresses_sort (copy, use_tempaddr); + nm_ip6_config_addresses_sort (copy); /* check equality using nm_ip6_config_equal() */ if (!nm_ip6_config_equal (copy, config)) { |