[CRIU] [PATCH 2/2] zdtm: Move netns-nf test into ns/uns flavor
Pavel Emelyanov
xemul at parallels.com
Mon Oct 26 03:42:28 PDT 2015
After this patch it stops working in zdtm.sh launcher duo to incomplete
root constructed. Do we want to fix it?
Signed-off-by: Pavel Emelyanov <xemul at openvz.org>
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 4ed8a7b..783ba59 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -199,7 +199,7 @@ generate_test_list()
ns/static/msgque
ns/static/sem
transition/ipc
- static/netns-nf
+ ns/static/netns-nf
static/netns
ns/static/netns-dev
static/cgroup00
diff --git a/test/zdtm/live/static/netns-nf.c b/test/zdtm/live/static/netns-nf.c
index 39cf8e1..393f0e7 100644
--- a/test/zdtm/live/static/netns-nf.c
+++ b/test/zdtm/live/static/netns-nf.c
@@ -11,10 +11,12 @@ const char *test_author = "Pavel Emelianov <xemul at parallels.com>";
char *filename;
TEST_OPTION(filename, string, "file name", 1);
-static int test_fn(int argc, char **argv)
+int main(int argc, char **argv)
{
char cmd[128];
+ test_init(argc, argv);
+
if (system("iptables -A INPUT -t filter --protocol icmp -j DROP")) {
pr_perror("Can't set input rule");
return -1;
@@ -44,12 +46,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-nf.desc b/test/zdtm/live/static/netns-nf.desc
index 63df42a..18ffd65 100644
--- a/test/zdtm/live/static/netns-nf.desc
+++ b/test/zdtm/live/static/netns-nf.desc
@@ -1 +1 @@
-{'flavor': 'h'}
+{'flavor': 'ns uns', 'deps': [ '/bin/sh', '/sbin/iptables', '/usr/lib64/xtables/libxt_standard.so', '/bin/diff' ], 'flags': 'suid'}
More information about the CRIU
mailing list