summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Smith <peter.smith@linaro.org>2019-05-01 12:30:04 +0000
committerPeter Smith <peter.smith@linaro.org>2019-05-01 12:30:04 +0000
commit6cd423889971c0d97801a9f3b9b5afb91ae9c137 (patch)
tree96da1c93439b29a4e98ca1050840a0e6b76a7956
parent9a0fde3bf0ef3848344e03b711ec7e866ce9ead2 (diff)
downloadcompiler-rt-6cd423889971c0d97801a9f3b9b5afb91ae9c137.tar.gz
[libFuzzer] Add --dump-input-on-failure to help diagnose AArch64 failures
The fork-siguser.test and fork.test intermittently fail on the AArch64 buildbot. Unfortunately these failures are not reproducible on a similar machine and seem to fail when the machines are under load. Before suggesting the tests be marked unsupported for AArch64 we'd like to see if we can get some more information about the failures to see if it helps us reproduce. This patch adds --dump-input-on-failure to the FileCheck commands to see if we can get some more information about the failures. Differential Revision: https://reviews.llvm.org/D61315 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@359675 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/fuzzer/fork-sigusr.test2
-rw-r--r--test/fuzzer/fork.test10
2 files changed, 6 insertions, 6 deletions
diff --git a/test/fuzzer/fork-sigusr.test b/test/fuzzer/fork-sigusr.test
index ea2e56ca9..bceca7127 100644
--- a/test/fuzzer/fork-sigusr.test
+++ b/test/fuzzer/fork-sigusr.test
@@ -9,6 +9,6 @@ RUN: %run %t/ForkSIGUSR -fork=3 -rss_limit_mb=128 -ignore_crashes=1 2> %t/log &
RUN: sleep 3
RUN: pkill -SIGUSR2 -f %t/ForkSIGUSR
RUN: sleep 3
-RUN: cat %t/log | FileCheck %s
+RUN: cat %t/log | FileCheck %s --dump-input-on-failure
CHECK: libFuzzer: {{.*}}exiting
diff --git a/test/fuzzer/fork.test b/test/fuzzer/fork.test
index 9de17f324..f748ad167 100644
--- a/test/fuzzer/fork.test
+++ b/test/fuzzer/fork.test
@@ -1,21 +1,21 @@
# UNSUPPORTED: darwin, freebsd
BINGO: BINGO
RUN: %cpp_compiler %S/SimpleTest.cpp -o %t-SimpleTest
-RUN: not %run %t-SimpleTest -fork=1 2>&1 | FileCheck %s --check-prefix=BINGO
+RUN: not %run %t-SimpleTest -fork=1 2>&1 | FileCheck %s --dump-input-on-failure --check-prefix=BINGO
TIMEOUT: ERROR: libFuzzer: timeout
RUN: %cpp_compiler %S/TimeoutTest.cpp -o %t-TimeoutTest
-RUN: not %run %t-TimeoutTest -fork=1 -timeout=1 -ignore_timeouts=0 2>&1 | FileCheck %s --check-prefix=TIMEOUT
+RUN: not %run %t-TimeoutTest -fork=1 -timeout=1 -ignore_timeouts=0 2>&1 | FileCheck %s --dump-input-on-failure --check-prefix=TIMEOUT
OOM: ERROR: libFuzzer: out-of-memory
RUN: %cpp_compiler %S/OutOfMemoryTest.cpp -o %t-OutOfMemoryTest
-RUN: not %run %t-OutOfMemoryTest -fork=1 -ignore_ooms=0 -rss_limit_mb=128 2>&1 | FileCheck %s --check-prefix=OOM
+RUN: not %run %t-OutOfMemoryTest -fork=1 -ignore_ooms=0 -rss_limit_mb=128 2>&1 | FileCheck %s --dump-input-on-failure --check-prefix=OOM
# access-violation is the error thrown on Windows. Address will be smaller on i386.
CRASH: {{SEGV|access-violation}} on unknown address 0x00000000
RUN: %cpp_compiler %S/ShallowOOMDeepCrash.cpp -o %t-ShallowOOMDeepCrash
-RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 2>&1 | FileCheck %s --check-prefix=CRASH
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 2>&1 | FileCheck %s --dump-input-on-failure --check-prefix=CRASH
MAX_TOTAL_TIME: INFO: fuzzed for {{.*}} seconds, wrapping up soon
MAX_TOTAL_TIME: INFO: exiting: {{.*}} time:
-RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 -ignore_crashes=1 -max_total_time=5 2>&1 | FileCheck %s --check-prefix=MAX_TOTAL_TIME
+RUN: not %run %t-ShallowOOMDeepCrash -fork=1 -rss_limit_mb=128 -ignore_crashes=1 -max_total_time=5 2>&1 | FileCheck %s --dump-input-on-failure --check-prefix=MAX_TOTAL_TIME