Index: sandbox/linux/tests/unit_tests.cc |
diff --git a/sandbox/linux/tests/unit_tests.cc b/sandbox/linux/tests/unit_tests.cc |
index d3ee81b36ba9f700fdf74859a189ed645c7cf80c..a57cf1a58e8d42e0cb9e710f23f072d9c5e20ae9 100644 |
--- a/sandbox/linux/tests/unit_tests.cc |
+++ b/sandbox/linux/tests/unit_tests.cc |
@@ -43,8 +43,6 @@ int CountThreads() { |
namespace sandbox { |
-extern bool kAllowForkWithThreads; |
- |
bool IsAndroid() { |
#if defined(OS_ANDROID) |
return true; |
@@ -129,26 +127,17 @@ void UnitTests::RunTestInProcess(SandboxTestRunner* test_runner, |
// appear as still running in /proc. |
// We poll /proc, with an exponential back-off. At most, we'll sleep around |
// 2^iterations nanoseconds in nanosleep(). |
- if (!kAllowForkWithThreads) { |
- for (unsigned int iteration = 0; iteration < 30; iteration++) { |
- struct timespec ts = {0, 1L << iteration /* nanoseconds */}; |
- PCHECK(0 == HANDLE_EINTR(nanosleep(&ts, &ts))); |
- num_threads = CountThreads(); |
- if (kNumExpectedThreads == num_threads) |
- break; |
- } |
- } |
- |
- const std::string multiple_threads_error = |
- "Running sandbox tests with multiple threads " |
- "is not supported and will make the tests flaky."; |
- if (!kAllowForkWithThreads) { |
- ASSERT_EQ(kNumExpectedThreads, num_threads) << multiple_threads_error; |
- } else { |
- if (kNumExpectedThreads != num_threads) |
- LOG(ERROR) << multiple_threads_error; |
+ for (unsigned int iteration = 0; iteration < 30; iteration++) { |
+ struct timespec ts = {0, 1L << iteration /* nanoseconds */}; |
+ PCHECK(0 == HANDLE_EINTR(nanosleep(&ts, &ts))); |
+ num_threads = CountThreads(); |
+ if (kNumExpectedThreads == num_threads) |
+ break; |
} |
+ ASSERT_EQ(kNumExpectedThreads, num_threads) |
+ << "Running sandbox tests with multiple threads " |
+ << "is not supported and will make the tests flaky."; |
int fds[2]; |
ASSERT_EQ(0, pipe(fds)); |
// Check that our pipe is not on one of the standard file descriptor. |