From 45cb5bb3c0e6edb887cf69b417fcaf7053814a9b Mon Sep 17 00:00:00 2001 From: Aron Xu Date: Tue, 20 Dec 2016 20:06:37 +0800 Subject: Imported Upstream version 1.4.4 --- src/tests/test-general-with-expect.c | 3 ++- src/tests/test-ip6-config.c | 9 ++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/tests') 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 #include #include +#include #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)) { -- cgit 1.3.0-6-gf8a5