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

Side by Side Diff: sandbox/linux/tests/main.cc

Issue 242383003: Linux sandbox test: temporarily allow fork() with threads (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/at_exit.h" 5 #include "base/at_exit.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/test/test_suite.h" 7 #include "base/test/test_suite.h"
8 #include "sandbox/linux/tests/test_utils.h" 8 #include "sandbox/linux/tests/test_utils.h"
9 #include "sandbox/linux/tests/unit_tests.h" 9 #include "sandbox/linux/tests/unit_tests.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 namespace sandbox { 12 namespace sandbox {
13
14 extern const bool kAllowForkWithThreads = false;
15
13 namespace { 16 namespace {
14 17
15 // Check for leaks in our tests. 18 // Check for leaks in our tests.
16 void RunPostTestsChecks() { 19 void RunPostTestsChecks() {
17 if (TestUtils::CurrentProcessHasChildren()) { 20 if (TestUtils::CurrentProcessHasChildren()) {
18 LOG(ERROR) << "One of the tests created a child that was not waited for. " 21 LOG(ERROR) << "One of the tests created a child that was not waited for. "
19 << "Please, clean-up after your tests!"; 22 << "Please, clean-up after your tests!";
20 } 23 }
21 } 24 }
22 25
(...skipping 13 matching lines...) Expand all
36 ::testing::FLAGS_gtest_death_test_style = "threadsafe"; 39 ::testing::FLAGS_gtest_death_test_style = "threadsafe";
37 #if defined(OS_ANDROID) 40 #if defined(OS_ANDROID)
38 int tests_result = RUN_ALL_TESTS(); 41 int tests_result = RUN_ALL_TESTS();
39 #else 42 #else
40 int tests_result = base::RunUnitTestsUsingBaseTestSuite(argc, argv); 43 int tests_result = base::RunUnitTestsUsingBaseTestSuite(argc, argv);
41 #endif 44 #endif
42 45
43 sandbox::RunPostTestsChecks(); 46 sandbox::RunPostTestsChecks();
44 return tests_result; 47 return tests_result;
45 } 48 }
OLDNEW
« no previous file with comments | « components/nacl/loader/nonsfi/nonsfi_sandbox_unittest.cc ('k') | sandbox/linux/tests/unit_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698