qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v6 0/3] qga: Support merging output streams in guest-exec
@ 2023-03-23  0:19 Daniel Xu
  2023-03-23  0:19 ` [PATCH v6 1/3] qga: Refactor guest-exec capture-output to take enum Daniel Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Daniel Xu @ 2023-03-23  0:19 UTC (permalink / raw)
  To: qemu-devel, marcandre.lureau, berrange

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(-)

-- 
2.39.1



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

end of thread, other threads:[~2023-05-01 17:56 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-23  0:19 [PATCH v6 0/3] qga: Support merging output streams in guest-exec Daniel Xu
2023-03-23  0:19 ` [PATCH v6 1/3] qga: Refactor guest-exec capture-output to take enum Daniel Xu
2023-03-23  0:19 ` [PATCH v6 2/3] qga: Add `merged` variant to GuestExecCaptureOutputMode Daniel Xu
2023-03-23  9:26   ` Daniel P. Berrangé
2023-03-31 20:23     ` Daniel Xu
2023-04-03 14:56       ` Konstantin Kostiuk
2023-05-01 17:54         ` Daniel Xu
2023-03-23  0:19 ` [PATCH v6 3/3] qga: test: Add tests for `merged` flag Daniel Xu

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).