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

Daniel Xu posted 3 patches 1 year, 1 month ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1678401400.git.dxu@dxuuu.xyz
Maintainers: Michael Roth <michael.roth@amd.com>, Konstantin Kostiuk <kkostiuk@redhat.com>
There is a newer version of this series
qga/commands.c        |  68 ++++++++++++++++--
qga/qapi-schema.json  |  35 +++++++++-
tests/unit/test-qga.c | 158 +++++++++++++++++++++++++++++++++++++-----
3 files changed, 238 insertions(+), 23 deletions(-)
[PATCH v5 0/3] qga: Support merging output streams in guest-exec
Posted by Daniel Xu 1 year, 1 month ago
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,
`all-merge`.

---

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        |  68 ++++++++++++++++--
 qga/qapi-schema.json  |  35 +++++++++-
 tests/unit/test-qga.c | 158 +++++++++++++++++++++++++++++++++++++-----
 3 files changed, 238 insertions(+), 23 deletions(-)

-- 
2.39.1