[CRIU] [PATCH] tests: move non-zdtm tests to tests/others/

Andrey Vagin avagin at openvz.org
Sat Feb 20 08:23:26 PST 2016


From: Andrew Vagin <avagin at virtuozzo.com>

Signed-off-by: Andrew Vagin <avagin at virtuozzo.com>
---
 test/fault-injection/Makefile                           |  2 --
 test/{ => others}/bers/Makefile                         |  0
 test/{ => others}/bers/bers.c                           |  0
 test/{ => others}/bers/bers.txt                         |  0
 test/{ => others}/ext-links/Makefile                    |  2 +-
 test/{ => others}/ext-links/addmv.sh                    |  0
 test/{ => others}/ext-links/addmv_raw.sh                |  0
 test/{ => others}/ext-links/mvlink.c                    |  0
 test/{ => others}/ext-links/run.sh                      |  2 +-
 test/{ => others}/ext-links/run_ns.sh                   |  0
 test/{ => others}/ext-links/run_wait.sh                 |  0
 test/{ => others}/ext-tty/run.py                        |  4 ++--
 test/others/fault-injection/Makefile                    |  2 ++
 test/{ => others}/fault-injection/parasite.stp          |  0
 test/{ => others}/libcriu/.gitignore                    |  0
 test/{ => others}/libcriu/Makefile                      |  4 ++--
 test/{ => others}/libcriu/lib.c                         |  0
 test/{ => others}/libcriu/lib.h                         |  0
 test/{ => others}/libcriu/run.sh                        |  5 +++--
 test/{ => others}/libcriu/test_errno.c                  |  0
 test/{ => others}/libcriu/test_iters.c                  |  0
 test/{ => others}/libcriu/test_notify.c                 |  0
 test/{ => others}/libcriu/test_self.c                   |  0
 test/{ => others}/libcriu/test_sub.c                    |  0
 test/{ => others}/mem-snap/Makefile                     |  0
 test/{ => others}/mem-snap/run-predump-2.sh             |  6 +++---
 test/{ => others}/mem-snap/run-predump.sh               |  6 +++---
 test/{ => others}/mem-snap/run-snap-auto-dedup.sh       |  6 +++---
 test/{ => others}/mem-snap/run-snap-dedup-on-restore.sh |  6 +++---
 test/{ => others}/mem-snap/run-snap-dedup.sh            |  6 +++---
 test/{ => others}/mem-snap/run-snap-maps04.sh           | 12 ++++++------
 test/{ => others}/mem-snap/run-snap.sh                  |  6 +++---
 test/{ => others}/mem-snap/run.sh                       |  0
 test/{ => others}/mounts/ext/Makefile                   |  0
 test/{ => others}/mounts/ext/ext-mount.c                |  0
 test/{ => others}/mounts/ext/ns_init.c                  |  0
 test/{ => others}/mounts/ext/run.sh                     |  0
 test/{ => others}/mounts/mounts.py                      |  0
 test/{ => others}/mounts/mounts.sh                      |  0
 test/{ => others}/mounts/run.sh                         |  2 +-
 test/{ => others}/overlayfs/Makefile                    |  0
 test/{ => others}/overlayfs/run.sh                      |  0
 test/{ => others}/pipes/Makefile                        |  0
 test/{ => others}/pipes/pipe.c                          |  2 +-
 test/{ => others}/rpc/.gitignore                        |  0
 test/{ => others}/rpc/Makefile                          |  4 ++--
 test/{ => others}/rpc/errno.py                          |  0
 test/{ => others}/rpc/loop.sh                           |  0
 test/{ => others}/rpc/ps_test.py                        |  0
 test/{ => others}/rpc/restore-loop.py                   |  0
 test/others/rpc/rpc.proto                               |  1 +
 test/{ => others}/rpc/run.sh                            |  0
 test/{ => others}/rpc/test-c.c                          |  0
 test/{ => others}/rpc/test.py                           |  0
 test/{ => others}/security/Makefile                     |  4 ++--
 test/{ => others}/security/loop.sh                      |  0
 test/{ => others}/security/run.sh                       |  0
 test/{ => others}/socketpairs/Makefile                  |  0
 test/{ => others}/socketpairs/socketpair.c              |  0
 test/{ => others}/tcp/Makefile                          |  0
 test/{ => others}/tcp/cln.c                             |  0
 test/{ => others}/tcp/run.sh                            |  2 +-
 test/{ => others}/tcp/srv.c                             |  0
 test/{ => others}/unix-callback/Makefile                |  0
 test/{ => others}/unix-callback/lib/syslog-lib.so       |  0
 test/{ => others}/unix-callback/lib/unix-lib.so         |  0
 test/{ => others}/unix-callback/run.sh                  |  0
 test/{ => others}/unix-callback/syslog-lib.c            |  0
 test/{ => others}/unix-callback/unix-client.c           |  0
 test/{ => others}/unix-callback/unix-lib.c              |  0
 test/{ => others}/unix-callback/unix-server.c           |  0
 test/{ => others}/unix-callback/unix.proto              |  0
 test/rpc/rpc.proto                                      |  1 -
 73 files changed, 43 insertions(+), 42 deletions(-)
 delete mode 100644 test/fault-injection/Makefile
 rename test/{ => others}/bers/Makefile (100%)
 rename test/{ => others}/bers/bers.c (100%)
 rename test/{ => others}/bers/bers.txt (100%)
 rename test/{ => others}/ext-links/Makefile (72%)
 rename test/{ => others}/ext-links/addmv.sh (100%)
 rename test/{ => others}/ext-links/addmv_raw.sh (100%)
 rename test/{ => others}/ext-links/mvlink.c (100%)
 rename test/{ => others}/ext-links/run.sh (97%)
 rename test/{ => others}/ext-links/run_ns.sh (100%)
 rename test/{ => others}/ext-links/run_wait.sh (100%)
 rename test/{ => others}/ext-tty/run.py (75%)
 create mode 100644 test/others/fault-injection/Makefile
 rename test/{ => others}/fault-injection/parasite.stp (100%)
 rename test/{ => others}/libcriu/.gitignore (100%)
 rename test/{ => others}/libcriu/Makefile (66%)
 rename test/{ => others}/libcriu/lib.c (100%)
 rename test/{ => others}/libcriu/lib.h (100%)
 rename test/{ => others}/libcriu/run.sh (88%)
 rename test/{ => others}/libcriu/test_errno.c (100%)
 rename test/{ => others}/libcriu/test_iters.c (100%)
 rename test/{ => others}/libcriu/test_notify.c (100%)
 rename test/{ => others}/libcriu/test_self.c (100%)
 rename test/{ => others}/libcriu/test_sub.c (100%)
 rename test/{ => others}/mem-snap/Makefile (100%)
 rename test/{ => others}/mem-snap/run-predump-2.sh (93%)
 rename test/{ => others}/mem-snap/run-predump.sh (94%)
 rename test/{ => others}/mem-snap/run-snap-auto-dedup.sh (95%)
 rename test/{ => others}/mem-snap/run-snap-dedup-on-restore.sh (95%)
 rename test/{ => others}/mem-snap/run-snap-dedup.sh (96%)
 rename test/{ => others}/mem-snap/run-snap-maps04.sh (80%)
 rename test/{ => others}/mem-snap/run-snap.sh (94%)
 rename test/{ => others}/mem-snap/run.sh (100%)
 rename test/{ => others}/mounts/ext/Makefile (100%)
 rename test/{ => others}/mounts/ext/ext-mount.c (100%)
 rename test/{ => others}/mounts/ext/ns_init.c (100%)
 rename test/{ => others}/mounts/ext/run.sh (100%)
 rename test/{ => others}/mounts/mounts.py (100%)
 rename test/{ => others}/mounts/mounts.sh (100%)
 rename test/{ => others}/mounts/run.sh (95%)
 rename test/{ => others}/overlayfs/Makefile (100%)
 rename test/{ => others}/overlayfs/run.sh (100%)
 rename test/{ => others}/pipes/Makefile (100%)
 rename test/{ => others}/pipes/pipe.c (99%)
 rename test/{ => others}/rpc/.gitignore (100%)
 rename test/{ => others}/rpc/Makefile (90%)
 rename test/{ => others}/rpc/errno.py (100%)
 rename test/{ => others}/rpc/loop.sh (100%)
 rename test/{ => others}/rpc/ps_test.py (100%)
 rename test/{ => others}/rpc/restore-loop.py (100%)
 create mode 120000 test/others/rpc/rpc.proto
 rename test/{ => others}/rpc/run.sh (100%)
 rename test/{ => others}/rpc/test-c.c (100%)
 rename test/{ => others}/rpc/test.py (100%)
 rename test/{ => others}/security/Makefile (90%)
 rename test/{ => others}/security/loop.sh (100%)
 rename test/{ => others}/security/run.sh (100%)
 rename test/{ => others}/socketpairs/Makefile (100%)
 rename test/{ => others}/socketpairs/socketpair.c (100%)
 rename test/{ => others}/tcp/Makefile (100%)
 rename test/{ => others}/tcp/cln.c (100%)
 rename test/{ => others}/tcp/run.sh (97%)
 rename test/{ => others}/tcp/srv.c (100%)
 rename test/{ => others}/unix-callback/Makefile (100%)
 rename test/{ => others}/unix-callback/lib/syslog-lib.so (100%)
 rename test/{ => others}/unix-callback/lib/unix-lib.so (100%)
 rename test/{ => others}/unix-callback/run.sh (100%)
 rename test/{ => others}/unix-callback/syslog-lib.c (100%)
 rename test/{ => others}/unix-callback/unix-client.c (100%)
 rename test/{ => others}/unix-callback/unix-lib.c (100%)
 rename test/{ => others}/unix-callback/unix-server.c (100%)
 rename test/{ => others}/unix-callback/unix.proto (100%)
 delete mode 120000 test/rpc/rpc.proto

