[CRIU] [PATCH] tests: Check that no-breakpoints restore works
Pavel Emelyanov
xemul at virtuozzo.com
Wed Apr 27 03:23:04 PDT 2016
Signed-off-by: Pavel Emelyanov <xemul at virtuozzo.com>
---
criu/include/fault-injection.h | 1 +
criu/parasite-syscall.c | 6 +++++-
test/jenkins/criu-fault.sh | 1 +
3 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/criu/include/fault-injection.h b/criu/include/fault-injection.h
index c69a1c9..f1e5c72 100644
--- a/criu/include/fault-injection.h
+++ b/criu/include/fault-injection.h
@@ -10,6 +10,7 @@ enum faults {
/* not fatal */
FI_CHECK_OPEN_HANDLE = 128,
FI_NO_MEMFD = 129,
+ FI_NO_BREAKPOINTS = 130,
FI_MAX,
};
diff --git a/criu/parasite-syscall.c b/criu/parasite-syscall.c
index a5b2fc7..f9e0bac 100644
--- a/criu/parasite-syscall.c
+++ b/criu/parasite-syscall.c
@@ -1428,7 +1428,11 @@ int ptrace_stop_pie(pid_t pid, void *addr, enum trace_flags *tf)
{
int ret;
- ret = ptrace_set_breakpoint(pid, addr);
+ if (fault_injected(FI_NO_BREAKPOINTS)) {
+ pr_debug("Force no-breakpoints restore\n");
+ ret = 0;
+ } else
+ ret = ptrace_set_breakpoint(pid, addr);
if (ret < 0)
return ret;
diff --git a/test/jenkins/criu-fault.sh b/test/jenkins/criu-fault.sh
index b74566c..6a55aac 100755
--- a/test/jenkins/criu-fault.sh
+++ b/test/jenkins/criu-fault.sh
@@ -7,3 +7,4 @@ prep
./test/zdtm.py run -t zdtm/static/maps00 --fault 3 --keep-going --report report -f h || fail
./test/zdtm.py run -t zdtm/static/inotify_irmap --fault 128 --keep-going --pre 2 -f uns || fail
./test/zdtm.py run -t zdtm/static/env00 --fault 129 -f uns || fail
+./test/zdtm.py run -t zdtm/transition/fork --fault 130 -f h || fail
--
2.5.0
More information about the CRIU
mailing list