zdtm: up the loopback device in a new network namespace

Submitted by Andrei Vagin on April 30, 2016, 12:59 a.m.

Details

Message ID 1461977944-16125-1-git-send-email-avagin@openvz.org
State Accepted
Series "zdtm: up the loopback device in a new network namespace"
Commit f7a07e71d9556c4df1bf0bee0d2024b7556994cc
Headers show

Commit Message

Andrei Vagin April 30, 2016, 12:59 a.m.
From: Andrew Vagin <avagin@virtuozzo.com>

In this case we can run more tests

Signed-off-by: Andrew Vagin <avagin@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

Patch hide | download patch | download mbox

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'}

Comments

Pavel Emelianov May 4, 2016, 7:27 a.m.
Applied