[CRIU] [PATCH] zdtm.sh: add ability to test pre-dump
Andrey Vagin
avagin at openvz.org
Mon Jan 13 12:53:30 PST 2014
./test/zdtm.sh -s -i 2 -P ns/static/env00
Signed-off-by: Andrey Vagin <avagin at openvz.org>
---
test/zdtm.sh | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/test/zdtm.sh b/test/zdtm.sh
index 695c3fc..60b6529 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -454,6 +454,7 @@ EOF
for i in `seq $ITERATIONS`; do
local dump_only=
local postdump=
+ local dump_cmd="dump"
ddump=`readlink -fm dump/$tname/$PID/$i`
DUMP_PATH=$ddump
echo Dump $PID
@@ -476,6 +477,7 @@ EOF
if [ "$i" -ne "$ITERATIONS" ]; then
snapopt="$snapopt -R --track-mem"
dump_only=1
+ [ -n "$PRE_DUMP" ] && dump_cmd="pre-dump"
fi
[ -n "$snappdir" ] && snapopt="$snapopt --prev-images-dir=$snappdir"
fi
@@ -486,7 +488,7 @@ EOF
save_fds $PID $ddump/dump.fd
save_maps $PID $ddump/dump.maps
- setsid $CRIU_CPT dump $opts --file-locks --tcp-established $linkremap \
+ setsid $CRIU_CPT $dump_cmd $opts --file-locks --tcp-established $linkremap \
-x --evasive-devices -D $ddump -o dump.log -v4 -t $PID $args $ARGS $snapopt $postdump
retcode=$?
@@ -672,6 +674,8 @@ Options:
-n : Batch test
-r : Run test with specified name directly without match or check
-v : Verbose mode
+ -P : Test pre-dump
+ -s : Test snapshots
EOF
}
@@ -733,6 +737,11 @@ while :; do
SNAPSHOT=1
shift
;;
+ -P)
+ PRE_DUMP=1
+ SNAPSHOT=1
+ shift
+ ;;
-g)
COMPILE_ONLY=1
shift
--
1.8.3.1
More information about the CRIU
mailing list