From 0864d8bc47d57a3e63c1444dad1e263dd310d64f Mon Sep 17 00:00:00 2001 From: Dmitriy Ivanov Date: Thu, 20 Nov 2014 21:21:26 -0800 Subject: [PATCH] Rename test_forked -> test_isolated Change-Id: Ie72627e986c159832cbd3635d8ff5b1af3d5b1eb --- tests/gtest_ex.h | 9 ++++++++- tests/pthread_test.cpp | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tests/gtest_ex.h b/tests/gtest_ex.h index 41ee22bfa..fe1d89434 100644 --- a/tests/gtest_ex.h +++ b/tests/gtest_ex.h @@ -16,8 +16,15 @@ #include +#include +#include + +#include +#include +#include + template -void test_forked(F test) { +void test_isolated(F test) { int pid = fork(); ASSERT_NE(-1, pid) << strerror(errno); diff --git a/tests/pthread_test.cpp b/tests/pthread_test.cpp index f45e2e6ba..797468efe 100644 --- a/tests/pthread_test.cpp +++ b/tests/pthread_test.cpp @@ -723,7 +723,7 @@ static void AtForkChild1() { g_atfork_child_calls = (g_atfork_child_calls << 4) static void AtForkChild2() { g_atfork_child_calls = (g_atfork_child_calls << 4) | 2; } TEST(pthread, pthread_atfork_smoke) { - test_forked([]() { + test_isolated([] { ASSERT_EQ(0, pthread_atfork(AtForkPrepare1, AtForkParent1, AtForkChild1)); ASSERT_EQ(0, pthread_atfork(AtForkPrepare2, AtForkParent2, AtForkChild2)); -- 2.11.0