criu/test/app-emu/java/HelloWorld/run.sh
Andrey Vagin f8d6dad7f8 test/app-emu: wait while tasks are dying before starting restore
Otherwise some PID-s may be busy.

Signed-off-by: Andrey Vagin <avagin@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
2012-11-22 19:08:14 +04:00

38 lines
570 B
Bash

#!/bin/bash
source ../../../functions.sh || exit 1
crtools="../../../../crtools"
cleanup_class() {
rm -f ./*.class
}
javac HelloWorld.java || exit 1
set -x
rm -rf dump
mkdir dump
setsid java HelloWorld &
pid=${!}
echo Lanuched java application with pid $pid in background
${crtools} dump -D dump -o dump.log -v 4 --shell-job -t ${pid} || {
echo "Dump failed"
exit 1
}
wait_tasks dump
echo "Dumped, restoring and waiting for completion"
${crtools} restore -D dump -o restore.log -v 4 --shell-job -t ${pid} || {
echo "Restore failed"
exit 1
}
echo PASS