mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-26 19:49:12 +00:00
zdtm: add a new test case, which create processes in a loop
and this processes live a short period of time. This test case is needed for testing snapshots. https://bugzilla.openvz.org/show_bug.cgi?id=2636 Signed-off-by: Andrey Vagin <avagin@openvz.org> Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
parent
ce988e44fb
commit
538e87ca92
3 changed files with 8 additions and 1 deletions
|
|
@ -10,6 +10,7 @@ TST_NOFILE = \
|
|||
ptrace \
|
||||
epoll \
|
||||
fork \
|
||||
fork2 \
|
||||
|
||||
TST_FILE = \
|
||||
file_read \
|
||||
|
|
@ -59,6 +60,7 @@ $(TST): $(LIB)
|
|||
ptrace.o: override CFLAGS += -pthread
|
||||
ptrace: override LDFLAGS += -pthread
|
||||
ipc: override CFLAGS += -DNEW_IPC_NS
|
||||
fork2: override CFLAGS += -D FORK2
|
||||
|
||||
%: %.sh
|
||||
cp $< $@
|
||||
|
|
|
|||
|
|
@ -29,8 +29,12 @@ int main(int argc, char **argv)
|
|||
goto out;
|
||||
}
|
||||
|
||||
if (pid == 0)
|
||||
if (pid == 0) {
|
||||
#ifdef FORK2
|
||||
usleep(10000);
|
||||
#endif
|
||||
exit(0);
|
||||
}
|
||||
|
||||
while ((wpid = wait(&status)) == -1 && errno == EINTR);
|
||||
|
||||
|
|
|
|||
1
test/zdtm/live/transition/fork2.c
Symbolic link
1
test/zdtm/live/transition/fork2.c
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
fork.c
|
||||
Loading…
Add table
Add a link
Reference in a new issue