forked from OSchip/llvm-project
[libFuzzer] fail if the corpus dir does not exist
llvm-svn: 259454
This commit is contained in:
parent
e67b402e45
commit
078e984d8d
|
@ -32,7 +32,7 @@ static std::vector<std::string> ListFilesInDir(const std::string &Dir,
|
|||
std::vector<std::string> V;
|
||||
if (Epoch) {
|
||||
auto E = GetEpoch(Dir);
|
||||
if (*Epoch >= E) return V;
|
||||
if (E && *Epoch >= E) return V;
|
||||
*Epoch = E;
|
||||
}
|
||||
DIR *D = opendir(Dir.c_str());
|
||||
|
|
|
@ -42,3 +42,6 @@ RUN: not LLVMFuzzer-InitializeTest 2>&1 | FileCheck %s
|
|||
|
||||
RUN: LLVMFuzzer-SimpleCmpTest -seed=-1 -runs=0 2>&1 | FileCheck %s --check-prefix=CHECK_SEED_MINUS_ONE
|
||||
CHECK_SEED_MINUS_ONE: Seed: 4294967295
|
||||
|
||||
RUN: not LLVMFuzzer-SimpleTest NONEXISTENT_DIR 2>&1 | FileCheck %s --check-prefix=NONEXISTENT_DIR
|
||||
NONEXISTENT_DIR: No such directory: NONEXISTENT_DIR; exiting
|
||||
|
|
Loading…
Reference in New Issue