]> git.ipfire.org Git - thirdparty/qemu.git/commitdiff
docs/devel/testing/fuzzing: Note that you can get qtest to read from a file
authorPeter Maydell <peter.maydell@linaro.org>
Tue, 28 Oct 2025 16:52:35 +0000 (16:52 +0000)
committerPeter Maydell <peter.maydell@linaro.org>
Mon, 3 Nov 2025 14:16:53 +0000 (14:16 +0000)
It is possible to get qtest to read fuzzer reproducers from a file
rather than directly from stdio; this is useful when you want to run
QEMU under gdb to debug the failure.  Document how to do this, which
was previously only written down in the commit message for
5b18a6bf44b9 ("chardev: Allow setting file chardev input file on the
command line").

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-id: 20251028165236.3327658-1-peter.maydell@linaro.org

docs/devel/testing/fuzzing.rst

index c3ac084311bd3e9496633609cc6ed37bfef90301..c43f815f320982f3a430ff1b38b78ba9b4499ac2 100644 (file)
@@ -263,6 +263,15 @@ generic-fuzz target.
 
 - Report the bug and send a patch with the C reproducer upstream
 
+QEMU can also read the reproducer directly from a file rather than
+from standard input::
+
+    $QEMU_PATH $QEMU_ARGS -qtest chardev:repro \
+      -chardev file,id=repro,path=/dev/null,input-path=/tmp/reproducer
+
+This is useful if you want to run QEMU under a debugger to investigate
+the failure.
+
 Implementation Details / Fuzzer Lifecycle
 -----------------------------------------