summaryrefslogtreecommitdiff
path: root/test/nptl/tst-cond-deadlock.c
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:29:21 +0200
committerWaldemar Brodkorb <wbx@uclibc-ng.org>2016-10-28 20:31:55 +0200
commit99ef2719fb3d703fe38c4113cd7f5adec516dd3a (patch)
tree2c1f77cb41b60ccbf8faa77a3640491a3546b546 /test/nptl/tst-cond-deadlock.c
parent543308f6c46cf2edf8a524bc9c631e472570fe72 (diff)
test: remove test suite
The test suite is now a developed in a separate git repository. See here: http://cgit.uclibc-ng.org/cgi/cgit/uclibc-ng-test.git The test suite should be just like every other software compiled with the cross-toolchain. In the past strange problems where found when the test suite got build in the toolchain creation step.
Diffstat (limited to 'test/nptl/tst-cond-deadlock.c')
-rw-r--r--test/nptl/tst-cond-deadlock.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/test/nptl/tst-cond-deadlock.c b/test/nptl/tst-cond-deadlock.c
deleted file mode 100644
index dd978fb3d..000000000
--- a/test/nptl/tst-cond-deadlock.c
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2016 Martin Willi <martin@strongswan.org>
- * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
- */
-
-#include <pthread.h>
-
-static pthread_mutex_t m;
-static pthread_cond_t c;
-static pthread_t t;
-static volatile int ready;
-
-static void cancelcb(void *arg)
-{
- pthread_mutex_unlock(&m);
-}
-
-static void* threadcb(void *arg)
-{
- pthread_mutex_lock(&m);
- pthread_cleanup_push(cancelcb, NULL);
-
- ready = 1;
- while (1)
- pthread_cond_wait(&c, &m);
- pthread_cleanup_pop(1);
-}
-
-static int
-do_test (void)
-{
- pthread_mutex_init(&m, NULL);
- pthread_cond_init(&c, NULL);
-
- pthread_create(&t, NULL, threadcb, NULL);
-
- while (!ready);
-
- pthread_cancel(t);
- pthread_join(t, NULL);
-
- pthread_cond_signal(&c);
- pthread_cond_destroy(&c);
- pthread_mutex_destroy(&m);
-
- return 0;
-}
-
-#define TEST_FUNCTION do_test ()
-#define TIMEOUT 100
-#include "../test-skeleton.c"