Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions compiler-rt/test/fuzzer/fork-sigusr.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# 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

RUN: %run %t/ForkSIGUSR -fork=3 -ignore_crashes=1 2>%t/log & export PID=$!
# 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: sleep 3
RUN: kill -SIGUSR2 $PID
RUN: kill -SIGUSR2 %{readfile:%t2}
RUN: sleep 6
RUN: cat %t/log | FileCheck %s --dump-input=fail

Expand Down
9 changes: 6 additions & 3 deletions compiler-rt/test/fuzzer/sigint.test
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
REQUIRES: shell, msan
REQUIRES: msan
UNSUPPORTED: target=arm{{.*}}

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

RUN: %run %t/LFSIGINT 2> %t/log & export PID=$!
# 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: sleep 2
RUN: kill -SIGINT $PID
RUN: kill -SIGINT %{readfile:%t2}
RUN: sleep 3
RUN: cat %t/log | FileCheck %s

Expand Down
8 changes: 5 additions & 3 deletions compiler-rt/test/fuzzer/sigusr.test
Original file line number Diff line number Diff line change
@@ -1,15 +1,17 @@
# 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

RUN: %run %t/LFSIGUSR 2> %t/log & export PID=$!
# 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: sleep 2
RUN: kill -SIGUSR1 $PID
RUN: kill -SIGUSR1 %{readfile:%t2}
RUN: sleep 3
RUN: cat %t/log | FileCheck %s

Expand Down
3 changes: 2 additions & 1 deletion compiler-rt/test/msan/allocator_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
// mapping the heap early, in __msan_init.
//
// RUN: %clangxx_msan -O0 %s -o %t_1
// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
// RUN: %run %t_1 > %t_3
// RUN: %clangxx_msan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %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
Expand Down
3 changes: 2 additions & 1 deletion compiler-rt/test/nsan/Posix/allocator_mapping.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
/// 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: %clangxx_nsan -O0 -DHEAP_ADDRESS=$(%run %t_1) %s -o %t_2 && %run %t_2
// RUN: %run %t_1 > %t_3
// RUN: %clangxx_nsan -O0 -DHEAP_ADDRESS=%{readfile:%t_3} %s -o %t_2 && %run %t_2

#include <assert.h>
#include <stdio.h>
Expand Down