Commit 281f0c7d authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

test/app-emu: dump/restore of VNC server

* Execute VNC server and glxgears
* Dump/restore
* Check, that VNC server accepts connections
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent a519e0c8
set -m
crtools="../../../crtools"
mkdir data
./vnc-server.sh 25 &> data/vnc.log
pid=`jobs -p %1`
bg
$crtools dump -j --tcp-established -D data/ -o dump.log -v 4 -t $pid || {
echo "Dump failed"
exit 1
}
$crtools restore -j --tcp-established -D data/ -d -o restore.log -v 4 -t $pid || {
echo "Restore failed"
exit 1
}
nc -w 1 localhost 5925 | grep -am 1 RFB
ret=$?
kill $pid
[ "$ret" -eq 0 ] && echo PASS || echo FAIL;
exit $ret
#!/bin/bash
#set -x
set -m
Xvnc :25 -v -geometry 500x500 -i 0.0.0.0 -SecurityTypes none &
pid=$!
trap "kill $pid; wait" EXIT
for i in `seq 10`; do
nc -w 1 localhost 5925 | grep -am 1 RFB && break || echo Waiting
kill -0 $pid || exit 1
sleep 1
done
kill -STOP $$
DISPLAY=:25 glxgears
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment