[CRIU] [PATCH] zdtm: add ability to execute restore with the restore_sibling option
Andrey Vagin
avagin at openvz.org
Thu Apr 23 13:38:11 PDT 2015
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/jenkins/criu-sibling.sh | 6 ++++++
test/zdtm.sh | 12 +++++++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
create mode 100644 test/jenkins/criu-sibling.sh
diff --git a/test/jenkins/criu-sibling.sh b/test/jenkins/criu-sibling.sh
new file mode 100644
index 0000000..1e7da66
--- /dev/null
+++ b/test/jenkins/criu-sibling.sh
@@ -0,0 +1,6 @@
+# Make 3 iteration of dump/restore for each test
+
+source `dirname $0`/criu-lib.sh &&
+prep &&
+make -C test -j 4 ZDTM_ARGS="-C --restore-sibling" zdtm &&
+true || fail
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 8839880..2fa51c2 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -349,6 +349,7 @@ START_ONLY=0
BATCH_TEST=0
SPECIFIED_NAME_USED=0
START_FROM="."
+RESTORE_SIBLING=""
zdtm_sep()
{ (
@@ -639,6 +640,7 @@ run_test()
local gen_args=$*
local tname=`basename $test`
local tdir=`dirname $test`
+ local rst_args=
DUMP_PATH=""
if [ $COMPILE_ONLY -eq 1 ]; then
@@ -683,6 +685,10 @@ EOF
ps_args="--auto-dedup"
fi
+ if [ -n "$RESTORE_SIBLING" ]; then
+ rst_args="$rst_args --restore-sibling"
+ fi
+
if echo $tname | fgrep -q 'irmap'; then
gen_args="$gen_args --force-irmap"
fi
@@ -790,7 +796,7 @@ EOF
rm -f $TPID || true
echo Restore
- setsid $CRIU restore -D $ddump -o restore.log -v4 -d $gen_args || return 2
+ setsid $CRIU restore -D $ddump -o restore.log -v4 -d $gen_args $rst_args || return 2
cat $ddump/restore.log* | grep Error
[ -n "$PIDNS" ] && PID=`cat $TPID`
@@ -1061,6 +1067,10 @@ while :; do
}
shift
;;
+ --restore-sibling)
+ RESTORE_SIBLING=1
+ shift
+ ;;
-*)
echo "Unrecognized option $1, aborting!" 1>&2
usage
--
2.1.0
More information about the CRIU
mailing list