qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] chardev/char-file: Allow setting input file on command line
@ 2023-04-13 15:07 Peter Maydell
  2023-04-13 15:07 ` [PATCH 1/2] qtest: Don't assert on "-qtest chardev:myid" Peter Maydell
  2023-04-13 15:07 ` [PATCH 2/2] chardev: Allow setting file chardev input file on the command line Peter Maydell
  0 siblings, 2 replies; 9+ messages in thread
From: Peter Maydell @ 2023-04-13 15:07 UTC (permalink / raw)
  To: qemu-devel
  Cc: Paolo Bonzini, Thomas Huth, Laurent Vivier,
	Marc-André Lureau

Our 'file' chardev backend supports specifying both an
input and an output file, but only if you create it via
the QMP interface -- there is no command-line syntax
support for setting the input file. This patchset adds
an extra 'input-path' option to the chardev.

The specific use case I have is that I'd like to be able to
feed fuzzer reproducer input into qtest without having to use
'-qtest stdio' and put the input onto stdin. Being able to
use a file chardev like this:
 -chardev file,id=repro,path=/dev/null,input-path=repro.txt -qtest chardev:repro
means that stdio is free for use by gdb.

The first patch in the series fixes an assertion failure
in the qtest code if you try to pass it a named chardev;
the second patch adds the new option to the file backend.

thanks
-- PMM

Peter Maydell (2):
  qtest: Don't assert on "-qtest chardev:myid"
  chardev: Allow setting file chardev input file on the command line

 chardev/char-file.c |  8 ++++++++
 chardev/char.c      |  3 +++
 softmmu/qtest.c     |  2 +-
 qemu-options.hx     | 10 ++++++++--
 4 files changed, 20 insertions(+), 3 deletions(-)

-- 
2.34.1



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-04-14 19:34 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13 15:07 [PATCH 0/2] chardev/char-file: Allow setting input file on command line Peter Maydell
2023-04-13 15:07 ` [PATCH 1/2] qtest: Don't assert on "-qtest chardev:myid" Peter Maydell
2023-04-14 14:50   ` Thomas Huth
2023-04-14 19:01   ` Marc-André Lureau
2023-04-13 15:07 ` [PATCH 2/2] chardev: Allow setting file chardev input file on the command line Peter Maydell
2023-04-14 14:03   ` Philippe Mathieu-Daudé
2023-04-14 14:21     ` Peter Maydell
2023-04-14 14:52   ` Thomas Huth
2023-04-14 19:33   ` Marc-André Lureau

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).