From 6d782dd7745cc6b1c5fd42643daafdd6c9a3ec28 Mon Sep 17 00:00:00 2001 From: Kevin Hamacher Date: Tue, 2 Jul 2019 05:59:05 -0700 Subject: [PATCH] Deflake custom_fork_server test PiperOrigin-RevId: 256149331 Change-Id: I68cfd64ee602757235e6c6d602819a79ae4826fb --- .../sandbox2/examples/custom_fork/custom_fork_sandbox.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sandboxed_api/sandbox2/examples/custom_fork/custom_fork_sandbox.cc b/sandboxed_api/sandbox2/examples/custom_fork/custom_fork_sandbox.cc index 3a45f66..8476a17 100644 --- a/sandboxed_api/sandbox2/examples/custom_fork/custom_fork_sandbox.cc +++ b/sandboxed_api/sandbox2/examples/custom_fork/custom_fork_sandbox.cc @@ -110,6 +110,14 @@ int main(int argc, char** argv) { gflags::ParseCommandLineFlags(&argc, &argv, true); google::InitGoogleLogging(argv[0]); + // This test is incompatible with sanitizers. + // The `SKIP_SANITIZERS_AND_COVERAGE` macro won't work for us here since we + // need to return something. +#if defined(ADDRESS_SANITIZER) || defined(MEMORY_SANITIZER) || \ + defined(THREAD_SANITIZER) + return EXIT_SUCCESS; +#endif + // Start a custom fork-server (via sandbox2::Executor). const std::string path = sandbox2::GetInternalDataDependencyFilePath( "sandbox2/examples/custom_fork/custom_fork_bin");