diff options
author | Elliott Hughes <enh@google.com> | 2014-04-30 09:45:40 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-04-30 10:06:09 -0700 |
commit | 0990d4fda898ada86e557f872f5cb7d16b138e3c (patch) | |
tree | 43cd74258c43e23e8008c15aebdb0a3efd476f6c /tests/signal_test.cpp | |
parent | 77473e408504a7e298816b4071cd6902065b03d8 (diff) |
Make SIGRTMIN hide the real-time signals we use internally.
__SIGRTMIN will continue to tell the truth. This matches glibc's
behavior (as evidenced by the fact that we don't need a special case
in the strsignal test now).
Change-Id: I1abe1681d516577afa8cd39c837ef12467f68dd2
Diffstat (limited to 'tests/signal_test.cpp')
-rw-r--r-- | tests/signal_test.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp index 6d55bef24..af9896409 100644 --- a/tests/signal_test.cpp +++ b/tests/signal_test.cpp @@ -252,3 +252,21 @@ TEST(signal, sys_siglist) { ASSERT_TRUE(sys_siglist[0] == NULL); ASSERT_STREQ("Hangup", sys_siglist[SIGHUP]); } + +TEST(signal, limits) { + // This comes from the kernel. + ASSERT_EQ(32, __SIGRTMIN); + + // We reserve a non-zero number at the bottom for ourselves. + ASSERT_GT(SIGRTMIN, __SIGRTMIN); + + // MIPS has more signals than everyone else. +#if defined(__mips__) + ASSERT_EQ(128, __SIGRTMAX); +#else + ASSERT_EQ(64, __SIGRTMAX); +#endif + + // We don't currently reserve any at the top. + ASSERT_EQ(SIGRTMAX, __SIGRTMAX); +} |