summaryrefslogtreecommitdiffstats
path: root/tests/qtest/fuzz/generic_fuzz_configs.h
diff options
context:
space:
mode:
Diffstat (limited to 'tests/qtest/fuzz/generic_fuzz_configs.h')
-rw-r--r--tests/qtest/fuzz/generic_fuzz_configs.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/qtest/fuzz/generic_fuzz_configs.h b/tests/qtest/fuzz/generic_fuzz_configs.h
index 51e69c6e42..5d599765c4 100644
--- a/tests/qtest/fuzz/generic_fuzz_configs.h
+++ b/tests/qtest/fuzz/generic_fuzz_configs.h
@@ -19,6 +19,16 @@ typedef struct generic_fuzz_config {
gchar* (*argfunc)(void); /* Result must be freeable by g_free() */
} generic_fuzz_config;
+static inline gchar *generic_fuzzer_virtio_9p_args(void){
+ char tmpdir[] = "/tmp/qemu-fuzz.XXXXXX";
+ g_assert_nonnull(mkdtemp(tmpdir));
+
+ return g_strdup_printf("-machine q35 -nodefaults "
+ "-device virtio-9p,fsdev=hshare,mount_tag=hshare "
+ "-fsdev local,id=hshare,path=%s,security_model=mapped-xattr,"
+ "writeout=immediate,fmode=0600,dmode=0700", tmpdir);
+}
+
const generic_fuzz_config predefined_configs[] = {
{
.name = "virtio-net-pci-slirp",
@@ -61,6 +71,16 @@ const generic_fuzz_config predefined_configs[] = {
.args = "-machine q35 -nodefaults -device virtio-mouse",
.objects = "virtio*",
},{
+ .name = "virtio-9p",
+ .argfunc = generic_fuzzer_virtio_9p_args,
+ .objects = "virtio*",
+ },{
+ .name = "virtio-9p-synth",
+ .args = "-machine q35 -nodefaults "
+ "-device virtio-9p,fsdev=hshare,mount_tag=hshare "
+ "-fsdev synth,id=hshare",
+ .objects = "virtio*",
+ },{
.name = "e1000",
.args = "-M q35 -nodefaults "
"-device e1000,netdev=net0 -netdev user,id=net0",