Commit 2708e5b8 authored by Dengguangxing's avatar Dengguangxing Committed by Pavel Emelyanov

join-ns: Fix join-ns zdtm test

join-ns zdtm test will skip ns and uns flavors, and
some socket related test, too. Because join-ns test will
try to join an existing network namespace.
Signed-off-by: 's avatarDeng Guangxing <dengguangxing@huawei.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 9f0ddf0e
......@@ -1265,11 +1265,6 @@ def run_tests(opts):
opts['parallel'] = None
if opts['join_ns']:
print "[WARNING] Option --join-ns will skip ns and uns flavors, and some socket related tests."
r = re.compile('^(?!.*sock).*$')
torun = filter(lambda x: r.match(x), torun)
opts['keep_going'] = True
run_all = True
subprocess.Popen(["ip", "netns", "add", "zdtm_netns"])
l = launcher(opts, len(torun))
......@@ -1312,6 +1307,11 @@ def run_tests(opts):
l.skip(t, "criu root prio needed")
continue
if opts['join_ns']:
if test_flag(tdesc, 'samens'):
l.skip(t, "samens test in the same namespace")
continue
test_flavs = tdesc.get('flavor', 'h ns uns').split()
opts_flavs = (opts['flavor'] or 'h,ns,uns').split(',')
if opts_flavs != ['best']:
......
{'flags': 'suid'}
{'flags': 'suid samens'}
{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h ns uns', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser'}
{'flavor': 'h', 'opts': '--tcp-established', 'flags': 'nouser samens'}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment