[llvm-branch-commits] [compiler-rt] 01efbea - [sanitizer] Skip hanging tests on FreeBSD (#216703)

Tobias Hieta via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Sun Aug 30 10:13:23 PDT 2026


Author: Rainer Orth
Date: 2026-08-30T19:13:12+02:00
New Revision: 01efbea98550b7d5d1b71bb2aa09b8c15f3a7f53

URL: https://github.com/llvm/llvm-project/commit/01efbea98550b7d5d1b71bb2aa09b8c15f3a7f53
DIFF: https://github.com/llvm/llvm-project/commit/01efbea98550b7d5d1b71bb2aa09b8c15f3a7f53.diff

LOG: [sanitizer] Skip hanging tests on FreeBSD (#216703)

Three sanitizer tests hang indefinitely on FreeBSD:

```
MemorySanitizer-X86_64 :: fork.cpp
SanitizerCommon-tsan-x86_64-FreeBSD :: Posix/fork_threaded.c
ThreadSanitizer-x86_64 :: fork_multithreaded.cpp
```

All of them loop and don't time out, so they need to be terminated
manually for `ninja check-all` to complete. To avoid this, this patch
skips the affected tests.

Tested on `x86_64-pc-freebsd15.1`, `x86_64-pc-netbsd11.0` and
`x86_64-pc-linux-gnu`.

(cherry picked from commit cb2f67d1556c1232f99b4512a35129ec04f73c75)

Added: 
    

Modified: 
    compiler-rt/test/msan/fork.cpp
    compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
    compiler-rt/test/tsan/fork_multithreaded.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/msan/fork.cpp b/compiler-rt/test/msan/fork.cpp
index 438766ab4d99c..e39c852b093e8 100644
--- a/compiler-rt/test/msan/fork.cpp
+++ b/compiler-rt/test/msan/fork.cpp
@@ -15,7 +15,7 @@
 // UNSUPPORTED: powerpc64le-target-arch
 
 // Sometimes hangs
-// UNSUPPORTED: target={{.*netbsd.*}}
+// UNSUPPORTED: target={{.*(freebsd|netbsd).*}}
 
 #include <pthread.h>
 #include <unistd.h>

diff  --git a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
index 5f26ba2f330bd..88ba38a2d3a2f 100644
--- a/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
+++ b/compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c
@@ -14,6 +14,9 @@
 // UNSUPPORTED: target={{.*netbsd.*}}
 // UNSUPPORTED: target={{.*apple.*}}
 
+// FIXME: Loops indefinitely
+// UNSUPPORTED: target={{.*freebsd.*}} && tsan
+
 // Forking in multithread environment is unsupported. However we already have
 // some workarounds, and will add more, so this is the test.
 // The test try to check two things:

diff  --git a/compiler-rt/test/tsan/fork_multithreaded.cpp b/compiler-rt/test/tsan/fork_multithreaded.cpp
index 1d3ff8d34579b..dd240e41c5fee 100644
--- a/compiler-rt/test/tsan/fork_multithreaded.cpp
+++ b/compiler-rt/test/tsan/fork_multithreaded.cpp
@@ -1,5 +1,7 @@
 // RUN: %clangxx_tsan -O1 %s -o %t && %run %t 66 2>&1 | FileCheck %s -check-prefix=CHECK-DIE
 // RUN: %clangxx_tsan -O1 %s -o %t && %env_tsan_opts=die_after_fork=0 %run %t 2>&1 | FileCheck %s -check-prefix=CHECK-NODIE
+// FIXME: Loops indefinitely
+// UNSUPPORTED: target={{.*freebsd.*}}
 #include "test.h"
 #include <errno.h>
 #include <sys/types.h>


        


More information about the llvm-branch-commits mailing list