From aa2dc3a6a4276928be713d4f76cb693cd5ecf8c4 Mon Sep 17 00:00:00 2001 From: GHC GitLab CI Date: Mon, 5 Oct 2020 23:43:41 +0000 Subject: testsuite: Mark setnumcapabilities001 as broken with TSAN Due to #18808. --- hadrian/src/Flavour.hs | 1 + testsuite/driver/testglobals.py | 3 +++ testsuite/driver/testlib.py | 3 +++ testsuite/tests/concurrent/should_run/all.T | 1 + 4 files changed, 8 insertions(+) diff --git a/hadrian/src/Flavour.hs b/hadrian/src/Flavour.hs index 654a9199c8..e3efebfdf9 100644 --- a/hadrian/src/Flavour.hs +++ b/hadrian/src/Flavour.hs @@ -122,4 +122,5 @@ enableThreadSanitizer = addArgs $ mconcat , builder (Ghc LinkHs) ? arg "-optl-fsanitize=thread" , builder (Cc CompileC) ? (arg "-fsanitize=thread" <> arg "-DTSAN_ENABLED") , builder (Cabal Flags) ? arg "thread-sanitizer" + , builder RunTest ? arg "--config=have_thread_sanitizer=True" ] diff --git a/testsuite/driver/testglobals.py b/testsuite/driver/testglobals.py index c39ca7a8c9..7774096d0a 100644 --- a/testsuite/driver/testglobals.py +++ b/testsuite/driver/testglobals.py @@ -145,6 +145,9 @@ class TestConfig: # Is the compiler dynamically linked? self.ghc_dynamic = False + # Are we running in a ThreadSanitizer-instrumented build? + self.have_thread_sanitizer = False + # the timeout program self.timeout_prog = '' self.timeout = 300 diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py index e90c991adb..fad76a2220 100644 --- a/testsuite/driver/testlib.py +++ b/testsuite/driver/testlib.py @@ -554,6 +554,9 @@ def integer_simple( ) -> bool: def llvm_build ( ) -> bool: return config.ghc_built_by_llvm +def have_thread_sanitizer( ) -> bool: + return config.have_thread_sanitizer + # --- # Note [Measuring residency] diff --git a/testsuite/tests/concurrent/should_run/all.T b/testsuite/tests/concurrent/should_run/all.T index 9297c5890e..2b8375e61e 100644 --- a/testsuite/tests/concurrent/should_run/all.T +++ b/testsuite/tests/concurrent/should_run/all.T @@ -245,6 +245,7 @@ test('conc068', [ omit_ways(concurrent_ways), exit_code(1) ], compile_and_run, [ test('setnumcapabilities001', [ only_ways(['threaded1','threaded2', 'nonmoving_thr']), extra_run_opts('8 12 2000'), + when(have_thread_sanitizer(), expect_broken(18808)), req_smp ], compile_and_run, ['']) -- cgit v1.2.1