mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-20 16:51:37 +00:00
Move static and transition into zdtm top. We can't move all the micro tests themselves, as we need to distinguish static from non static (zdtm.py makes additional checks on static ones). Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
43 lines
610 B
C
43 lines
610 B
C
/*
|
|
* 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;
|
|
}
|