Skip to content

Conversation

cmtice
Copy link
Contributor

@cmtice cmtice commented Sep 26, 2025

Reverts #160728

That appeared to be causing a buildbot failure; reverting this change while I investigate.

https://lab.llvm.org/buildbot/#/builders/174/builds/25130

@llvmbot
Copy link
Member

llvmbot commented Sep 26, 2025

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

Author: None (cmtice)

Changes

Reverts llvm/llvm-project#160728

That appeared to be causing a buildbot failure; reverting this change while I investigate.

https://lab.llvm.org/buildbot/#/builders/174/builds/25130


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

5 Files Affected:

  • (modified) compiler-rt/test/fuzzer/fork-sigusr.test (+3-5)
  • (modified) compiler-rt/test/fuzzer/sigint.test (+3-6)
  • (modified) compiler-rt/test/fuzzer/sigusr.test (+3-5)
  • (modified) compiler-rt/test/msan/allocator_mapping.cpp (+1-2)
  • (modified) compiler-rt/test/nsan/Posix/allocator_mapping.cpp (+1-2)
diff --git a/compiler-rt/test/fuzzer/fork-sigusr.test b/compiler-rt/test/fuzzer/fork-sigusr.test
index 226c4147b7380..088e63cae4311 100644
--- a/compiler-rt/test/fuzzer/fork-sigusr.test
+++ b/compiler-rt/test/fuzzer/fork-sigusr.test
@@ -1,16 +1,14 @@
 # Check that libFuzzer honors SIGUSR1/SIGUSR2
 # Disabled on Windows which does not have SIGUSR1/SIGUSR2.
+REQUIRES: shell
 UNSUPPORTED: darwin, target={{.*windows.*}}, target=aarch64{{.*}}
 RUN: rm -rf %t
 RUN: mkdir -p %t
 RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/ForkSIGUSR
 
-# The line below needs the " | env" at the end, in order to make the
-# script continue executing, rather than waiting (forever) for the
-# 'nohup run...' command to finish.
-RUN: bash -c "nohup %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & echo -n $! > %t2" | env
+RUN: %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & export PID=$!
 RUN: sleep 3
-RUN: kill -SIGUSR2 %{readfile:%t2}
+RUN: kill -SIGUSR2 $PID
 RUN: sleep 6
 RUN: cat %t/log | FileCheck %s --dump-input=fail
 
diff --git a/compiler-rt/test/fuzzer/sigint.test b/compiler-rt/test/fuzzer/sigint.test
index aa112f086066f..ac482d79b8e28 100644
--- a/compiler-rt/test/fuzzer/sigint.test
+++ b/compiler-rt/test/fuzzer/sigint.test
@@ -1,4 +1,4 @@
-REQUIRES: msan
+REQUIRES: shell, msan
 UNSUPPORTED: target=arm{{.*}}
 
 # Check that libFuzzer exits gracefully under SIGINT with MSan.
@@ -6,12 +6,9 @@ RUN: rm -rf %t
 RUN: mkdir -p %t
 RUN: %msan_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGINT
 
-# The line below needs the " | env" at the end, in order to make the
-# script continue executing, rather than waiting (forever) for the
-# 'nohup run...' command to finish.
-RUN: bash -c "nohup %run %t/LFSIGINT 2> %t/log & echo -n $! > %t2" | env
+RUN: %run %t/LFSIGINT 2> %t/log & export PID=$!
 RUN: sleep 2
-RUN: kill -SIGINT %{readfile:%t2}
+RUN: kill -SIGINT $PID
 RUN: sleep 3
 RUN: cat %t/log | FileCheck %s
 
diff --git a/compiler-rt/test/fuzzer/sigusr.test b/compiler-rt/test/fuzzer/sigusr.test
index 0c1d29231e1a0..c8a77ac63a6d7 100644
--- a/compiler-rt/test/fuzzer/sigusr.test
+++ b/compiler-rt/test/fuzzer/sigusr.test
@@ -1,17 +1,15 @@
 # FIXME: Disabled on Windows for now because of reliance on posix only features
 # (eg: export, "&", pkill).
+REQUIRES: shell
 UNSUPPORTED: darwin, target={{.*windows.*}}
 # Check that libFuzzer honors SIGUSR1/SIGUSR2
 RUN: rm -rf %t
 RUN: mkdir -p %t
 RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
 
-# The line below needs the " | env" at the end, in order to make the
-# script continue executing, rather than waiting (forever) for the
-# 'nohup run...' command to finish.
-RUN: bash -c "nohup %run %t/LFSIGUSR 2> %t/log & echo -n $! > %t2"| env
+RUN: %run %t/LFSIGUSR 2> %t/log & export PID=$!
 RUN: sleep 2
-RUN: kill -SIGUSR1 %{readfile:%t2}
+RUN: kill -SIGUSR1 $PID
 RUN: sleep 3
 RUN: cat %t/log | FileCheck %s
 
diff --git a/compiler-rt/test/msan/allocator_mapping.cpp b/compiler-rt/test/msan/allocator_mapping.cpp
index aa48863861ecb..e7a12da489152 100644
--- a/compiler-rt/test/msan/allocator_mapping.cpp
+++ b/compiler-rt/test/msan/allocator_mapping.cpp
@@ -3,8 +3,7 @@
 // mapping the heap early, in __msan_init.
 //
 // RUN: %clangxx_msan -O0 %s -o %t_1
-// RUN: %run %t_1 > %t_3
-// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %s -o %t_2 && %run %t_2
+// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
 //
 // This test only makes sense for the 64-bit allocator. The 32-bit allocator
 // does not have a fixed mapping. Exclude platforms that use the 32-bit
diff --git a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
index 8be5008686385..3a3e655e259d0 100644
--- a/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
+++ b/compiler-rt/test/nsan/Posix/allocator_mapping.cpp
@@ -2,8 +2,7 @@
 /// Test that a module constructor can not map memory over the NSan heap
 /// (without MAP_FIXED, of course).
 // RUN: %clangxx_nsan -O0 %s -o %t_1
-// RUN: %run %t_1 > %t_3
-// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %s -o %t_2 && %run %t_2
+// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
 
 #include <assert.h>
 #include <stdio.h>

@cmtice cmtice requested a review from dyung September 26, 2025 20:45
@fmayer
Copy link
Contributor

fmayer commented Sep 26, 2025

(consider using skip-precommit-approval label and submitting without review for clean reverts)

@cmtice cmtice merged commit 9534190 into main Sep 26, 2025
12 of 14 checks passed
@cmtice cmtice deleted the revert-160728-comp-rt-internal-shell branch September 26, 2025 20:48
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
llvm#160949)

Reverts llvm#160728

That appeared to be causing a buildbot failure; reverting this change
while I investigate.

https://lab.llvm.org/buildbot/#/builders/174/builds/25130
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants