2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-28 04:48:16 +00:00
Andrew Vagin 88aaae3ace tests: move non-zdtm tests to tests/others/
Signed-off-by: Andrew Vagin <avagin@virtuozzo.com>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
2016-02-24 13:09:17 +03:00

49 lines
825 B
Bash
Executable File

#!/bin/bash -x
cd `dirname $0`
source ../env.sh || exit 1
rm -rf /tmp/criu.unix.callback.test*
test -f pid && unlink pid
test -f output && unlink output
rm -rf data
mkdir -p data
./unix-server &
srv_pid=$!
for i in `seq 20`; do
test -f /tmp/criu.unix.callback.test && break
sleep 0.1
done
( setsid ./unix-client < /dev/null &> output ) &
while :; do
test -f pid && break
sleep 1
done
pid=`cat pid`
${CRIU} dump -D data -o dump.log -v4 --lib `pwd`/lib -t $pid || exit 1
kill $srv_pid
wait $srv_pid
unlink /tmp/criu.unix.callback.test
./unix-server &
srv_pid=$!
for i in `seq 20`; do
test -f /tmp/criu.unix.callback.test && break
sleep 0.1
done
${CRIU} restore -D data -o restore.log -v4 --lib `pwd`/lib -d || exit 1
kill $pid
while :; do
cat output | grep PASS && break
sleep 1
done
cat output
kill $srv_pid