summary refs log tree commit diff
path: root/src/tests
diff options
context:
space:
mode:
authorAron Xu <aron@debian.org>2016-12-20 20:06:37 +0800
committerAron Xu <aron@debian.org>2016-12-20 20:06:37 +0800
commit45cb5bb3c0e6edb887cf69b417fcaf7053814a9b (patch)
tree795f8d6a3aa1145e4ba8fa1564f39425ea0c6ed9 /src/tests
parent270c4830551c9810ad4e83f9a1db2b1cb946208c (diff)
Imported Upstream version 1.4.4 upstream/1.4.4
Diffstat (limited to 'src/tests')
-rw-r--r--src/tests/test-general-with-expect.c3
-rw-r--r--src/tests/test-ip6-config.c9
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)) {