mirror of
https://github.com/checkpoint-restore/criu
synced 2025-08-30 22:05:36 +00:00
test: zdtm.py -- Fix criu reference
Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
committed by
Pavel Emelyanov
parent
06a96d22cd
commit
f96718b3e3
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../criu)
|
||||
CRIU=$(readlink -f `dirname ${BASH_SOURCE[0]}`/../criu/criu)
|
||||
criu=$CRIU
|
||||
|
@@ -5,7 +5,7 @@ mvln="mv0"
|
||||
finf="finish"
|
||||
outf="ns_output"
|
||||
pidf="ns_pid"
|
||||
criu="../../criu"
|
||||
criu="../../criu/criu"
|
||||
|
||||
export ip
|
||||
export mvln
|
||||
|
@@ -11,7 +11,7 @@ ttyid = "tty[%x:%x]" % (st.st_rdev, st.st_dev)
|
||||
os.close(slave)
|
||||
time.sleep(1)
|
||||
|
||||
ret = subprocess.Popen(["../../criu", "dump", "-t", str(p.pid), "-v4", "--external", ttyid]).wait()
|
||||
ret = subprocess.Popen(["../../criu/criu", "dump", "-t", str(p.pid), "-v4", "--external", ttyid]).wait()
|
||||
if ret:
|
||||
sys.exit(ret)
|
||||
p.wait()
|
||||
@@ -21,7 +21,7 @@ os.close(master)
|
||||
|
||||
ttyid = "fd[%d]:tty[%x:%x]" % (slave, st.st_rdev, st.st_dev)
|
||||
|
||||
ret = subprocess.Popen(["../../criu", "restore", "-v4", "--inherit-fd", ttyid, "--restore-sibling", "--restore-detach"]).wait()
|
||||
ret = subprocess.Popen(["../../criu/criu", "restore", "-v4", "--inherit-fd", ttyid, "--restore-sibling", "--restore-detach"]).wait()
|
||||
if ret:
|
||||
sys.exit(ret)
|
||||
os.close(slave)
|
||||
|
@@ -1,2 +1,2 @@
|
||||
all:
|
||||
stap -g -d ../../criu parasite.stp $$RANDOM -c 'bash -x ../zdtm.sh -d -x socket-tcp'
|
||||
stap -g -d ../../criu/criu parasite.stp $$RANDOM -c 'bash -x ../zdtm.sh -d -x socket-tcp'
|
||||
|
@@ -1,6 +1,6 @@
|
||||
global i, n, fini_cmd = -1, last_cmd
|
||||
|
||||
probe process("../../criu").begin
|
||||
probe process("../../criu/criu").begin
|
||||
{
|
||||
i = 0;
|
||||
/* randint() returns numbers multiple of 5 */
|
||||
@@ -8,7 +8,7 @@ probe process("../../criu").begin
|
||||
printf("The %d command will be replaced on -1\n", n);
|
||||
}
|
||||
|
||||
probe process("../../criu").function("__parasite_execute_daemon")
|
||||
probe process("../../criu/criu").function("__parasite_execute_daemon")
|
||||
{
|
||||
printf("%s\n", $$parms);
|
||||
last_cmd = $cmd;
|
||||
@@ -18,12 +18,12 @@ probe process("../../criu").function("__parasite_execute_daemon")
|
||||
}
|
||||
}
|
||||
|
||||
probe process("../../criu").function("__parasite_execute_daemon").return
|
||||
probe process("../../criu/criu").function("__parasite_execute_daemon").return
|
||||
{
|
||||
printf("%d\n", $return);
|
||||
}
|
||||
|
||||
probe process("../../criu").function("main").return
|
||||
probe process("../../criu/criu").function("main").return
|
||||
{
|
||||
printf("CRIU exits with code %d\n", $return);
|
||||
if ( i > n) {
|
||||
|
@@ -9,7 +9,7 @@ function fail {
|
||||
|
||||
make || fail "Can't compile library or ns init"
|
||||
|
||||
criu="../../../criu"
|
||||
criu="../../../criu/criu"
|
||||
|
||||
# New root for namespace
|
||||
NSROOT="nsroot"
|
||||
|
@@ -2,7 +2,7 @@
|
||||
|
||||
set -eu
|
||||
|
||||
CRIU=../../../criu
|
||||
CRIU=../../../criu/criu
|
||||
|
||||
setup() {
|
||||
setup_mount
|
||||
|
@@ -9,8 +9,8 @@ run: all
|
||||
chmod a+rwx build
|
||||
sudo -g '#1000' -u '#1000' ./run.sh
|
||||
|
||||
criu: ../../criu
|
||||
cp ../../criu $@
|
||||
criu: ../../criu/criu
|
||||
cp ../../criu/criu $@
|
||||
chmod u+s $@
|
||||
|
||||
test-c: rpc.pb-c.o test-c.o
|
||||
|
@@ -13,10 +13,10 @@ export DIR LOOP PIDFILE IMGS CRIU ROOT USR1 USR2
|
||||
run: testdir users
|
||||
./run.sh
|
||||
|
||||
testdir: ../../criu
|
||||
testdir: ../../criu/criu
|
||||
mkdir -p $(DIR)
|
||||
mkdir -p $(IMGS)
|
||||
cp ../../criu $(CRIU)
|
||||
cp ../../criu/criu $(CRIU)
|
||||
chmod u+s $(CRIU)
|
||||
cp loop.sh $(LOOP)
|
||||
chmod 777 $(DIR)
|
||||
|
@@ -46,7 +46,7 @@ typedef unsigned long ulong;
|
||||
|
||||
#define MAX_FORKS 3 /* child, checkpoint, restore */
|
||||
|
||||
#define CRIU_BINARY "../../criu"
|
||||
#define CRIU_BINARY "../../criu/criu"
|
||||
#define IMG_DIR "images"
|
||||
#define DUMP_LOG_FILE "dump.log"
|
||||
#define RESTORE_LOG_FILE "restore.log"
|
||||
|
@@ -582,7 +582,7 @@ test_classes = { 'zdtm': zdtm_test, 'inhfd': inhfd_test, 'groups': groups_test }
|
||||
# CRIU when launched using CLI
|
||||
#
|
||||
|
||||
criu_bin = "../criu"
|
||||
criu_bin = "../criu/criu"
|
||||
class criu_cli:
|
||||
def __init__(self, opts):
|
||||
self.__test = None
|
||||
|
Reference in New Issue
Block a user