diff options
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; -} |