Skip to content

chardev/char-file: Allow setting input file on command line

Peter Maydell qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 6 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2qtest: Don't assert on "-qtest chardev:myid"softmmu/qtest.c+1 -12 replies
2/2chardev: Allow setting file chardev input file on the command linechardev/char-file.c chardev/char.c qemu-options.hx+19 -24 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchPhilippe Mathieu-DaudéThomas HuthMarc-André Lureau
1/2R-b R-b
2/2R-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v1 thread

Cover letter [PATCH 0/2] chardev/char-file: Allow setting input file on command line

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(-)
Signature · 1 line
2.34.1