[CRIU] [PATCH 3/2] zdtm: Move netns test into ns/uns flavor
Pavel Emelyanov
xemul at parallels.com
Mon Oct 26 03:47:38 PDT 2015
This one got lost in rebase, sorry :)
Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
test/zdtm.sh | 2 +-
test/zdtm/live/static/netns.c | 13 +++----------
test/zdtm/live/static/netns.desc | 2 +-
3 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 783ba59..2a769b3 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -200,7 +200,7 @@ generate_test_list()
ns/static/sem
transition/ipc
ns/static/netns-nf
- static/netns
+ ns/static/netns
ns/static/netns-dev
static/cgroup00
static/cgroup01
diff --git a/test/zdtm/live/static/netns.c b/test/zdtm/live/static/netns.c
index 5b84e5f..3090a5f 100644
--- a/test/zdtm/live/static/netns.c
+++ b/test/zdtm/live/static/netns.c
@@ -7,8 +7,10 @@
const char *test_doc = "Check that network environment (links, addresses and routes) are preserved";
const char *test_author = "Pavel Emelianov <xemul at parallels.com>";
-static int test_fn(int argc, char **argv)
+int main(int argc, char **argv)
{
+ test_init(argc, argv);
+
if (system("ip link set lo up")) {
fail("Can't set lo up");
return -1;
@@ -50,12 +52,3 @@ static int test_fn(int argc, char **argv)
pass();
return 0;
}
-
-#define CLONE_NEWNET 0x40000000
-
-int main(int argc, char **argv)
-{
- test_init_ns(argc, argv, CLONE_NEWNET, test_fn);
- return 0;
-}
-
diff --git a/test/zdtm/live/static/netns.desc b/test/zdtm/live/static/netns.desc
index 63df42a..a16a254 100644
--- a/test/zdtm/live/static/netns.desc
+++ b/test/zdtm/live/static/netns.desc
@@ -1 +1 @@
-{'flavor': 'h'}
+{'flavor': 'ns uns', 'deps': [ '/bin/sh', '/sbin/ip', '/bin/diff'], 'flags': 'suid'}
--
1.9.3
More information about the CRIU
mailing list