diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2015-01-07 19:55:37 +0000 |
commit | ca9211ecdede9bdedb812b2243a4abdb8dacd1b9 (patch) | |
tree | 9b19e801150082c33e9152275829a6ce90614b55 /lib/msan/lit_tests/sigwait.cc | |
parent | 8ef50bf3d1c287b5013c3168de77a462dfce3495 (diff) |
Notes
Diffstat (limited to 'lib/msan/lit_tests/sigwait.cc')
-rw-r--r-- | lib/msan/lit_tests/sigwait.cc | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/lib/msan/lit_tests/sigwait.cc b/lib/msan/lit_tests/sigwait.cc deleted file mode 100644 index 29aa86c938f2a..0000000000000 --- a/lib/msan/lit_tests/sigwait.cc +++ /dev/null @@ -1,30 +0,0 @@ -// RUN: %clangxx_msan -std=c++11 -O0 -g %s -o %t && %t - -#include <assert.h> -#include <sanitizer/msan_interface.h> -#include <signal.h> -#include <sys/time.h> -#include <unistd.h> - -void test_sigwait() { - sigset_t s; - sigemptyset(&s); - sigaddset(&s, SIGUSR1); - sigprocmask(SIG_BLOCK, &s, 0); - - if (pid_t pid = fork()) { - kill(pid, SIGUSR1); - _exit(0); - } else { - int sig; - int res = sigwait(&s, &sig); - assert(!res); - // The following checks that sig is initialized. - assert(sig == SIGUSR1); - } -} - -int main(void) { - test_sigwait(); - return 0; -} |