[compiler-rt] [fuzzer] Restrict merge-sigusr.test to Linux (PR #216702)
Rainer Orth via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 04:39:30 PDT 2026
https://github.com/rorth created https://github.com/llvm/llvm-project/pull/216702
The `fuzzer/merge-sigusr.test` test causes the whole `ninja check-all` run on NetBSD to be killed with `SIGUSR2`.
It turns out the test is highly Linux-specific in at least two ways:
- The `setsid` command doesn't exist on any of Darwin, FreeBSD, and NetBSD.
- `ps -o sess= <pid>` is highly unportable, too:
- FreeBSD `ps` doesn't have the `sess` keyword at all.
- NetBSD `ps` does, but with different semantics: it's the session pointer, not the session id as on Linux, which leads to randomly killing unrelated processes.
Therefore this patch restricts the test to Linux instead of simply skipping it on Darwin and Windows.
Tested on `x86_64-pc-netbsd11.0`, `x86_64-pc-linux-gnu`, and `x86_64-pc-freebsd15.1`.
>From fc54b1b4211443f88eb1571c4ce0f81e4d12b5c5 Mon Sep 17 00:00:00 2001
From: Rainer Orth <ro at gcc.gnu.org>
Date: Mon, 17 Aug 2026 11:30:58 +0200
Subject: [PATCH] [fuzzer] Restrict merge-sigusr.test to Linux
The `fuzzer/merge-sigusr.test` test causes the whole `ninja check-all` run
on NetBSD to be killed with `SIGUSR2`.
It turns out the test is highly Linux-specific in at least two ways:
- The `setsid` command doesn't exist on any of Darwin, FreeBSD, and NetBSD.
- `ps -o sess= <pid>` is highly unportable, too:
- FreeBSD `ps` doesn't have the `sess` keyword at all.
- NetBSD `ps` does, but with different semantics: it's the session
pointer, not the session id as on Linux, which leads to randomly
killing unrelated processes.
Therefore this patch restricts the test to Linux instead of simply skipping
it on Darwin and Windows.
Tested on `x86_64-pc-netbsd11.0`, `x86_64-pc-linux-gnu`, and
`x86_64-pc-freebsd15.1`.
---
compiler-rt/test/fuzzer/merge-sigusr.test | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/compiler-rt/test/fuzzer/merge-sigusr.test b/compiler-rt/test/fuzzer/merge-sigusr.test
index 81e264c8777d9..f65468f923863 100644
--- a/compiler-rt/test/fuzzer/merge-sigusr.test
+++ b/compiler-rt/test/fuzzer/merge-sigusr.test
@@ -1,7 +1,7 @@
# Check that libFuzzer honors SIGUSR1/SIGUSR2
-# FIXME: Disabled on Windows for now because of reliance on posix only features
-# (eg: export, "&", pkill).
-UNSUPPORTED: darwin, target={{.*windows.*}}
+# Requires Linux features (setsid, ps -o sess=). Also relies on posix only
+# features (eg: export, "&", pkill).
+REQUIRES: linux
RUN: rm -rf %t
RUN: mkdir -p %t
RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
More information about the llvm-commits
mailing list