summaryrefslogtreecommitdiffstats
path: root/compiler-rt/test
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2019-02-16 00:14:16 +0000
committerKostya Serebryany <kcc@google.com>2019-02-16 00:14:16 +0000
commit312af158b0b866fcde2d9d2c8cae8fc6ed8942bb (patch)
treedbd6e9e1e507410e64f611d577e34427756cd07b /compiler-rt/test
parent81086e2a6531dc0ffb2126e62c267fdee8f1ff29 (diff)
downloadbcm5719-llvm-312af158b0b866fcde2d9d2c8cae8fc6ed8942bb.tar.gz
bcm5719-llvm-312af158b0b866fcde2d9d2c8cae8fc6ed8942bb.zip
[libFuzzer] fork mode: try harder to cleanup after itself
llvm-svn: 354186
Diffstat (limited to 'compiler-rt/test')
-rw-r--r--compiler-rt/test/fuzzer/fork-sigusr.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/compiler-rt/test/fuzzer/fork-sigusr.test b/compiler-rt/test/fuzzer/fork-sigusr.test
new file mode 100644
index 00000000000..f00a8b387b8
--- /dev/null
+++ b/compiler-rt/test/fuzzer/fork-sigusr.test
@@ -0,0 +1,15 @@
+# Check that libFuzzer honors SIGUSR1/SIGUSR2
+# FIXME: Disabled on Windows for now because of reliance on posix only features
+# (eg: export, "&", pkill).
+UNSUPPORTED: darwin, windows
+RUN: rm -rf %t
+RUN: mkdir -p %t
+RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t/ForkSIGUSR
+
+RUN: %run %t/ForkSIGUSR -fork=3 -rss_limit_mb=128 -ignore_crashes=1 2> %t/log & export PID=$!
+RUN: sleep 3
+RUN: pkill -SIGUSR2 -f %t/ForkSIGUSR
+RUN: sleep 3
+RUN: cat %t/log | FileCheck %s
+
+CHECK: libFuzzer: {{.*}}exiting
OpenPOWER on IntegriCloud