[PATCH] D29547: [libFuzzer] Split fuzzer-jobs for different platforms.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 4 14:06:33 PST 2017

mpividori created this revision.

I add `fuzzer-jobs-win.test` for Windows.



Index: lib/Fuzzer/test/fuzzer-jobs-win.test
--- /dev/null
+++ lib/Fuzzer/test/fuzzer-jobs-win.test
@@ -0,0 +1,28 @@
+REQUIRES: windows
+RUN: rm -rf %tmp
+RUN: mkdir %tmp && cd %tmp
+# Create a shared corpus directory
+RUN: rm -rf FuzzerJobsTestCORPUS
+RUN: mkdir FuzzerJobsTestCORPUS
+RUN: rm -f fuzz-{0,1}.log
+# Start fuzzer and in parallel check that the output files
+# that should be created exist.
+RUN: cmd /c "start /b LLVMFuzzer-EmptyTest -max_total_time=4 -jobs=2 -workers=2 FuzzerJobsTestCORPUS > %t-fuzzer-jobs-test.log 2>&1 && \
+# Wait a short while to give time for the child processes
+# to start fuzzing
+RUN: sleep 2 && \
+# If the instances are running in parallel they should have created their log
+# files by now.
+RUN: ls fuzz-0.log && \
+RUN: ls fuzz-1.log && \
+# Check if libFuzzer is still running.
+RUN: tasklist | grep LLVMFuzzer-EmptyTest"
+RUN: rm -f fuzz-{0,1}.log
+RUN: rm -rf FuzzerJobsTestCORPUS
+RUN: FileCheck -input-file=%t-fuzzer-jobs-test.log %s
+RUN: rm %t-fuzzer-jobs-test.log
+CHECK-DAG: Job 0 exited with exit code 0
+CHECK-DAG: Job 1 exited with exit code 0

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29547.87107.patch
Type: text/x-patch
Size: 1177 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170204/05469392/attachment.bin>

More information about the llvm-commits mailing list