Skip to content

qga: Support merging output streams in guest-exec

Daniel Xu qemu-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest3 patches 4 repliesIn review
  2. v53 patches 5 repliesSuperseded
  3. v43 patches 2 repliesSuperseded

Changes in v6 from the cover letter

* Add qapi conditional for merged flag
* Remove error check for windows as above conditional enforces it

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qga: Refactor guest-exec capture-output to take enumqga/commands.c qga/qapi-schema.json+66 -40 replies
2/3qga: Add `merged` variant to GuestExecCaptureOutputModeqga/commands.c qga/qapi-schema.json+27 -34 replies
3/3qga: test: Add tests for `merged` flagtests/unit/test-qga.c+141 -170 replies

Reviews trailers per patch

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

PatchDaniel P. Berrangé
1/3R-b
2/3R-b
3/3R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v6 thread

Cover letter [PATCH v6 0/3] qga: Support merging output streams in guest-exec

Currently, the captured output (via capture-output) is segregated into separate GuestExecStatus fields (out-data and err-data). This means that downstream consumers have no way to reassemble the captured data back into the original stream.

This is relevant for chatty and semi-interactive (ie. read only) CLI tools. Such tools may deliberately interleave stdout and stderr for visual effect. If segregated, the output becomes harder to visually understand.

This patchset adds support for merging stderr and stdout output streams via a backwards compatibile refactor and a new enum variant, merged.

---

Changes from v5:
* Add qapi conditional for merged flag
* Remove error check for windows as above conditional enforces it

Changes from v4:
* Rename all -> separated
* Rename all-merge -> merged

Changes from v3:
* Split out ASAN fixes into separate patch series
* Refactor capture-output flag into an enum
* Avoid using /bin/bash on windows

Changes from v2:
* Error out if merge-output on windows guests
* Add FIXMEs for when glib is updated
* Fix memory leaks in qemu-keymap

Changes from v1:
* Drop invalid test fix
* Do not support merge-output on windows guests
* Fix a UAF in tests

Daniel Xu (3):
qga: Refactor guest-exec capture-output to take enum
qga: Add merged variant to GuestExecCaptureOutputMode
qga: test: Add tests for merged flag

 qga/commands.c        |  62 +++++++++++++++--
 qga/qapi-schema.json  |  36 +++++++++-
 tests/unit/test-qga.c | 158 +++++++++++++++++++++++++++++++++++++-----
 3 files changed, 233 insertions(+), 23 deletions(-)
Signature · 1 line
2.39.1