diff options
author | Kostya Serebryany <kcc@google.com> | 2019-02-12 00:12:33 +0000 |
---|---|---|
committer | Kostya Serebryany <kcc@google.com> | 2019-02-12 00:12:33 +0000 |
commit | 63f48717b58d76523fdbfdba6fa1e2c10ae9e3da (patch) | |
tree | 4d83c194d8dd5d507aac81d062664802b4df0929 /compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp | |
parent | 9ebc9dbd3c7d8ce5fb35d3d166279b39808dac0b (diff) | |
download | bcm5719-llvm-63f48717b58d76523fdbfdba6fa1e2c10ae9e3da.tar.gz bcm5719-llvm-63f48717b58d76523fdbfdba6fa1e2c10ae9e3da.zip |
[libFuzzer] extend the -fork=1 functionality. Still not fully usable, but good enough for the first unit test
llvm-svn: 353775
Diffstat (limited to 'compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp')
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp b/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp index 0daed83e5eb..54c511ed060 100644 --- a/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerIOPosix.cpp @@ -136,11 +136,18 @@ bool IsInterestingCoverageFile(const std::string &FileName) { return true; } - void RawPrint(const char *Str) { write(2, Str, strlen(Str)); } +void MkDir(const std::string &Path) { + mkdir(Path.c_str(), 0700); +} + +void RmDir(const std::string &Path) { + rmdir(Path.c_str()); +} + } // namespace fuzzer #endif // LIBFUZZER_POSIX |