OSDN Git Service

[libFuzzer] make the single-run output more reliable
authorKostya Serebryany <kcc@google.com>
Fri, 17 Jun 2016 13:07:06 +0000 (13:07 +0000)
committerKostya Serebryany <kcc@google.com>
Fri, 17 Jun 2016 13:07:06 +0000 (13:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@272998 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Fuzzer/FuzzerDriver.cpp
lib/Fuzzer/test/fuzzer-singleinputs.test

index 4e980bf..08a5e19 100644 (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);
index 1657ccd..a4faf2c 100644 (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