From aa0ebdafc71e1ceac78e0929b94f3bb117d0c8e9 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Tue, 11 Feb 2014 19:57:06 -0800 Subject: 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 --- tests/signal_test.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'tests/signal_test.cpp') 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]); +} -- cgit v1.1