[PATCH] D22742: Fix `-jobs=<N>` where <N> > 1 and the number of workers is > 1 on macOS.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 2 15:52:02 PDT 2016


delcypher added inline comments.

================
Comment at: lib/Fuzzer/test/NoAbort.cpp:10
@@ +9,3 @@
+// This is a simple function that will never abort.
+extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
+  if (Size > 0 && Data[0] == 'H') {
----------------
kcc wrote:
> why not reuse EmptyTest.cpp? 
Oh I hadn't noticed `EmptyTest.cpp`. I'll use that instead.

================
Comment at: lib/Fuzzer/test/fuzzer-jobs.test:1
@@ +1,2 @@
+# FIXME: Do this in a new directory to avoid the fuzz-N.log
+# files from clobbering other tests. We should allow the names
----------------
kcc wrote:
> fix the FIXME
Oops. I didn't remove the FIXME I left for myself. The implementation actually makes a temporary directory. The FIXME should actually state that doing this wouldn't be necessary if we could control the name of the fuzzing log files.

================
Comment at: lib/Fuzzer/test/fuzzer-jobs.test:13
@@ +12,3 @@
+# that should be created exist.
+RUN: LLVMFuzzer-NoAbort -max_total_time=4 -jobs=4 -workers=4 FuzzerJobsTestCORPUS > %t-fuzzer-jobs-test.log 2>&1 & export FUZZER_PID=$!
+# Wait a short while to give time for the child processes
----------------
kcc wrote:
> will two jobs be enough?
In principle two jobs should be fine. I need to test that the test case on macOS catches the problem with just two jobs.


https://reviews.llvm.org/D22742





More information about the llvm-commits mailing list