Commit 2cb4532e authored by Andrew Vagin's avatar Andrew Vagin Committed by Pavel Emelyanov

tests: remove zdtm.sh (v2)

It was replaced by zdtm.py.

v2: remove zdtm.sh from other scripts
    remove fault-injection, because nobody uses it
Signed-off-by: 's avatarAndrew Vagin <avagin@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 88aaae3a
...@@ -201,7 +201,7 @@ docker-build: ...@@ -201,7 +201,7 @@ docker-build:
PHONY += docker-build PHONY += docker-build
docker-test: docker-test:
docker run --rm -it --privileged criu-x86_64 ./test/zdtm.sh -C -x tcp6 -x tcpbuf6 -x static/rtc -x cgroup -x mountpoint docker run --rm -it --privileged criu-x86_64 ./test/zdtm.py run -a -x tcp6 -x tcpbuf6 -x static/rtc -x cgroup
PHONY += docker-test PHONY += docker-test
help: help:
......
source `dirname $0`/criu-lib.sh &&
prep &&
bash ./test/zdtm.sh -C -x '\(fpu\|mmx\|sse\|rtc\|ext_auto\)' &&
true || fail
import sys
start = 0;
end = 0;
for l in sys.stdin:
l = l.split()[0]
s, e = l.split('-')
s = int("0x" + s, 0)
e = int("0x" + e, 0)
if end == s:
end = e;
else:
print "%x-%x" % (start, end)
start = s
end = e
print "%x-%x" % (start, end)
all:
stap -g -d ../../../criu/criu parasite.stp $$RANDOM -c 'bash -x ../zdtm.sh -d -x socket-tcp'
global i, n, fini_cmd = -1, last_cmd
probe process("../../criu/criu").begin
{
i = 0;
/* randint() returns numbers multiple of 5 */
n = randint(20 * 5) / 5
printf("The %d command will be replaced on -1\n", n);
}
probe process("../../criu/criu").function("__parasite_execute_daemon")
{
printf("%s\n", $$parms);
last_cmd = $cmd;
if (++i > n) {
printf("Send invalid command to parasite\n");
$cmd = -1;
}
}
probe process("../../criu/criu").function("__parasite_execute_daemon").return
{
printf("%d\n", $return);
}
probe process("../../criu/criu").function("main").return
{
printf("CRIU exits with code %d\n", $return);
if ( i > n) {
if ($return)
$return = 0;
else {
printf("CRIU exited with zero code\n");
if (fini_cmd < 0 || fini_cmd == last_cmd) {
printf("%d looks like FINI command\n", n);
fini_cmd = last_cmd
} else {
printf("This is the second FINI command %d (%d)",
n, fini_cmd);
$return = 1;
}
}
}
}
This diff is collapsed.
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