summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-09-22 14:41:30 -0700
committerElliott Hughes <enh@google.com>2014-09-22 14:41:30 -0700
commit60452a211c19e8cd09d4111fa733c64ecd1200f0 (patch)
treed9454888aa4b291d2c42021ce0734d5ba446c63a
parentadc01348ee51a4ad678b1c277f85cbbed5c2e728 (diff)
downloadbionic-60452a211c19e8cd09d4111fa733c64ecd1200f0.zip
bionic-60452a211c19e8cd09d4111fa733c64ecd1200f0.tar.gz
bionic-60452a211c19e8cd09d4111fa733c64ecd1200f0.tar.bz2
Unit test for abort(3).
Change-Id: I021604b977572801f228a193741624df26e76d72
-rw-r--r--tests/unistd_test.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/unistd_test.cpp b/tests/unistd_test.cpp
index 8195ea8..21c14f4 100644
--- a/tests/unistd_test.cpp
+++ b/tests/unistd_test.cpp
@@ -462,3 +462,8 @@ TEST(unistd, getpid_caching_and_pthread_create) {
ASSERT_EQ(0, pthread_join(t, &result));
ASSERT_EQ(NULL, result);
}
+
+TEST(unistd_DeathTest, abort) {
+ ::testing::FLAGS_gtest_death_test_style = "threadsafe";
+ ASSERT_EXIT(abort(), testing::KilledBySignal(SIGABRT), "");
+}