aboutsummaryrefslogtreecommitdiffstats
path: root/tests/string_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-04-30 09:45:40 -0700
committerElliott Hughes <enh@google.com>2014-04-30 10:06:09 -0700
commit0990d4fda898ada86e557f872f5cb7d16b138e3c (patch)
tree43cd74258c43e23e8008c15aebdb0a3efd476f6c /tests/string_test.cpp
parent77473e408504a7e298816b4071cd6902065b03d8 (diff)
downloadandroid_bionic-0990d4fda898ada86e557f872f5cb7d16b138e3c.tar.gz
android_bionic-0990d4fda898ada86e557f872f5cb7d16b138e3c.tar.bz2
android_bionic-0990d4fda898ada86e557f872f5cb7d16b138e3c.zip
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/string_test.cpp')
-rw-r--r--tests/string_test.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp
index 14b284e2d..5ccc63d3a 100644
--- a/tests/string_test.cpp
+++ b/tests/string_test.cpp
@@ -100,11 +100,9 @@ TEST(string, strsignal) {
ASSERT_STREQ("Hangup", strsignal(1));
// A real-time signal.
-#ifdef __GLIBC__ // glibc reserves real-time signals for internal use, and doesn't count those.
- ASSERT_STREQ("Real-time signal 14", strsignal(48));
-#else
- ASSERT_STREQ("Real-time signal 16", strsignal(48));
-#endif
+ ASSERT_STREQ("Real-time signal 14", strsignal(SIGRTMIN + 14));
+ // One of the signals the C library keeps to itself.
+ ASSERT_STREQ("Unknown signal 32", strsignal(__SIGRTMIN));
// Errors.
ASSERT_STREQ("Unknown signal -1", strsignal(-1)); // Too small.