[libFuzzer] make the single-run output more reliable

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272998 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Kostya Serebryany 2016-06-17 13:07:06 +00:00
parent 95f474f922
commit ee71b6abb0
2 changed files with 4 additions and 4 deletions

View File

@ -374,12 +374,12 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
Inputs->size(), Runs);
for (auto &Path : *Inputs) {
auto StartTime = system_clock::now();
Printf("%s ... ", Path.c_str());
Printf("Running: %s\n", 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("%zd ms\n", (long)MS);
Printf("Executed %s in %zd ms\n", Path.c_str(), (long)MS);
}
F.PrintFinalStats();
exit(0);

View File

@ -8,6 +8,6 @@ RUN: echo bbb > %tmp/SINGLE_INPUTS/bbb
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 in
SINGLE_INPUTS: bbb in