Skip to content

Commit 9534190

Browse files
authored
Revert "[compiler-rt] Fix some tests to work with lit internal shell." (#160949)
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
1 parent 727aad1 commit 9534190

File tree

5 files changed

+11
-20
lines changed

5 files changed

+11
-20
lines changed

compiler-rt/test/fuzzer/fork-sigusr.test

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
# Check that libFuzzer honors SIGUSR1/SIGUSR2
22
# Disabled on Windows which does not have SIGUSR1/SIGUSR2.
3+
REQUIRES: shell
34
UNSUPPORTED: darwin, target={{.*windows.*}}, target=aarch64{{.*}}
45
RUN: rm -rf %t
56
RUN: mkdir -p %t
67
RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/ForkSIGUSR
78

8-
# The line below needs the " | env" at the end, in order to make the
9-
# script continue executing, rather than waiting (forever) for the
10-
# 'nohup run...' command to finish.
11-
RUN: bash -c "nohup %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & echo -n $! > %t2" | env
9+
RUN: %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & export PID=$!
1210
RUN: sleep 3
13-
RUN: kill -SIGUSR2 %{readfile:%t2}
11+
RUN: kill -SIGUSR2 $PID
1412
RUN: sleep 6
1513
RUN: cat %t/log | FileCheck %s --dump-input=fail
1614

compiler-rt/test/fuzzer/sigint.test

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
1-
REQUIRES: msan
1+
REQUIRES: shell, msan
22
UNSUPPORTED: target=arm{{.*}}
33

44
# Check that libFuzzer exits gracefully under SIGINT with MSan.
55
RUN: rm -rf %t
66
RUN: mkdir -p %t
77
RUN: %msan_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGINT
88

9-
# The line below needs the " | env" at the end, in order to make the
10-
# script continue executing, rather than waiting (forever) for the
11-
# 'nohup run...' command to finish.
12-
RUN: bash -c "nohup %run %t/LFSIGINT 2> %t/log & echo -n $! > %t2" | env
9+
RUN: %run %t/LFSIGINT 2> %t/log & export PID=$!
1310
RUN: sleep 2
14-
RUN: kill -SIGINT %{readfile:%t2}
11+
RUN: kill -SIGINT $PID
1512
RUN: sleep 3
1613
RUN: cat %t/log | FileCheck %s
1714

compiler-rt/test/fuzzer/sigusr.test

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
# FIXME: Disabled on Windows for now because of reliance on posix only features
22
# (eg: export, "&", pkill).
3+
REQUIRES: shell
34
UNSUPPORTED: darwin, target={{.*windows.*}}
45
# Check that libFuzzer honors SIGUSR1/SIGUSR2
56
RUN: rm -rf %t
67
RUN: mkdir -p %t
78
RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
89

9-
# The line below needs the " | env" at the end, in order to make the
10-
# script continue executing, rather than waiting (forever) for the
11-
# 'nohup run...' command to finish.
12-
RUN: bash -c "nohup %run %t/LFSIGUSR 2> %t/log & echo -n $! > %t2"| env
10+
RUN: %run %t/LFSIGUSR 2> %t/log & export PID=$!
1311
RUN: sleep 2
14-
RUN: kill -SIGUSR1 %{readfile:%t2}
12+
RUN: kill -SIGUSR1 $PID
1513
RUN: sleep 3
1614
RUN: cat %t/log | FileCheck %s
1715

compiler-rt/test/msan/allocator_mapping.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
// mapping the heap early, in __msan_init.
44
//
55
// RUN: %clangxx_msan -O0 %s -o %t_1
6-
// RUN: %run %t_1 > %t_3
7-
// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %s -o %t_2 && %run %t_2
6+
// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
87
//
98
// This test only makes sense for the 64-bit allocator. The 32-bit allocator
109
// does not have a fixed mapping. Exclude platforms that use the 32-bit

compiler-rt/test/nsan/Posix/allocator_mapping.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
/// Test that a module constructor can not map memory over the NSan heap
33
/// (without MAP_FIXED, of course).
44
// RUN: %clangxx_nsan -O0 %s -o %t_1
5-
// RUN: %run %t_1 > %t_3
6-
// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %s -o %t_2 && %run %t_2
5+
// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
76

87
#include <assert.h>
98
#include <stdio.h>

0 commit comments

Comments
 (0)