diff --git a/test/fault-injection/Makefile b/test/fault-injection/Makefile
deleted file mode 100644
index 1b31e8a..0000000
--- a/test/fault-injection/Makefile
+++ /dev/null
@@ -1,2 +0,0 @@
-all:
-	stap -g -d ../../criu/criu parasite.stp $$RANDOM -c 'bash -x ../zdtm.sh -d -x socket-tcp'
diff --git a/test/bers/Makefile b/test/others/bers/Makefile
similarity index 100%
rename from test/bers/Makefile
rename to test/others/bers/Makefile
diff --git a/test/bers/bers.c b/test/others/bers/bers.c
similarity index 100%
rename from test/bers/bers.c
rename to test/others/bers/bers.c
diff --git a/test/bers/bers.txt b/test/others/bers/bers.txt
similarity index 100%
rename from test/bers/bers.txt
rename to test/others/bers/bers.txt
diff --git a/test/ext-links/Makefile b/test/others/ext-links/Makefile
similarity index 72%
rename from test/ext-links/Makefile
rename to test/others/ext-links/Makefile
index 6b32c25..236a97d 100644
--- a/test/ext-links/Makefile
+++ b/test/others/ext-links/Makefile
@@ -1,4 +1,4 @@
 all: mvlink.so
 
 mvlink.so: mvlink.c
-	gcc -g -Werror -Wall -shared -nostartfiles mvlink.c -o mvlink.so -iquote ../../include -fPIC
+	gcc -g -Werror -Wall -shared -nostartfiles mvlink.c -o mvlink.so -iquote ../../../criu/include -fPIC
diff --git a/test/ext-links/addmv.sh b/test/others/ext-links/addmv.sh
similarity index 100%
rename from test/ext-links/addmv.sh
rename to test/others/ext-links/addmv.sh
diff --git a/test/ext-links/addmv_raw.sh b/test/others/ext-links/addmv_raw.sh
similarity index 100%
rename from test/ext-links/addmv_raw.sh
rename to test/others/ext-links/addmv_raw.sh
diff --git a/test/ext-links/mvlink.c b/test/others/ext-links/mvlink.c
similarity index 100%
rename from test/ext-links/mvlink.c
rename to test/others/ext-links/mvlink.c
diff --git a/test/ext-links/run.sh b/test/others/ext-links/run.sh
similarity index 97%
rename from test/ext-links/run.sh
rename to test/others/ext-links/run.sh
index a48b73a..82fa393 100755
--- a/test/ext-links/run.sh
+++ b/test/others/ext-links/run.sh
@@ -5,7 +5,7 @@ mvln="mv0"
 finf="finish"
 outf="ns_output"
 pidf="ns_pid"
-criu="../../criu/criu"
+criu="../../../criu/criu"
 
 export ip
 export mvln
diff --git a/test/ext-links/run_ns.sh b/test/others/ext-links/run_ns.sh
similarity index 100%
rename from test/ext-links/run_ns.sh
rename to test/others/ext-links/run_ns.sh
diff --git a/test/ext-links/run_wait.sh b/test/others/ext-links/run_wait.sh
similarity index 100%
rename from test/ext-links/run_wait.sh
rename to test/others/ext-links/run_wait.sh
diff --git a/test/ext-tty/run.py b/test/others/ext-tty/run.py
similarity index 75%
rename from test/ext-tty/run.py
rename to test/others/ext-tty/run.py
index 16fe0f6..22288e3 100755
--- a/test/ext-tty/run.py
+++ b/test/others/ext-tty/run.py
@@ -11,7 +11,7 @@ ttyid = "tty[%x:%x]" % (st.st_rdev, st.st_dev)
 os.close(slave)
 time.sleep(1)
 
-ret = subprocess.Popen(["../../criu/criu", "dump", "-t", str(p.pid), "-v4", "--external", ttyid]).wait()
+ret = subprocess.Popen(["../../../criu/criu", "dump", "-t", str(p.pid), "-v4", "--external", ttyid]).wait()
 if ret:
 	sys.exit(ret)
 p.wait()
