[CRIU] [PATCH] zdtm: up the loopback device in a new network namespace

Andrey Vagin avagin at openvz.org
Fri Apr 29 17:59:04 PDT 2016


From: Andrew Vagin <avagin at virtuozzo.com>

In this case we can run more tests

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/zdtm.py                         | 5 ++++-
 test/zdtm/static/packet_sock.desc    | 2 +-
 test/zdtm/static/socket_udp.desc     | 1 -
 test/zdtm/static/socket_udplite.desc | 1 -
 4 files changed, 5 insertions(+), 4 deletions(-)
 delete mode 100644 test/zdtm/static/socket_udp.desc
 delete mode 100644 test/zdtm/static/socket_udplite.desc

diff --git a/test/zdtm.py b/test/zdtm.py
index b1ed38d..71a0d23 100755
--- a/test/zdtm.py
+++ b/test/zdtm.py
@@ -1254,7 +1254,10 @@ def run_tests(opts):
 		opts['parallel'] = None
 
 	if opts['join_ns']:
-		subprocess.Popen(["ip", "netns", "add", "zdtm_netns"])
+		if subprocess.Popen(["ip", "netns", "add", "zdtm_netns"]).wait():
+                    raise Exception("Unable to create a network namespace")
+		if subprocess.Popen(["ip", "netns", "exec", "zdtm_netns", "ip", "link", "set", "up", "dev", "lo"]).wait():
+                    raise Exception("ip link set up dev lo")
 
 	l = launcher(opts, len(torun))
 	try:
diff --git a/test/zdtm/static/packet_sock.desc b/test/zdtm/static/packet_sock.desc
index 8c39ed1..2eac7e6 100644
--- a/test/zdtm/static/packet_sock.desc
+++ b/test/zdtm/static/packet_sock.desc
@@ -1 +1 @@
-{'flags': 'suid samens'}
+{'flags': 'suid'}
diff --git a/test/zdtm/static/socket_udp.desc b/test/zdtm/static/socket_udp.desc
deleted file mode 100644
index 2add893..0000000
--- a/test/zdtm/static/socket_udp.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'samens'}
diff --git a/test/zdtm/static/socket_udplite.desc b/test/zdtm/static/socket_udplite.desc
deleted file mode 100644
index 2add893..0000000
--- a/test/zdtm/static/socket_udplite.desc
+++ /dev/null
@@ -1 +0,0 @@
-{'flags': 'samens'}
-- 
2.5.5



More information about the CRIU mailing list