aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest
diff options
context:
space:
mode:
authorAlexander Bulekov <alxndr@bu.edu>2020-10-23 11:07:42 -0400
committerThomas Huth <thuth@redhat.com>2020-10-26 09:53:53 +0100
commit82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f (patch)
tree404b041f77eae9f57f292b05031e258ea490dede /tests/qtest
parent2f2e036ca6e2c4d15841f6d29a17c2ae0961aca8 (diff)
downloadqemu-82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f.zip
qemu-82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f.tar.gz
qemu-82849bcf30b5a1dfac6c1d7642a243c2f7bd6a6f.tar.bz2
fuzz: add an "opaque" to the FuzzTarget struct
It can be useful to register FuzzTargets that have nearly-identical initialization handlers (e.g. for using the same fuzzing code, with different configuration options). Add an opaque pointer to the FuzzTarget struct, so that FuzzTargets can hold some data, useful for storing target-specific configuration options, that can be read by the get_init_cmdline function. Reviewed-by: Darren Kenny <darren.kenny@oracle.com> Signed-off-by: Alexander Bulekov <alxndr@bu.edu> Message-Id: <20201023150746.107063-14-alxndr@bu.edu> Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/qtest')
-rw-r--r--tests/qtest/fuzz/fuzz.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tests/qtest/fuzz/fuzz.h b/tests/qtest/fuzz/fuzz.h
index ed9ce17..08e9560 100644
--- a/tests/qtest/fuzz/fuzz.h
+++ b/tests/qtest/fuzz/fuzz.h
@@ -100,6 +100,7 @@ typedef struct FuzzTarget {
uint8_t *out, size_t max_out_size,
unsigned int seed);
+ void *opaque;
} FuzzTarget;
void flush_events(QTestState *);