[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 11:41:15 PST 2017


mpividori added a comment.

@kcc No. It doesn't run until killed. It runs until timeout.
` kill -0 ${FUZZER_PID};` only checks if the process if running and waits until it finishes with the while loop. But the condition could be false the first time you check. I mean, you are not checking if the process is still running after 2 seconds, you are only waiting.
Because of that, I modified the test to:

- First check if the process is running:

  kill -0 ${FUZZER_PID}

This retuns non-zero value if the process is not running.

- Second, wait for the process to finish:

  wait ${FUZZER_PID}

Instead of the while loop.


https://reviews.llvm.org/D29546





More information about the llvm-commits mailing list