@@ -21,7 +21,7 @@ os.close(master)
 
 ttyid = "fd[%d]:tty[%x:%x]" % (slave, st.st_rdev, st.st_dev)
 
-ret = subprocess.Popen(["../../criu/criu", "restore", "-v4", "--inherit-fd", ttyid, "--restore-sibling", "--restore-detach"]).wait()
+ret = subprocess.Popen(["../../../criu/criu", "restore", "-v4", "--inherit-fd", ttyid, "--restore-sibling", "--restore-detach"]).wait()
 if ret:
 	sys.exit(ret)
 os.close(slave)
diff --git a/test/others/fault-injection/Makefile b/test/others/fault-injection/Makefile
new file mode 100644
index 0000000..23257eb
--- /dev/null
+++ b/test/others/fault-injection/Makefile
@@ -0,0 +1,2 @@
+all:
+	stap -g -d ../../../criu/criu parasite.stp $$RANDOM -c 'bash -x ../zdtm.sh -d -x socket-tcp'
diff --git a/test/fault-injection/parasite.stp b/test/others/fault-injection/parasite.stp
similarity index 100%
rename from test/fault-injection/parasite.stp
rename to test/others/fault-injection/parasite.stp
diff --git a/test/libcriu/.gitignore b/test/others/libcriu/.gitignore
similarity index 100%
rename from test/libcriu/.gitignore
rename to test/others/libcriu/.gitignore
diff --git a/test/libcriu/Makefile b/test/others/libcriu/Makefile
similarity index 66%
rename from test/libcriu/Makefile
rename to test/others/libcriu/Makefile
index 459ae61..d828f7e 100644
--- a/test/libcriu/Makefile
+++ b/test/others/libcriu/Makefile
@@ -11,13 +11,13 @@ run: all
 
 define genb
 $(1): $(1).o lib.o
-	gcc $$^ -L ../../lib -L ../../protobuf -lcriu -o $$@
+	gcc $$^ -L ../../../../criu/lib/c/ -L ../../../../criu/images/ -lcriu -o $$@
 endef
 
 $(foreach t, $(TESTS), $(eval $(call genb, $(t))))
 
 %.o: %.c
-	gcc -c $^ -I../../lib/ -I../../protobuf -o $@ -Werror
+	gcc -c $^ -I../../../../criu/lib/c/ -I../../../../criu/images/ -o $@ -Werror
 
 clean:
 	rm -rf $(TESTS) $(TESTS:%=%.o) lib.o
diff --git a/test/libcriu/lib.c b/test/others/libcriu/lib.c
similarity index 100%
rename from test/libcriu/lib.c
rename to test/others/libcriu/lib.c
diff --git a/test/libcriu/lib.h b/test/others/libcriu/lib.h
similarity index 100%
rename from test/libcriu/lib.h
rename to test/others/libcriu/lib.h
diff --git a/test/libcriu/run.sh b/test/others/libcriu/run.sh
similarity index 88%
rename from test/libcriu/run.sh
rename to test/others/libcriu/run.sh
index 51ed141..f7b3b68 100755
--- a/test/libcriu/run.sh
+++ b/test/others/libcriu/run.sh
@@ -1,6 +1,7 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+set -x
+source ../../env.sh || exit 1
 
 echo "== Clean"
 make clean
@@ -11,7 +12,7 @@ echo "== Prepare"
 mkdir -p wdir/i/
 
 echo "== Run tests"
-ln -s ../../lib/libcriu.so libcriu.so.1
+ln -s ../../../../criu/lib/c/libcriu.so libcriu.so.1
 export LD_LIBRARY_PATH=.
 export PATH="`dirname ${BASH_SOURCE[0]}`/../../:$PATH"
 
