silentbicycle / theft

property-based testing for C: generate input to find obscure bugs, then reduce to minimal failing input
ISC License
611 stars 31 forks source link

fork() before trials, to shrink crashes/timeouts #6

Closed silentbicycle closed 7 years ago

silentbicycle commented 7 years ago

Add a fork flag to theft_run_config that makes theft fork before each trial. The child process would only run the trial function and report back over a pipe after (or crash, or time out). The parent process would wait for a response from the trial runner, SIGCHILD, etc.

This shouldn't be the default, because forking before each trial will slow everything down.

It may be worth putting fork and the timeout field in a nested struct field.