Index: sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc |
diff --git a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc |
index df5dbd508f1892530a36c9896de280a6723618e2..fe4f0b57d5a2e127f808d46a11daa37dc7602503 100644 |
--- a/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc |
+++ b/sandbox/linux/bpf_dsl/bpf_dsl_more_unittest.cc |
@@ -30,6 +30,7 @@ |
#include "base/memory/scoped_ptr.h" |
#include "base/posix/eintr_wrapper.h" |
#include "base/synchronization/waitable_event.h" |
+#include "base/sys_info.h" |
#include "base/threading/thread.h" |
#include "build/build_config.h" |
#include "sandbox/linux/bpf_dsl/policy.h" |
@@ -2253,8 +2254,17 @@ void* TsyncApplyToTwoThreadsFunc(void* cond_ptr) { |
} |
SANDBOX_TEST(SandboxBPF, Tsync) { |
- if (!(SandboxBPF::SupportsSeccompSandbox( |
- SandboxBPF::SeccompLevel::MULTI_THREADED))) { |
+ const bool supports_multi_threaded = SandboxBPF::SupportsSeccompSandbox( |
+ SandboxBPF::SeccompLevel::MULTI_THREADED); |
+// On ChromeOS tsync is mandatory. |
Jorge Lucangeli Obes
2014/12/03 17:19:38
Nit: "Chrome OS" with a space.
leecam
2014/12/03 17:25:23
Done.
|
+#if defined(OS_CHROMEOS) |
+ if (base::SysInfo::IsRunningOnChromeOS()) { |
+ BPF_ASSERT_EQ(true, supports_multi_threaded); |
+ } |
+// else a ChromeOS build not running on a ChromeOS device e.g. chrome bots. |
Jorge Lucangeli Obes
2014/12/03 17:19:38
Same nit, and you probably want to capitalize Chro
leecam
2014/12/03 17:25:23
Done.
|
+// In this case fall through. |
+#endif |
+ if (!supports_multi_threaded) { |
return; |
} |