diff options
author | Elliott Hughes <enh@google.com> | 2014-02-11 19:57:06 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2014-02-12 17:09:25 -0800 |
commit | aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9 (patch) | |
tree | e0fa3c926172fbc3e4b1a43950ae2a7ea662deb7 /tests | |
parent | 9e572ca4163e42bcd053df2cb8557e4b61ad064d (diff) | |
download | bionic-aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9.zip bionic-aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9.tar.gz bionic-aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9.tar.bz2 |
Clean up sys_signame and sys_siglist a little.
We don't need quite so much duplication because we already have a way
to get the signal number from its name, and that already copes with the
fact that the mips/mips64 numbers are different from everyone else's.
Also remove sys_signame from LP64. glibc doesn't have this BSD-ism.
Change-Id: I6dc411a3d73589383c85d3b07d9d648311492a10
Diffstat (limited to 'tests')
-rw-r--r-- | tests/signal_test.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/signal_test.cpp b/tests/signal_test.cpp index a7e5b9a..ea3096a 100644 --- a/tests/signal_test.cpp +++ b/tests/signal_test.cpp @@ -238,3 +238,17 @@ TEST(signal, sigaction) { // Put everything back how it was. ASSERT_EQ(0, sigaction(SIGALRM, &original_sa, NULL)); } + +TEST(signal, sys_signame) { +#if defined(__BIONIC__) && !defined(__LP64__) + ASSERT_TRUE(sys_signame[0] == NULL); + ASSERT_STREQ("HUP", sys_signame[SIGHUP]); +#else + GTEST_LOG_(INFO) << "This test does nothing.\n"; +#endif +} + +TEST(signal, sys_siglist) { + ASSERT_TRUE(sys_siglist[0] == NULL); + ASSERT_STREQ("Hangup", sys_siglist[SIGHUP]); +} |