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 UNSUPPORTED: darwin, target={{.*windows.*}}
7 RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
9 RUN: mkdir -p %t/C1 %t/C2
26 # Run in new session so we can easily kill child processes all at once.
27 RUN: setsid %run %t/LFSIGUSR -merge=1 -merge_control_file=%t/MCF %t/C1 %t/C2 2>%t/log & export PID=$!
29 RUN: kill -SIGUSR2 -$(ps -o sess= $PID | grep -o '[0-9]*')
30 RUN: wait $PID || true
32 RUN: cat %t/log | FileCheck %s --dump-input=fail
34 RUN: grep STARTED %t/MCF
35 RUN: tail -n 2 %t/MCF | grep FT
36 RUN: tail -n 1 %t/MCF | grep COV
38 CHECK: INFO: signal received, trying to exit gracefully
39 CHECK: INFO: libFuzzer: exiting as requested