diff --git a/test/libcriu/test_errno.c b/test/others/libcriu/test_errno.c
similarity index 100%
rename from test/libcriu/test_errno.c
rename to test/others/libcriu/test_errno.c
diff --git a/test/libcriu/test_iters.c b/test/others/libcriu/test_iters.c
similarity index 100%
rename from test/libcriu/test_iters.c
rename to test/others/libcriu/test_iters.c
diff --git a/test/libcriu/test_notify.c b/test/others/libcriu/test_notify.c
similarity index 100%
rename from test/libcriu/test_notify.c
rename to test/others/libcriu/test_notify.c
diff --git a/test/libcriu/test_self.c b/test/others/libcriu/test_self.c
similarity index 100%
rename from test/libcriu/test_self.c
rename to test/others/libcriu/test_self.c
diff --git a/test/libcriu/test_sub.c b/test/others/libcriu/test_sub.c
similarity index 100%
rename from test/libcriu/test_sub.c
rename to test/others/libcriu/test_sub.c
diff --git a/test/mem-snap/Makefile b/test/others/mem-snap/Makefile
similarity index 100%
rename from test/mem-snap/Makefile
rename to test/others/mem-snap/Makefile
diff --git a/test/mem-snap/run-predump-2.sh b/test/others/mem-snap/run-predump-2.sh
similarity index 93%
rename from test/mem-snap/run-predump-2.sh
rename to test/others/mem-snap/run-predump-2.sh
index 2717cde..809612e 100755
--- a/test/mem-snap/run-predump-2.sh
+++ b/test/others/mem-snap/run-predump-2.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 function fail {
 	echo "$@"
@@ -15,7 +15,7 @@ mkdir "$IMGDIR"
 
 function launch_test {
 	echo "Launching test"
-	cd ../zdtm/live/static/
+	cd ../../zdtm/live/static/
 	make cleanout
 	make maps04
 	make maps04.pid || fail "Can't start test"
@@ -26,7 +26,7 @@ function launch_test {
 
 function stop_test {
 	wtime=1
-	cd ../zdtm/live/static/
+	cd ../../zdtm/live/static/
 	make maps04.stop
 	cat maps04.out | fgrep PASS || fail "Test failed"
 	echo "OK"
diff --git a/test/mem-snap/run-predump.sh b/test/others/mem-snap/run-predump.sh
similarity index 94%
rename from test/mem-snap/run-predump.sh
rename to test/others/mem-snap/run-predump.sh
index e25ccfd..073784a 100755
--- a/test/mem-snap/run-predump.sh
+++ b/test/others/mem-snap/run-predump.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -26,7 +26,7 @@ rm -rf "$IMGDIR"
 mkdir "$IMGDIR"
 
 echo "Launching test"
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make cleanout
 make mem-touch
 make mem-touch.pid || fail "Can't start test"
@@ -70,7 +70,7 @@ done
 echo "Restoring"
 ${CRIU} restore -D "${IMGDIR}/$NRSNAP/" -o restore.log -d -v4 || fail "Fail to restore server"
 
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make mem-touch.stop
 cat mem-touch.out | fgrep PASS || fail "Test failed"
 
diff --git a/test/mem-snap/run-snap-auto-dedup.sh b/test/others/mem-snap/run-snap-auto-dedup.sh
similarity index 95%
rename from test/mem-snap/run-snap-auto-dedup.sh
rename to test/others/mem-snap/run-snap-auto-dedup.sh
index f4eb119..c0d8779 100755
--- a/test/mem-snap/run-snap-auto-dedup.sh
+++ b/test/others/mem-snap/run-snap-auto-dedup.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -26,7 +26,7 @@ rm -rf "$IMGDIR"
 mkdir "$IMGDIR"
 
 echo "Launching test"
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make cleanout
 make mem-touch
 make mem-touch.pid || fail "Can't start test"
@@ -82,7 +82,7 @@ fi
 echo "Restoring"
 ${CRIU} restore -D "${IMGDIR}/$NRSNAP/" -o restore.log -d -v4 || fail "Fail to restore server"
 
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make mem-touch.stop
 cat mem-touch.out | fgrep PASS || fail "Test failed"
 
diff --git a/test/mem-snap/run-snap-dedup-on-restore.sh b/test/others/mem-snap/run-snap-dedup-on-restore.sh
similarity index 95%
rename from test/mem-snap/run-snap-dedup-on-restore.sh
rename to test/others/mem-snap/run-snap-dedup-on-restore.sh
index 7bfdf0e..5821d8a 100755
--- a/test/mem-snap/run-snap-dedup-on-restore.sh
+++ b/test/others/mem-snap/run-snap-dedup-on-restore.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -26,7 +26,7 @@ rm -rf "$IMGDIR"
 mkdir "$IMGDIR"
 
 echo "Launching test"
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make cleanout
 make mem-touch
 make mem-touch.pid || fail "Can't start test"
@@ -76,7 +76,7 @@ if [[ $size_last1 -ne 0 || $size_last2 -ne 0 || $size_last3 -ne 0 ]]; then
 	restore_dedup_ok=1
 fi
 
-cd ../zdtm/live/static/
+cd ../../zdtm//live/static/
 make mem-touch.stop
 cat mem-touch.out | fgrep PASS || fail "Test failed"
 
diff --git a/test/mem-snap/run-snap-dedup.sh b/test/others/mem-snap/run-snap-dedup.sh
similarity index 96%
rename from test/mem-snap/run-snap-dedup.sh
rename to test/others/mem-snap/run-snap-dedup.sh
index 762e202..f59342e 100755
--- a/test/mem-snap/run-snap-dedup.sh
+++ b/test/others/mem-snap/run-snap-dedup.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -26,7 +26,7 @@ rm -rf "$IMGDIR"
 mkdir "$IMGDIR"
 
 echo "Launching test"
-cd ../zdtm/live/static/
+cd ../../zdtm/live/static/
 make cleanout
 make mem-touch
 make mem-touch.pid || fail "Can't start test"
@@ -88,7 +88,7 @@ fi
 echo "Restoring"
 ${CRIU} restore -D "${IMGDIR}/$NRSNAP/" -o restore.log -d -v4 || fail "Fail to restore server"
 
-cd ../zdtm/live/static/
+cd ../../zdtm/live/static/
 make mem-touch.stop
 cat mem-touch.out | fgrep PASS || fail "Test failed"
 
diff --git a/test/mem-snap/run-snap-maps04.sh b/test/others/mem-snap/run-snap-maps04.sh
similarity index 80%
rename from test/mem-snap/run-snap-maps04.sh
rename to test/others/mem-snap/run-snap-maps04.sh
index 5bd75f3..97c4939 100755
--- a/test/mem-snap/run-snap-maps04.sh
+++ b/test/others/mem-snap/run-snap-maps04.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -31,10 +31,10 @@ fi
 rm -rf "$IMGDIR/*"
 
 echo "Launching test"
-make -C ../zdtm/live/static/ cleanout
-make -C ../zdtm/live/static/ maps04
-make -C ../zdtm/live/static/ maps04.pid || fail "Can't start test"
-PID=$(cat ../zdtm/live/static/maps04.pid)
+make -C ../../zdtm//live/static/ cleanout
+make -C ../../zdtm//live/static/ maps04
+make -C ../../zdtm//live/static/ maps04.pid || fail "Can't start test"
+PID=$(cat ../../zdtm//live/static/maps04.pid)
 kill -0 $PID || fail "Test haven't started"
 
 mkdir "$IMGDIR/$NRSNAP/"
@@ -55,7 +55,7 @@ fi
 echo "Restoring"
 ${CRIU} restore -D "${IMGDIR}/$NRSNAP/" -o restore.log --auto-dedup -d -v4 || fail "Fail to restore"
 
-make -C ../zdtm/live/static/ maps04.stop
+make -C ../../zdtm//live/static/ maps04.stop
 sleep 1
 
 cat "../zdtm/live/static/maps04.out" | fgrep PASS || fail "Test failed"
diff --git a/test/mem-snap/run-snap.sh b/test/others/mem-snap/run-snap.sh
similarity index 94%
rename from test/mem-snap/run-snap.sh
rename to test/others/mem-snap/run-snap.sh
index 38496a2..6aca4d9 100755
--- a/test/mem-snap/run-snap.sh
+++ b/test/others/mem-snap/run-snap.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 USEPS=0
 
@@ -26,7 +26,7 @@ rm -rf "$IMGDIR"
 mkdir "$IMGDIR"
 
 echo "Launching test"
-cd ../zdtm/live/static/
+cd ../../zdtm/live/static/
 make cleanout
 make mem-touch
 make mem-touch.pid || fail "Can't start test"
@@ -67,7 +67,7 @@ done
 echo "Restoring"
 ${CRIU} restore -D "${IMGDIR}/$NRSNAP/" -o restore.log -d -v4 || fail "Fail to restore server"
 
-cd ../zdtm/live/static/
+cd ../../zdtm/live/static/
 make mem-touch.stop
 cat mem-touch.out | fgrep PASS || fail "Test failed"
 
diff --git a/test/mem-snap/run.sh b/test/others/mem-snap/run.sh
similarity index 100%
rename from test/mem-snap/run.sh
rename to test/others/mem-snap/run.sh
diff --git a/test/mounts/ext/Makefile b/test/others/mounts/ext/Makefile
similarity index 100%
rename from test/mounts/ext/Makefile
rename to test/others/mounts/ext/Makefile
diff --git a/test/mounts/ext/ext-mount.c b/test/others/mounts/ext/ext-mount.c
similarity index 100%
rename from test/mounts/ext/ext-mount.c
rename to test/others/mounts/ext/ext-mount.c
diff --git a/test/mounts/ext/ns_init.c b/test/others/mounts/ext/ns_init.c
similarity index 100%
rename from test/mounts/ext/ns_init.c
rename to test/others/mounts/ext/ns_init.c
diff --git a/test/mounts/ext/run.sh b/test/others/mounts/ext/run.sh
similarity index 100%
rename from test/mounts/ext/run.sh
rename to test/others/mounts/ext/run.sh
diff --git a/test/mounts/mounts.py b/test/others/mounts/mounts.py
similarity index 100%
rename from test/mounts/mounts.py
rename to test/others/mounts/mounts.py
diff --git a/test/mounts/mounts.sh b/test/others/mounts/mounts.sh
similarity index 100%
rename from test/mounts/mounts.sh
rename to test/others/mounts/mounts.sh
diff --git a/test/mounts/run.sh b/test/others/mounts/run.sh
similarity index 95%
rename from test/mounts/run.sh
rename to test/others/mounts/run.sh
index 23d05e5..6428239 100755
--- a/test/mounts/run.sh
+++ b/test/others/mounts/run.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-CRIU=../../criu
+CRIU=../../../criu
 set -x
 
 mkdir -p dump
diff --git a/test/overlayfs/Makefile b/test/others/overlayfs/Makefile
similarity index 100%
rename from test/overlayfs/Makefile
rename to test/others/overlayfs/Makefile
diff --git a/test/overlayfs/run.sh b/test/others/overlayfs/run.sh
similarity index 100%
rename from test/overlayfs/run.sh
rename to test/others/overlayfs/run.sh
diff --git a/test/pipes/Makefile b/test/others/pipes/Makefile
similarity index 100%
rename from test/pipes/Makefile
rename to test/others/pipes/Makefile
diff --git a/test/pipes/pipe.c b/test/others/pipes/pipe.c
similarity index 99%
rename from test/pipes/pipe.c
rename to test/others/pipes/pipe.c
index 28b6c99..33ec60e 100644
--- a/test/pipes/pipe.c
+++ b/test/others/pipes/pipe.c
@@ -84,7 +84,7 @@ typedef unsigned long ulong;
 
 #define MAX_FORKS	3	/* child, checkpoint, restore */
 
-#define CRIU_BINARY		"../../criu"
+#define CRIU_BINARY		"../../../criu/criu"
 #define IMG_DIR			"images"
 #define DUMP_LOG_FILE		"dump.log"
 #define RESTORE_LOG_FILE	"restore.log"
diff --git a/test/rpc/.gitignore b/test/others/rpc/.gitignore
similarity index 100%
rename from test/rpc/.gitignore
rename to test/others/rpc/.gitignore
diff --git a/test/rpc/Makefile b/test/others/rpc/Makefile
similarity index 90%
rename from test/rpc/Makefile
rename to test/others/rpc/Makefile
index 88b9f36..8bd663e 100644
--- a/test/rpc/Makefile
+++ b/test/others/rpc/Makefile
@@ -9,8 +9,8 @@ run: all
 	chmod a+rwx build
 	sudo -g '#1000' -u '#1000' ./run.sh
 
-criu: ../../criu/criu
-	cp ../../criu/criu $@
+criu: ../../../criu/criu
+	cp ../../../criu/criu $@
 	chmod u+s $@
 
 test-c: rpc.pb-c.o test-c.o
diff --git a/test/rpc/errno.py b/test/others/rpc/errno.py
similarity index 100%
rename from test/rpc/errno.py
rename to test/others/rpc/errno.py
diff --git a/test/rpc/loop.sh b/test/others/rpc/loop.sh
similarity index 100%
rename from test/rpc/loop.sh
rename to test/others/rpc/loop.sh
diff --git a/test/rpc/ps_test.py b/test/others/rpc/ps_test.py
similarity index 100%
rename from test/rpc/ps_test.py
rename to test/others/rpc/ps_test.py
diff --git a/test/rpc/restore-loop.py b/test/others/rpc/restore-loop.py
similarity index 100%
rename from test/rpc/restore-loop.py
rename to test/others/rpc/restore-loop.py
diff --git a/test/others/rpc/rpc.proto b/test/others/rpc/rpc.proto
new file mode 120000
index 0000000..f65c529
--- /dev/null
+++ b/test/others/rpc/rpc.proto
@@ -0,0 +1 @@
+../../../images/rpc.proto
\ No newline at end of file
diff --git a/test/rpc/run.sh b/test/others/rpc/run.sh
similarity index 100%
rename from test/rpc/run.sh
rename to test/others/rpc/run.sh
diff --git a/test/rpc/test-c.c b/test/others/rpc/test-c.c
similarity index 100%
rename from test/rpc/test-c.c
rename to test/others/rpc/test-c.c
diff --git a/test/rpc/test.py b/test/others/rpc/test.py
similarity index 100%
rename from test/rpc/test.py
rename to test/others/rpc/test.py
diff --git a/test/security/Makefile b/test/others/security/Makefile
similarity index 90%
rename from test/security/Makefile
rename to test/others/security/Makefile
index 6eaece1..1b9120d 100644
--- a/test/security/Makefile
+++ b/test/others/security/Makefile
@@ -13,10 +13,10 @@ export DIR LOOP PIDFILE IMGS CRIU ROOT USR1 USR2
 run: testdir users
 	./run.sh
 
-testdir: ../../criu/criu
+testdir: ../../../criu/criu
 	mkdir -p $(DIR)
 	mkdir -p $(IMGS)
-	cp ../../criu/criu $(CRIU)
+	cp ../../../criu/criu $(CRIU)
 	chmod u+s $(CRIU)
 	cp loop.sh $(LOOP)
 	chmod 777 $(DIR)
diff --git a/test/security/loop.sh b/test/others/security/loop.sh
similarity index 100%
rename from test/security/loop.sh
rename to test/others/security/loop.sh
diff --git a/test/security/run.sh b/test/others/security/run.sh
similarity index 100%
rename from test/security/run.sh
rename to test/others/security/run.sh
diff --git a/test/socketpairs/Makefile b/test/others/socketpairs/Makefile
similarity index 100%
rename from test/socketpairs/Makefile
rename to test/others/socketpairs/Makefile
diff --git a/test/socketpairs/socketpair.c b/test/others/socketpairs/socketpair.c
similarity index 100%
rename from test/socketpairs/socketpair.c
rename to test/others/socketpairs/socketpair.c
diff --git a/test/tcp/Makefile b/test/others/tcp/Makefile
similarity index 100%
rename from test/tcp/Makefile
rename to test/others/tcp/Makefile
diff --git a/test/tcp/cln.c b/test/others/tcp/cln.c
similarity index 100%
rename from test/tcp/cln.c
rename to test/others/tcp/cln.c
diff --git a/test/tcp/run.sh b/test/others/tcp/run.sh
similarity index 97%
rename from test/tcp/run.sh
rename to test/others/tcp/run.sh
index 702879d..c7f86a0 100755
--- a/test/tcp/run.sh
+++ b/test/others/tcp/run.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-source ../env.sh || exit 1
+source ../../env.sh || exit 1
 
 set -x
 
diff --git a/test/tcp/srv.c b/test/others/tcp/srv.c
similarity index 100%
rename from test/tcp/srv.c
rename to test/others/tcp/srv.c
diff --git a/test/unix-callback/Makefile b/test/others/unix-callback/Makefile
similarity index 100%
rename from test/unix-callback/Makefile
rename to test/others/unix-callback/Makefile
diff --git a/test/unix-callback/lib/syslog-lib.so b/test/others/unix-callback/lib/syslog-lib.so
similarity index 100%
rename from test/unix-callback/lib/syslog-lib.so
rename to test/others/unix-callback/lib/syslog-lib.so
diff --git a/test/unix-callback/lib/unix-lib.so b/test/others/unix-callback/lib/unix-lib.so
similarity index 100%
rename from test/unix-callback/lib/unix-lib.so
rename to test/others/unix-callback/lib/unix-lib.so
diff --git a/test/unix-callback/run.sh b/test/others/unix-callback/run.sh
similarity index 100%
rename from test/unix-callback/run.sh
rename to test/others/unix-callback/run.sh
diff --git a/test/unix-callback/syslog-lib.c b/test/others/unix-callback/syslog-lib.c
similarity index 100%
rename from test/unix-callback/syslog-lib.c
rename to test/others/unix-callback/syslog-lib.c
diff --git a/test/unix-callback/unix-client.c b/test/others/unix-callback/unix-client.c
similarity index 100%
rename from test/unix-callback/unix-client.c
rename to test/others/unix-callback/unix-client.c
diff --git a/test/unix-callback/unix-lib.c b/test/others/unix-callback/unix-lib.c
similarity index 100%
rename from test/unix-callback/unix-lib.c
rename to test/others/unix-callback/unix-lib.c
diff --git a/test/unix-callback/unix-server.c b/test/others/unix-callback/unix-server.c
similarity index 100%
rename from test/unix-callback/unix-server.c
rename to test/others/unix-callback/unix-server.c
diff --git a/test/unix-callback/unix.proto b/test/others/unix-callback/unix.proto
similarity index 100%
rename from test/unix-callback/unix.proto
rename to test/others/unix-callback/unix.proto
diff --git a/test/rpc/rpc.proto b/test/rpc/rpc.proto
deleted file mode 120000
index bc0b0df..0000000
--- a/test/rpc/rpc.proto
+++ /dev/null
@@ -1 +0,0 @@
-../../protobuf/rpc.proto
\ No newline at end of file
-- 
2.5.0



More information about the CRIU mailing list