summaryrefslogtreecommitdiff
path: root/test/unistd/tst-pselect.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/unistd/tst-pselect.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/unistd/tst-pselect.c')
-rw-r--r--test/unistd/tst-pselect.c51
1 files changed, 0 insertions, 51 deletions
diff --git a/test/unistd/tst-pselect.c b/test/unistd/tst-pselect.c
deleted file mode 100644
index cab945119..000000000
--- a/test/unistd/tst-pselect.c
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <errno.h>
-#include <signal.h>
-#include <sys/types.h>
-#include <sys/select.h>
-
-// our SIGALRM handler
-void handler(int signum) {
- (void)signum;
- puts("got signal\n");
-}
-
-static int
-do_test (void)
-{
- int rc;
- sigset_t wait_mask, mask_sigchld;
- struct sigaction act;
-
- // block SIGALRM. We want to handle it only when we're ready
- sigemptyset(&mask_sigchld);
- sigaddset(&mask_sigchld, SIGALRM);
- sigprocmask(SIG_BLOCK, &mask_sigchld, &wait_mask);
- sigdelset(&wait_mask, SIGALRM);
-
- // register a signal handler so we can see when the signal arrives
- memset(&act, 0, sizeof(act));
- sigemptyset(&act.sa_mask); // just in case an empty set isn't all 0's (total paranoia)
- act.sa_handler = handler;
- sigaction(SIGALRM, &act, NULL);
-
- // send ourselves a SIGARLM. It will pend until we unblock that signal in pselect()
- printf("sending ourselves a signal\n");
- kill(getpid(), SIGALRM);
-
- printf("signal is pending; calling pselect()\n");
- rc = pselect(0, NULL, NULL, NULL, NULL, &wait_mask);
- if (rc != -1 || errno != EINTR) {
- int e = errno;
- printf("pselect() returned %d, errno %d (%s)\n", rc, e, strerror(e));
- exit(1);
- }
-
- return 0;
-}
-
-#define TEST_FUNCTION do_test ()
-#include <test-skeleton.c>