qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

fuzz: Add support for logging QTest commands

Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
Message-Id: <20200529221450.26673-3-alxndr@bu.edu>
Reviewed-by: Darren Kenny <darren.kenny@oracle.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>

authored by

Alexander Bulekov and committed by
Thomas Huth
8efebd4e d92e1b6d

+8 -1
+8 -1
tests/qtest/fuzz/fuzz.c
··· 94 94 printf("Alternatively, add -target-FUZZ_TARGET to the executable name\n\n" 95 95 "Set the environment variable FUZZ_SERIALIZE_QTEST=1 to serialize\n" 96 96 "QTest commands into an ASCII protocol. Useful for building crash\n" 97 - "reproducers, but slows down execution.\n"); 97 + "reproducers, but slows down execution.\n\n" 98 + "Set the environment variable QTEST_LOG=1 to log all qtest commands" 99 + "\n"); 98 100 exit(0); 99 101 } 100 102 ··· 197 199 198 200 /* Run QEMU's softmmu main with the fuzz-target dependent arguments */ 199 201 const char *init_cmdline = fuzz_target->get_init_cmdline(fuzz_target); 202 + init_cmdline = g_strdup_printf("%s -qtest /dev/null -qtest-log %s", 203 + init_cmdline, 204 + getenv("QTEST_LOG") ? "/dev/fd/2" 205 + : "/dev/null"); 206 + 200 207 201 208 /* Split the runcmd into an argv and argc */ 202 209 wordexp_t result;