fuzz: adjust timeout to allow for longer inputs
authorAlexander Bulekov <alxndr@bu.edu>
Tue, 13 Jul 2021 15:00:35 +0000 (11:00 -0400)
committerAlexander Bulekov <alxndr@bu.edu>
Wed, 1 Sep 2021 11:33:13 +0000 (07:33 -0400)
commit993f52f4d43ddcddcb6f68b79a528599f4f099f9
tree8e0058355365985417189a686f215a647ed40a99
parentaf16990a1b3aac7a32a58cd4e3509e9e4d44fe69
fuzz: adjust timeout to allow for longer inputs

Using a custom timeout is useful to continue fuzzing complex devices,
even after we run into some slow code-path. However, simply adding a
fixed timeout to each input effectively caps the maximum input
length/number of operations at some artificial value. There are two
major problems with this:
1. Some code might only be reachable through long IO sequences.
2. Longer inputs can actually be _better_ for performance. While the
   raw number of fuzzer executions decreases with larger inputs, the
   number of MMIO/PIO/DMA operation/second actually increases, since
   were are speding proportionately less time fork()ing.

With this change, we keep the custom-timeout, but we renew it, prior to
each MMIO/PIO/DMA operation. Thus, we time-out only when a specific
operation takes a long time.

Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
tests/qtest/fuzz/generic_fuzz.c