mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-31 20:51:52 +01:00
[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
This commit is contained in:
parent
2f92ae6c43
commit
409e80a364
@ -367,11 +367,12 @@ static int FuzzerDriver(const std::vector<std::string> &Args,
|
|||||||
Inputs->size(), Runs);
|
Inputs->size(), Runs);
|
||||||
for (auto &Path : *Inputs) {
|
for (auto &Path : *Inputs) {
|
||||||
auto StartTime = system_clock::now();
|
auto StartTime = system_clock::now();
|
||||||
|
Printf("%s ... ", Path.c_str());
|
||||||
for (int Iter = 0; Iter < Runs; Iter++)
|
for (int Iter = 0; Iter < Runs; Iter++)
|
||||||
RunOneTest(&F, Path.c_str());
|
RunOneTest(&F, Path.c_str());
|
||||||
auto StopTime = system_clock::now();
|
auto StopTime = system_clock::now();
|
||||||
auto MS = duration_cast<milliseconds>(StopTime - StartTime).count();
|
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();
|
F.PrintFinalStats();
|
||||||
exit(0);
|
exit(0);
|
||||||
|
@ -57,8 +57,8 @@ 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: LLVMFuzzer-SimpleTest %tmp/SINGLE_INPUTS/aaa %tmp/SINGLE_INPUTS/bbb 2>&1 | FileCheck %s --check-prefix=SINGLE_INPUTS
|
||||||
RUN: rm -rf %tmp/SINGLE_INPUTS
|
RUN: rm -rf %tmp/SINGLE_INPUTS
|
||||||
SINGLE_INPUTS: LLVMFuzzer-SimpleTest: Running 2 inputs 1 time(s) each.
|
SINGLE_INPUTS: LLVMFuzzer-SimpleTest: Running 2 inputs 1 time(s) each.
|
||||||
SINGLE_INPUTS: aaa:
|
SINGLE_INPUTS: aaa ...
|
||||||
SINGLE_INPUTS: bbb:
|
SINGLE_INPUTS: bbb ...
|
||||||
|
|
||||||
RUN: rm -rf %t/SUB1
|
RUN: rm -rf %t/SUB1
|
||||||
RUN: mkdir -p %t/SUB1/SUB2/SUB3
|
RUN: mkdir -p %t/SUB1/SUB2/SUB3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user