Commit 538e87ca authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

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=2636Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent ce988e44
......@@ -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);
......
fork.c
\ No newline at end of file
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