Lines Matching refs:ASSERT_EQ

58   ASSERT_EQ(-1, fn(set_ptr));  in TestSigSet1()
64 ASSERT_EQ(0, fn(&set)); in TestSigSet1()
73 ASSERT_EQ(-1, fn(set_ptr, SIGSEGV)); in TestSigSet2()
80 ASSERT_EQ(-1, fn(&set, 0)); in TestSigSet2()
85 ASSERT_EQ(-1, fn(&set, SIGNAL_MAX(&set) + 1)); in TestSigSet2()
90 ASSERT_EQ(0, fn(&set, SIGNAL_MIN())); in TestSigSet2()
92 ASSERT_EQ(0, fn(&set, SIGNAL_MAX(&set))); in TestSigSet2()
148 ASSERT_EQ(-1, raise(-1)); in TEST()
153 ASSERT_EQ(SIGALRM, signal_number); in raise_in_signal_handler_helper()
174 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &just_SIGALRM, nullptr)); in TEST()
181 ASSERT_EQ(0, sigpending(&pending)); in TEST()
188 ASSERT_EQ(0, g_sigsuspend_signal_handler_call_count); in TEST()
192 ASSERT_EQ(0, sigpending(&pending)); in TEST()
201 ASSERT_EQ(-1, sigsuspend(&not_SIGALRM)); in TEST()
204 ASSERT_EQ(1, g_sigsuspend_signal_handler_call_count); in TEST()
216 ASSERT_EQ(0, sigprocmask64(SIG_BLOCK, &just_SIGRTMIN, nullptr)); in TEST()
223 ASSERT_EQ(0, sigpending64(&pending)); in TEST()
230 ASSERT_EQ(0, g_sigsuspend64_signal_handler_call_count); in TEST()
234 ASSERT_EQ(0, sigpending64(&pending)); in TEST()
243 ASSERT_EQ(-1, sigsuspend64(&not_SIGRTMIN)); in TEST()
246 ASSERT_EQ(1, g_sigsuspend64_signal_handler_call_count); in TEST()
260 ASSERT_EQ(0, sigaction_fn(sig, nullptr, &original_sa)); in TestSigAction()
263 ASSERT_EQ(0U, original_sa.sa_flags & ~sa_restorer); in TestSigAction()
265 ASSERT_EQ(bool(original_sa.sa_flags & sa_restorer), bool(original_sa.sa_restorer)); in TestSigAction()
274 ASSERT_EQ(0, sigaction_fn(sig, &sa, nullptr)); in TestSigAction()
278 ASSERT_EQ(0, sigaction_fn(sig, nullptr, &sa)); in TestSigAction()
281 ASSERT_EQ(static_cast<unsigned>(SA_ONSTACK), sa.sa_flags & ~sa_restorer); in TestSigAction()
283 ASSERT_EQ(bool(sa.sa_flags & sa_restorer), bool(sa.sa_restorer)); in TestSigAction()
292 ASSERT_EQ(0, sigaction_fn(sig, &sa, nullptr)); in TestSigAction()
296 ASSERT_EQ(0, sigaction_fn(sig, nullptr, &sa)); in TestSigAction()
299 ASSERT_EQ(static_cast<unsigned>(SA_ONSTACK | SA_SIGINFO), sa.sa_flags & ~sa_restorer); in TestSigAction()
301 ASSERT_EQ(bool(sa.sa_flags & sa_restorer), bool(sa.sa_restorer)); in TestSigAction()
305 ASSERT_EQ(0, sigaction_fn(sig, &original_sa, nullptr)); in TestSigAction()
382 ASSERT_EQ(static_cast<uint64_t>(expected_sigset), sigset); in TEST()
401 ASSERT_EQ(expected_sigset, sigset); in TEST()
409 ASSERT_EQ(0, sigprocmask(SIG_SETMASK, &sigset_libc, nullptr)); in TEST()
418 ASSERT_EQ(0, sigprocmask64(SIG_SETMASK, &sigset_libc, nullptr)); in TEST()
427 ASSERT_EQ(0, pthread_sigmask(SIG_SETMASK, &sigset_libc, nullptr)); in TEST()
436 ASSERT_EQ(0, pthread_sigmask64(SIG_SETMASK, &sigset_libc, nullptr)); in TEST()
445 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &sigset_libc, nullptr)); in TEST()
454 ASSERT_EQ(0, sigprocmask64(SIG_BLOCK, &sigset_libc, nullptr)); in TEST()
463 ASSERT_EQ(0, pthread_sigmask(SIG_BLOCK, &sigset_libc, nullptr)); in TEST()
472 ASSERT_EQ(0, pthread_sigmask64(SIG_BLOCK, &sigset_libc, nullptr)); in TEST()
481 ASSERT_EQ(0, sigprocmask(SIG_UNBLOCK, &sigset_libc, nullptr)); in TEST()
490 ASSERT_EQ(0, sigprocmask64(SIG_UNBLOCK, &sigset_libc, nullptr)); in TEST()
499 ASSERT_EQ(0, pthread_sigmask(SIG_UNBLOCK, &sigset_libc, nullptr)); in TEST()
508 ASSERT_EQ(0, pthread_sigmask64(SIG_UNBLOCK, &sigset_libc, nullptr)); in TEST()
576 ASSERT_EQ(32, __SIGRTMIN); in TEST()
577 ASSERT_EQ(64, __SIGRTMAX); in TEST()
583 ASSERT_EQ(SIGRTMAX, __SIGRTMAX); in TEST()
589 ASSERT_EQ(SIGALRM, signum); in SigqueueSignalHandler()
590 ASSERT_EQ(SIGALRM, info->si_signo); in SigqueueSignalHandler()
591 ASSERT_EQ(SI_QUEUE, info->si_code); in SigqueueSignalHandler()
592 ASSERT_EQ(1, info->si_value.sival_int); in SigqueueSignalHandler()
600 ASSERT_EQ(0, sigqueue(getpid(), SIGALRM, sigval)); in TEST()
602 ASSERT_EQ(1, g_sigqueue_signal_handler_call_count); in TEST()
610 ASSERT_EQ(0, pthread_sigqueue(pthread_self(), SIGALRM, sigval)); in TEST()
612 ASSERT_EQ(1, g_sigqueue_signal_handler_call_count); in TEST()
635 ASSERT_EQ(0, rc); in TEST()
638 ASSERT_EQ(0, pthread_sigqueue(thread, SIGALRM, sigval)); in TEST()
641 ASSERT_EQ(1, g_sigqueue_signal_handler_call_count); in TEST()
654 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &just_SIGALRM, nullptr)); in TEST()
658 ASSERT_EQ(0, sigqueue(getpid(), SIGALRM, sigval)); in TEST()
662 ASSERT_EQ(0, sigwait(&just_SIGALRM, &sig)); in TEST()
663 ASSERT_EQ(SIGALRM, sig); in TEST()
673 ASSERT_EQ(0, sigprocmask64(SIG_BLOCK, &just_SIGRTMIN, nullptr)); in TEST()
677 ASSERT_EQ(0, sigqueue(getpid(), SIGRTMIN, sigval)); in TEST()
681 ASSERT_EQ(0, sigwait64(&just_SIGRTMIN, &sig)); in TEST()
682 ASSERT_EQ(SIGRTMIN, sig); in TEST()
692 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &just_SIGALRM, nullptr)); in TEST()
696 ASSERT_EQ(0, sigqueue(getpid(), SIGALRM, sigval)); in TEST()
701 ASSERT_EQ(SIGALRM, sigwaitinfo(&just_SIGALRM, &info)); in TEST()
703 ASSERT_EQ(SIGALRM, info.si_signo); in TEST()
704 ASSERT_EQ(1, info.si_value.sival_int); in TEST()
714 ASSERT_EQ(0, sigprocmask64(SIG_BLOCK, &just_SIGRTMIN, nullptr)); in TEST()
718 ASSERT_EQ(0, sigqueue(getpid(), SIGRTMIN, sigval)); in TEST()
723 ASSERT_EQ(SIGRTMIN, sigwaitinfo64(&just_SIGRTMIN, &info)); in TEST()
725 ASSERT_EQ(SIGRTMIN, info.si_signo); in TEST()
726 ASSERT_EQ(1, info.si_value.sival_int); in TEST()
736 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &just_SIGALRM, nullptr)); in TEST()
740 ASSERT_EQ(0, sigqueue(getpid(), SIGALRM, sigval)); in TEST()
746 ASSERT_EQ(SIGALRM, sigtimedwait(&just_SIGALRM, &info, &timeout)); in TEST()
757 ASSERT_EQ(0, sigprocmask64(SIG_BLOCK, &just_SIGRTMIN, nullptr)); in TEST()
761 ASSERT_EQ(0, sigqueue(getpid(), SIGRTMIN, sigval)); in TEST()
767 ASSERT_EQ(SIGRTMIN, sigtimedwait64(&just_SIGRTMIN, &info, &timeout)); in TEST()
777 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &just_SIGALRM, &original_set)); in TEST()
784 ASSERT_EQ(-1, sigtimedwait(&just_SIGALRM, &info, &timeout)); in TEST()
789 ASSERT_EQ(0, sigprocmask(SIG_SETMASK, &original_set, nullptr)); in TEST()
805 ASSERT_EQ(0, sigaction(SIGUSR1, &handler, nullptr)); in TEST()
811 ASSERT_EQ(0, syscall(SYS_rt_tgsigqueueinfo, getpid(), gettid(), SIGUSR1, &sent)) in TEST()
813 ASSERT_EQ(sent.si_code, received.si_code) << "rt_tgsigqueueinfo modified si_code, expected " in TEST()
818 ASSERT_EQ(0, syscall(SYS_rt_tgsigqueueinfo, getpid(), gettid(), SIGUSR1, &sent)) in TEST()
820 ASSERT_EQ(sent.si_code, received.si_code) << "rt_tgsigqueueinfo modified si_code, expected " in TEST()
838 ASSERT_EQ(-1, sigignore(99999)); in TEST()
852 ASSERT_EQ(0, sigignore(SIGALRM)); in TEST()
855 ASSERT_EQ(0, sigaction(SIGALRM, nullptr, &sa)); in TEST()
861 ASSERT_EQ(-1, sighold(99999)); in TEST()
867 ASSERT_EQ(-1, sigpause(99999)); in TEST()
873 ASSERT_EQ(-1, sigpause(99999)); in TEST()
884 ASSERT_EQ(0, sighold(sig)); in TestSigholdSigpauseSigrelse()
885 ASSERT_EQ(0, sigprocmask(SIG_SETMASK, nullptr, &set)); in TestSigholdSigpauseSigrelse()
890 ASSERT_EQ(0, signal_handler_call_count); in TestSigholdSigpauseSigrelse()
892 ASSERT_EQ(-1, sigpause(sig)); in TestSigholdSigpauseSigrelse()
894 ASSERT_EQ(1, signal_handler_call_count); in TestSigholdSigpauseSigrelse()
898 ASSERT_EQ(0, sigprocmask(SIG_SETMASK, nullptr, &set)); in TestSigholdSigpauseSigrelse()
902 ASSERT_EQ(0, sigrelse(sig)); in TestSigholdSigpauseSigrelse()
903 ASSERT_EQ(0, sigprocmask(SIG_SETMASK, nullptr, &set)); in TestSigholdSigpauseSigrelse()
920 ASSERT_EQ(SIG_ERR, sigset(99999, SIG_DFL)); in TEST()
930 ASSERT_EQ(signal_handler, sigset(SIGRTMIN, SIG_HOLD)); in TEST()
933 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, nullptr, &set)); in TEST()
937 ASSERT_EQ(SIG_HOLD, sigset(SIGRTMIN, signal_handler)); in TEST()
938 ASSERT_EQ(signal_handler, sigset(SIGRTMIN, signal_handler)); in TEST()
939 ASSERT_EQ(0, signal_handler_call_count); in TEST()
941 ASSERT_EQ(1, signal_handler_call_count); in TEST()
950 ASSERT_EQ(0, signal_handler_call_count); in TEST()
952 ASSERT_EQ(1, signal_handler_call_count); in TEST()
958 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, &set, nullptr)); in TEST()
961 ASSERT_EQ(SIG_HOLD, sigset(SIGALRM, signal_handler)); in TEST()
962 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, nullptr, &set)); in TEST()
965 ASSERT_EQ(signal_handler, sigset(SIGALRM, SIG_IGN)); in TEST()
966 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, nullptr, &set)); in TEST()
969 ASSERT_EQ(SIG_IGN, sigset(SIGALRM, SIG_DFL)); in TEST()
970 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, nullptr, &set)); in TEST()
973 ASSERT_EQ(SIG_DFL, sigset(SIGALRM, SIG_HOLD)); in TEST()
974 ASSERT_EQ(0, sigprocmask(SIG_BLOCK, nullptr, &set)); in TEST()
982 ASSERT_EQ(-1, killpg(-1, SIGKILL)); in TEST()