fuzz: enable dynamic args for generic-fuzz configs
commit8630b43f115d9736cbe9782f453a300ac3ba5af5
authorAlexander Bulekov <alxndr@bu.edu>
Sun, 17 Jan 2021 23:09:22 +0000 (17 18:09 -0500)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 8 Feb 2021 13:43:54 +0000 (8 14:43 +0100)
tree93265c442419f1750ea7e44d41fe1355df17b875
parent61f90e0461984438ddd5064d1c03133f561dc848
fuzz: enable dynamic args for generic-fuzz configs

For some device configurations, it is useful to configure some
resources, and adjust QEMU arguments at runtime, prior to fuzzing. This
patch adds an "argfunc" to generic the generic_fuzz_config. When
specified, it is responsible for configuring the resources and returning
a string containing the corresponding QEMU arguments. This can be useful
for targets that rely on e.g.:
 * a temporary qcow2 image
 * a temporary directory
 * an unused TCP port used to bind the VNC server

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20210117230924.449676-2-alxndr@bu.edu>
tests/qtest/fuzz/generic_fuzz.c
tests/qtest/fuzz/generic_fuzz_configs.h