mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
zdtm: Test how page server works
When -p is used, launch page server in the same dir as crtools dump is to get fill dump in it. Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
18
test/zdtm.sh
Executable file → Normal file
18
test/zdtm.sh
Executable file → Normal file
@@ -140,6 +140,8 @@ PID=""
|
||||
PIDNS=""
|
||||
|
||||
ITERATIONS=1
|
||||
PAGE_SERVER=0
|
||||
PS_PORT=12345
|
||||
|
||||
check_mainstream()
|
||||
{
|
||||
@@ -308,6 +310,13 @@ EOF
|
||||
echo Dump $PID
|
||||
mkdir -p $ddump
|
||||
|
||||
if [ $PAGE_SERVER -eq 1 ]; then
|
||||
$CRTOOLS page-server -D $ddump -o page_server.log -v 4 --port $PS_PORT &
|
||||
PS_PID=$!
|
||||
opts="--page-server --address 127.0.0.1 --port $PS_PORT"
|
||||
fi
|
||||
|
||||
|
||||
save_fds $PID $ddump/dump.fd
|
||||
setsid $CRTOOLS_CPT dump $opts --file-locks --tcp-established $linkremap \
|
||||
-x --evasive-devices -D $ddump -o dump.log -v 4 -t $PID $args $ARGS || {
|
||||
@@ -315,6 +324,10 @@ EOF
|
||||
return 1
|
||||
}
|
||||
|
||||
if [ $PAGE_SERVER -eq 1 ]; then
|
||||
wait $PS_PID
|
||||
fi
|
||||
|
||||
if expr " $ARGS" : ' -s' > /dev/null; then
|
||||
save_fds $PID $ddump/dump.fd.after
|
||||
diff_fds $ddump/dump.fd $ddump/dump.fd.after || return 1
|
||||
@@ -427,6 +440,11 @@ while :; do
|
||||
$TMP_TREE/test/zdtm.sh "$@"
|
||||
exit
|
||||
fi
|
||||
if [ "$1" = "-p" ]; then
|
||||
shift
|
||||
PAGE_SERVER=1
|
||||
continue;
|
||||
fi
|
||||
break;
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user