diff options
author | Elliott Hughes <enh@google.com> | 2021-02-18 17:11:56 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2021-02-18 17:23:04 -0800 |
commit | e657eb4f8abc2bb21571df1c0d0e0cbfaadce1c1 (patch) | |
tree | ece8247ab16072e2fd1fca786be9050562bb3f60 /tests/semaphore_test.cpp | |
parent | 332065d57e734b65f56474d136d22d767e36cbcd (diff) |
Fix some bionic death tests.
These were creating tombstones and spewing to the log.
You need TEST_F() rather than TEST(), and the modern style is apparently
to use `using` rather than an empty subclass.
Bug: http://b/180605583
Test: run tests, check logcat
Change-Id: I1e639d34854aeff6f042c24643b769a6bcfab877
Diffstat (limited to 'tests/semaphore_test.cpp')
-rw-r--r-- | tests/semaphore_test.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/semaphore_test.cpp b/tests/semaphore_test.cpp index 6ec8b2a85..ed0fcf17e 100644 --- a/tests/semaphore_test.cpp +++ b/tests/semaphore_test.cpp @@ -23,8 +23,11 @@ #include <time.h> #include <unistd.h> -#include "private/bionic_constants.h" +#include "BionicDeathTest.h" #include "SignalUtils.h" +#include "private/bionic_constants.h" + +using semaphore_DeathTest = BionicDeathTest; TEST(semaphore, sem_init) { sem_t s; @@ -158,7 +161,7 @@ TEST(semaphore, sem_clockwait) { #endif // __BIONIC__ } -TEST(semaphore_DeathTest, sem_timedwait_null_timeout) { +TEST_F(semaphore_DeathTest, sem_timedwait_null_timeout) { sem_t s; ASSERT_EQ(0, sem_init(&s, 0, 0)); |