[PATCH] D29546: [libFuzzer] Improve fuzzer-jobs test for Posix.

Marcos Pividori via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 6 14:48:26 PST 2017


mpividori updated this revision to Diff 87310.

https://reviews.llvm.org/D29546

Files:
  lib/Fuzzer/test/fuzzer-jobs.test


Index: lib/Fuzzer/test/fuzzer-jobs.test
===================================================================
--- lib/Fuzzer/test/fuzzer-jobs.test
+++ lib/Fuzzer/test/fuzzer-jobs.test
@@ -1,3 +1,5 @@
+REQUIRES: posix
+
 RUN: rm -rf %tmp
 RUN: mkdir %tmp && cd %tmp
 # Create a shared corpus directory
@@ -14,16 +16,14 @@
 # files by now.
 RUN: ls fuzz-0.log
 RUN: ls fuzz-1.log
+# Check if libFuzzer is still running.
+RUN: kill -0 ${FUZZER_PID}
 # Wait for libfuzzer to finish.
-# This probably isn't portable but we need a way to block until
-# the fuzzer is done otherwise we might remove the files while
-# they are being used.
-RUN: while kill -0 ${FUZZER_PID}; do : ; done
+RUN: wait ${FUZZER_PID}
 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
-RUN: cd ../
 
 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: D29546.87310.patch
Type: text/x-patch
Size: 950 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170206/0e01bfe7/attachment.bin>


More information about the llvm-commits mailing list