Commit 161cb0b1 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

zdtm: add a test with a dead thread leader and alive threads

This case is not supported now
[root@avagin-fc19-cr criu]# bash test/zdtm.sh -r static/pthread02
Execute static/pthread02
./pthread02 --pidfile=pthread02.pid --outfile=pthread02.out
Dump 3186
WARNING: pthread02 returned 1 and left running for debug needs
Test: zdtm/live/static/pthread02, Result: FAIL
==================================== ERROR ====================================
Test: zdtm/live/static/pthread02, Namespace:
Dump log   : /root/git/locks/criu/test/dump/static/pthread02/3186/1/dump.log
--------------------------------- grep Error ---------------------------------
(00.033195) Error (cr-dump.c:886): Zombies with threads are not supported
(00.033256) Error (cr-dump.c:1943): Dumping FAILED.
------------------------------------- END -------------------------------------
================================= ERROR OVER =================================
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent e7c05c5e
......@@ -46,6 +46,7 @@ TST_NOFILE = \
pipe02 \
pthread00 \
pthread01 \
pthread02 \
vdso00 \
vdso01 \
utsname \
......@@ -291,6 +292,7 @@ unlink_largefile: override CFLAGS += -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURC
inotify_system_nodel: override CFLAGS += -DNODEL
pthread00: override LDLIBS += -pthread
pthread01: override LDLIBS += -pthread
pthread02: override LDLIBS += -pthread
sigpending: override LDLIBS += -pthread
sigaltstack: override LDLIBS += -pthread
shm: override CFLAGS += -DNEW_IPC_NS
......
/*
* A simple testee program with threads
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include "zdtmtst.h"
const char *test_doc = "Create a thread with a dead leader\n";
const char *test_author = "Andrew Vagin <avagin@openvz.org";
static void *thread_func(void *args)
{
test_waitsig();
pass();
exit(0);
}
int main(int argc, char *argv[])
{
pthread_t th1;
int ret;
test_init(argc, argv);
ret = pthread_create(&th1, NULL, &thread_func, NULL);
if (ret) {
fail("Can't pthread_create");
exit(1);
}
test_daemon();
pthread_exit(NULL);
return 0;
}
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