mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-21 09:10:10 +00:00
tests: Check that no-breakpoints restore works
v2: Don't clear_breakpoints too. Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
54d7913be0
commit
4576a03385
4 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue