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

Side by Side Diff: sandbox/linux/seccomp-bpf/sandbox_bpf_unittest.cc

Issue 510473003: Disable SandboxBPF.StartSingleThreadedAsMultiThreaded under TSan v2. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@lkcr
Patch Set: Created 6 years, 3 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
« no previous file with comments | « no previous file | 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 <errno.h> 5 #include <errno.h>
6 #include <pthread.h> 6 #include <pthread.h>
7 #include <sched.h> 7 #include <sched.h>
8 #include <signal.h> 8 #include <signal.h>
9 #include <sys/prctl.h> 9 #include <sys/prctl.h>
10 #include <sys/ptrace.h> 10 #include <sys/ptrace.h>
(...skipping 2232 matching lines...) Expand 10 before | Expand all | Expand 10 after
2243 SANDBOX_DEATH_TEST(SandboxBPF, StartMultiThreadedAsSingleThreaded, 2243 SANDBOX_DEATH_TEST(SandboxBPF, StartMultiThreadedAsSingleThreaded,
2244 DEATH_MESSAGE("Cannot start sandbox; process is already multi-threaded")) { 2244 DEATH_MESSAGE("Cannot start sandbox; process is already multi-threaded")) {
2245 base::Thread thread("sandbox.linux.StartMultiThreadedAsSingleThreaded"); 2245 base::Thread thread("sandbox.linux.StartMultiThreadedAsSingleThreaded");
2246 BPF_ASSERT(thread.Start()); 2246 BPF_ASSERT(thread.Start());
2247 2247
2248 SandboxBPF sandbox; 2248 SandboxBPF sandbox;
2249 sandbox.SetSandboxPolicy(new AllowAllPolicy()); 2249 sandbox.SetSandboxPolicy(new AllowAllPolicy());
2250 BPF_ASSERT(!sandbox.StartSandbox(SandboxBPF::PROCESS_SINGLE_THREADED)); 2250 BPF_ASSERT(!sandbox.StartSandbox(SandboxBPF::PROCESS_SINGLE_THREADED));
2251 } 2251 }
2252 2252
2253 // http://crbug.com/407357
2254 #if !defined(THREAD_SANITIZER)
2253 SANDBOX_DEATH_TEST(SandboxBPF, StartSingleThreadedAsMultiThreaded, 2255 SANDBOX_DEATH_TEST(SandboxBPF, StartSingleThreadedAsMultiThreaded,
2254 DEATH_MESSAGE("Cannot start sandbox; process may be single-threaded when " 2256 DEATH_MESSAGE("Cannot start sandbox; process may be single-threaded when "
2255 "reported as not")) { 2257 "reported as not")) {
2256 SandboxBPF sandbox; 2258 SandboxBPF sandbox;
2257 sandbox.SetSandboxPolicy(new AllowAllPolicy()); 2259 sandbox.SetSandboxPolicy(new AllowAllPolicy());
2258 BPF_ASSERT(!sandbox.StartSandbox(SandboxBPF::PROCESS_MULTI_THREADED)); 2260 BPF_ASSERT(!sandbox.StartSandbox(SandboxBPF::PROCESS_MULTI_THREADED));
2259 } 2261 }
2262 #endif // !defined(THREAD_SANITIZER)
2260 2263
2261 } // namespace 2264 } // namespace
2262 2265
2263 } // namespace sandbox 2266 } // namespace sandbox
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698