Rename test_forked -> test_isolated

Change-Id: Ie72627e986c159832cbd3635d8ff5b1af3d5b1eb
This commit is contained in:
Dmitriy Ivanov 2014-11-20 21:21:26 -08:00
parent 8b4b827338
commit 0864d8bc47
2 changed files with 9 additions and 2 deletions

View file

@ -16,8 +16,15 @@
#include <gtest/gtest.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <errno.h>
#include <string.h>
#include <unistd.h>
template<typename F>
void test_forked(F test) {
void test_isolated(F test) {
int pid = fork();
ASSERT_NE(-1, pid) << strerror(errno);

View file

@ -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));