[CRIU] [PATCH 1/4] zdtm: Stop using test_init_ns by transition/ipc

Pavel Emelyanov xemul at parallels.com
Mon Nov 30 11:38:05 PST 2015


Signed-off-by: Pavel Emelyanov <xemul at parallels.com>
---
 test/zdtm.sh                       |  2 +-
 test/zdtm/live/transition/Makefile |  1 -
 test/zdtm/live/transition/ipc.c    | 15 +++------------
 test/zdtm/live/transition/ipc.desc |  2 +-
 4 files changed, 5 insertions(+), 15 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index 6718421..69e2d5b 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -202,7 +202,7 @@ generate_test_list()
 		ns/static/shm
 		ns/static/msgque
 		ns/static/sem
-		transition/ipc
+		ns/transition/ipc
 		ns/static/netns-dev
 		static/cgroup00
 		static/cgroup01
diff --git a/test/zdtm/live/transition/Makefile b/test/zdtm/live/transition/Makefile
index e912cf2..c791e62 100644
--- a/test/zdtm/live/transition/Makefile
+++ b/test/zdtm/live/transition/Makefile
@@ -63,7 +63,6 @@ $(TST):	$(LIB)
 
 ptrace.o:	override CFLAGS += -pthread
 ptrace:		override LDFLAGS += -pthread
-ipc:		override CFLAGS += -DNEW_IPC_NS
 fork2:		override CFLAGS += -D FORK2
 thread-bomb.o:		override CFLAGS += -pthread
 thread-bomb:		override LDFLAGS += -pthread
diff --git a/test/zdtm/live/transition/ipc.c b/test/zdtm/live/transition/ipc.c
index c8d7aac..4affe04 100644
--- a/test/zdtm/live/transition/ipc.c
+++ b/test/zdtm/live/transition/ipc.c
@@ -80,7 +80,7 @@ static int child(key_t key)
 	return res;
 }
 
-static int test_fn(int argc, char **argv)
+int main(int argc, char **argv)
 {
 	key_t key;
 	int sem, shm, pid1, pid2;
@@ -89,6 +89,8 @@ static int test_fn(int argc, char **argv)
 	uint32_t crc;
 	int ret;
 
+	test_init(argc, argv);
+
 	key = ftok(argv[0], 822155650);
 	if (key == -1) {
 		pr_perror("Can't make key");
@@ -198,14 +200,3 @@ out_sem:
 out:
 	return 0;
 }
-
-int main(int argc, char **argv)
-{
-#ifdef NEW_IPC_NS
-	test_init_ns(argc, argv, CLONE_NEWIPC, test_fn);
-#else
-	test_init(argc, argv);
-	test_fn(argc, argv);
-#endif
-	return 0;
-}
diff --git a/test/zdtm/live/transition/ipc.desc b/test/zdtm/live/transition/ipc.desc
index 63df42a..5939706 100644
--- a/test/zdtm/live/transition/ipc.desc
+++ b/test/zdtm/live/transition/ipc.desc
@@ -1 +1 @@
-{'flavor': 'h'}
+{'flavor': 'ns'}
-- 
1.9.3




More information about the CRIU mailing list