Remove CLONE_NEWNS for gettid and getpid cache tests.
Using CLONE_NEWNS flag is not related to the tests, and it make
the tests unavailable in cts tests. So remove the flag.
Bug: http://b/33089743
Test: run CtsBionicTestCases --gtest_filter=unistd*.
Change-Id: I4bda39c6a0c41c9973d275202a3a7f7a1e9bbba3
diff --git a/tests/unistd_test.cpp b/tests/unistd_test.cpp
index b488e82..f8b35cc 100644
--- a/tests/unistd_test.cpp
+++ b/tests/unistd_test.cpp
@@ -530,12 +530,7 @@
static int CloneStartRoutine(int (*start_routine)(void*)) {
void* child_stack[1024];
- int clone_result = clone(start_routine, &child_stack[1024], CLONE_NEWNS | SIGCHLD, NULL);
- if (clone_result == -1 && errno == EPERM && getuid() != 0) {
- GTEST_LOG_(INFO) << "This test only works if you have permission to CLONE_NEWNS; try running as root.\n";
- return clone_result;
- }
- return clone_result;
+ return clone(start_routine, &child_stack[1024], SIGCHLD, NULL);
}
static int GetPidCachingCloneStartRoutine(void*) {