[libFuzzer] print the file name before executing the input so that if there is a crash we know which files has caused it
llvm-svn: 269450
diff --git a/llvm/lib/Fuzzer/FuzzerDriver.cpp b/llvm/lib/Fuzzer/FuzzerDriver.cpp
index 9bd991a..2d6f219 100644
--- a/llvm/lib/Fuzzer/FuzzerDriver.cpp
+++ b/llvm/lib/Fuzzer/FuzzerDriver.cpp
@@ -367,11 +367,12 @@
Inputs->size(), Runs);
for (auto &Path : *Inputs) {
auto StartTime = system_clock::now();
+ Printf("%s ... ", Path.c_str());
for (int Iter = 0; Iter < Runs; Iter++)
RunOneTest(&F, Path.c_str());
auto StopTime = system_clock::now();
auto MS = duration_cast<milliseconds>(StopTime - StartTime).count();
- Printf("%s: %zd ms\n", Path.c_str(), (long)MS);
+ Printf("%zd ms\n", (long)MS);
}
F.PrintFinalStats();
exit(0);
diff --git a/llvm/lib/Fuzzer/test/fuzzer.test b/llvm/lib/Fuzzer/test/fuzzer.test
index e56597d..bbdcc73 100644
--- a/llvm/lib/Fuzzer/test/fuzzer.test
+++ b/llvm/lib/Fuzzer/test/fuzzer.test
@@ -57,8 +57,8 @@
RUN: LLVMFuzzer-SimpleTest %tmp/SINGLE_INPUTS/aaa %tmp/SINGLE_INPUTS/bbb 2>&1 | FileCheck %s --check-prefix=SINGLE_INPUTS
RUN: rm -rf %tmp/SINGLE_INPUTS
SINGLE_INPUTS: LLVMFuzzer-SimpleTest: Running 2 inputs 1 time(s) each.
-SINGLE_INPUTS: aaa:
-SINGLE_INPUTS: bbb:
+SINGLE_INPUTS: aaa ...
+SINGLE_INPUTS: bbb ...
RUN: rm -rf %t/SUB1
RUN: mkdir -p %t/SUB1/SUB2/SUB3