Commit 4576a033 authored by Pavel Emelyanov's avatar Pavel Emelyanov

tests: Check that no-breakpoints restore works

v2: Don't clear_breakpoints too.
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
parent 54d7913b
......@@ -1869,6 +1869,9 @@ static int clear_breakpoints()
struct pstree_item *item;
int ret = 0, i;
if (fault_injected(FI_NO_BREAKPOINTS))
return 0;
for_each_pstree_item(item) {
if (!task_alive(item))
continue;
......
......@@ -10,6 +10,7 @@ enum faults {
/* not fatal */
FI_CHECK_OPEN_HANDLE = 128,
FI_NO_MEMFD = 129,
FI_NO_BREAKPOINTS = 130,
FI_MAX,
};
......
......@@ -1403,7 +1403,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;
......
......@@ -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
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