Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1703)

Unified Diff: sandbox/linux/tests/unit_tests.cc

Issue 273623002: Non-SFI NaCl: Stop running sandbox tests in components_unittests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: update assert's message Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « sandbox/linux/tests/main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « sandbox/linux/tests/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698