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

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

Issue 270613008: Linux sandbox: always restrict clone() in baseline policy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Disable on ASAN and TSAN. 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <fcntl.h> 5 #include <fcntl.h>
6 #include <poll.h> 6 #include <poll.h>
7 #include <signal.h> 7 #include <signal.h>
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/time.h> 10 #include <sys/time.h>
11 #include <time.h> 11 #include <time.h>
12 #include <unistd.h> 12 #include <unistd.h>
13 13
14 #include "base/file_util.h" 14 #include "base/file_util.h"
15 #include "base/posix/eintr_wrapper.h"
15 #include "base/third_party/valgrind/valgrind.h" 16 #include "base/third_party/valgrind/valgrind.h"
16 #include "build/build_config.h" 17 #include "build/build_config.h"
17 #include "sandbox/linux/tests/unit_tests.h" 18 #include "sandbox/linux/tests/unit_tests.h"
18 19
19 namespace { 20 namespace {
20 std::string TestFailedMessage(const std::string& msg) { 21 std::string TestFailedMessage(const std::string& msg) {
21 return msg.empty() ? std::string() : "Actual test failure: " + msg; 22 return msg.empty() ? std::string() : "Actual test failure: " + msg;
22 } 23 }
23 24
24 int GetSubProcessTimeoutTimeInSeconds() { 25 int GetSubProcessTimeoutTimeInSeconds() {
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
291 fflush(stderr); 292 fflush(stderr);
292 _exit(kExitWithAssertionFailure); 293 _exit(kExitWithAssertionFailure);
293 } 294 }
294 295
295 void UnitTests::IgnoreThisTest() { 296 void UnitTests::IgnoreThisTest() {
296 fflush(stderr); 297 fflush(stderr);
297 _exit(kIgnoreThisTest); 298 _exit(kIgnoreThisTest);
298 } 299 }
299 300
300 } // namespace 301 } // namespace
OLDNEW
« no previous file with comments | « sandbox/linux/seccomp-bpf-helpers/syscall_sets.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698