blob: a03e5440a8b88fa39e5ded849a4635bfa14ddfa3 [file] [log] [blame]
# Check that libFuzzer honors SIGUSR1/SIGUSR2
UNSUPPORTED: darwin
RUN: rm -rf %t
RUN: mkdir -p %t
RUN: %cpp_compiler %S/SleepOneSecondTest.cpp -o %t/LFSIGUSR
RUN: mkdir -p %t/C1 %t/C2
RUN: echo a > %t/C2/a
RUN: echo b > %t/C2/b
RUN: echo c > %t/C2/c
RUN: echo d > %t/C2/d
RUN: echo e > %t/C2/e
RUN: echo f > %t/C2/f
RUN: echo g > %t/C2/g
RUN: %run %t/LFSIGUSR -merge=1 -merge_control_file=%t/MCF %t/C1 %t/C2 2> %t/log & export PID=$!
RUN: sleep 3
RUN: pkill -SIGUSR2 -f %t/LFSIGUSR
RUN: sleep 3
RUN: cat %t/log | FileCheck %s
RUN: grep C2/g %t/MCF
RUN: grep STARTED %t/MCF
RUN: tail -n 1 %t/MCF | grep DONE
CHECK: INFO: signal received, trying to exit gracefully
CHECK: INFO: libFuzzer: exiting as requested