From 61aef978d6ab1553c48bbd9bf807a277b22451c1 Mon Sep 17 00:00:00 2001 From: Eric Date: Wed, 29 Nov 2023 18:01:18 -0500 Subject: [PATCH] Compile MSAN/TSAN failing test with -O1 (#73555) This attempts to fix flakes on the bots where the modified test times out while running under sanitizers. Turning on the optimizer for just this test appears to mostly fix the issue. --- .../sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp | 4 ++++ .../rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp index 946c2cfabf02..4a694e0dd71c 100644 --- a/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp +++ b/libcxx/test/std/containers/sequences/deque/deque.modifiers/insert_iter_iter.pass.cpp @@ -9,6 +9,10 @@ // REQUIRES: long_tests // UNSUPPORTED: GCC-ALWAYS_INLINE-FIXME +// This test chokes on the sanitizers during CI runs. It appears we can address most of this by simply enabling optimizations. +// ADDITIONAL_COMPILE_FLAGS(msan): -O1 +// ADDITIONAL_COMPILE_FLAGS(tsan): -O1 + // // template diff --git a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp index d98a73d29666..9ab8b6f42749 100644 --- a/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp +++ b/libcxx/test/std/numerics/rand/rand.dist/rand.dist.bern/rand.dist.bern.negbin/eval.pass.cpp @@ -8,6 +8,10 @@ // // REQUIRES: long_tests +// This test is super slow, in particular with msan or tsan. In order to avoid timeouts and to +// spend less time waiting for this particular test to complete we compile with optimizations. +// ADDITIONAL_COMPILE_FLAGS: -O1 + // // template