Skip to content

[sanitizer] Skip hanging tests on FreeBSD - #216703

Open
rorth wants to merge 1 commit into
llvm:mainfrom
rorth:compiler-rt-sanitizer-freebsd-skip
Open

[sanitizer] Skip hanging tests on FreeBSD#216703
rorth wants to merge 1 commit into
llvm:mainfrom
rorth:compiler-rt-sanitizer-freebsd-skip

Conversation

@rorth

@rorth rorth commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

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.

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`.
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-compiler-rt-sanitizer

Author: Rainer Orth (rorth)

Changes

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.


Full diff: https://github.com/llvm/llvm-project/pull/216703.diff

3 Files Affected:

  • (modified) compiler-rt/test/msan/fork.cpp (+1-1)
  • (modified) compiler-rt/test/sanitizer_common/TestCases/Posix/fork_threaded.c (+3)
  • (modified) compiler-rt/test/tsan/fork_multithreaded.cpp (+2)
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>

@rorth rorth added this to the LLVM 23.x Release milestone Aug 18, 2026
@github-project-automation github-project-automation Bot moved this to Needs Triage in LLVM Release Status Aug 18, 2026
@dyung dyung moved this from Needs Triage to Needs Backport PR in LLVM Release Status Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Needs Backport PR

Development

Successfully merging this pull request may close these issues.

2 participants