criu/test/zdtm
Kirill Tkhai 76b8ab3500 zdtm: Add zombie01 test
Create a zombie with specific pgid and check that
pgid remains the same after restore.

This test hangs criu restore without any of two previous patches:
1)without "restore: Call prepare_fds() in restore_one_zombie()"
  in 100% cases;

2)without "restore: Split restore_one_helper() and wait exiting
  zombie children" fail is racy, but you can add something like

criu/cr-restore.c:
## -1130,6 +1130,8 @@ static int restore_one_zombie(CoreEntry *core)

        if (task_entries != NULL) {
                restore_finish_stage(task_entries, CR_STATE_RESTORE);
+               if (current->parent->pid->state == TASK_ALIVE)
+                       sleep(2);
                zombie_prepare_signals();
        }

and it will fail with almost 100% probability.

Signed-off-by: Kirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
2018-01-02 20:45:34 +03:00
..
lib zdtm: Export sys_clone_unified() to headers 2018-01-02 20:45:34 +03:00
static zdtm: Add zombie01 test 2018-01-02 20:45:34 +03:00
transition test: add test that verifies proper intraction between lazy-pages and THP 2017-09-16 12:30:22 +03:00
.gitignore test/zdtm: unify common code 2017-04-02 18:12:10 +03:00
Makefile test/zdtm/Makefile: simplify 2017-04-02 18:12:10 +03:00
Makefile.inc test/zdtm/Makefiles: disable built-in rules 2017-05-10 04:26:56 +03:00