[Github] Label lldb-dap PRs (#125139)
[llvm-project.git] / compiler-rt / test / fuzzer / merge-sigusr.test
blob4e492775400b98db09434021c0b6439d36af2133
1 # Check that libFuzzer honors SIGUSR1/SIGUSR2
2 # FIXME: Disabled on Windows for now because of reliance on posix only features
3 # (eg: export, "&", pkill).
4 REQUIRES: shell
5 UNSUPPORTED: darwin, target={{.*windows.*}}
6 RUN: rm -rf %t
7 RUN: mkdir -p %t
8 RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
10 RUN: mkdir -p %t/C1 %t/C2
11 RUN: echo a > %t/C2/a
12 RUN: echo b > %t/C2/b
13 RUN: echo c > %t/C2/c
14 RUN: echo d > %t/C2/d
15 RUN: echo e > %t/C2/e
16 RUN: echo f > %t/C2/f
17 RUN: echo g > %t/C2/g
18 RUN: echo h > %t/C2/g
19 RUN: echo i > %t/C2/g
20 RUN: echo j > %t/C2/g
21 RUN: echo k > %t/C2/g
22 RUN: echo l > %t/C2/g
23 RUN: echo m > %t/C2/g
24 RUN: echo n > %t/C2/g
25 RUN: echo o > %t/C2/g
27 # Run in new session so we can easily kill child processes all at once.
28 RUN: setsid %run %t/LFSIGUSR -merge=1 -merge_control_file=%t/MCF %t/C1 %t/C2 2>%t/log & export PID=$!
29 RUN: sleep 3
30 RUN: kill -SIGUSR2 -$(ps -o sess= $PID | grep -o '[0-9]*')
31 RUN: wait $PID || true
32 RUN: sleep 3
33 RUN: cat %t/log | FileCheck %s --dump-input=fail
34 RUN: grep C2/g %t/MCF
35 RUN: grep STARTED %t/MCF
36 RUN: tail -n 2 %t/MCF | grep FT
37 RUN: tail -n 1 %t/MCF | grep COV
39 CHECK: INFO: signal received, trying to exit gracefully
40 CHECK: INFO: libFuzzer: exiting as requested