[PATCH 0/3] qga: Add optional `merge-output` flag to guest-exec QAPI

Daniel Xu posted 3 patches 1 year, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/cover.1677197937.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        |  13 +++-
qga/qapi-schema.json  |   6 +-
tests/unit/test-qga.c | 135 ++++++++++++++++++++++++++++++++++++------
3 files changed, 133 insertions(+), 21 deletions(-)
[PATCH 0/3] qga: Add optional `merge-output` flag to guest-exec QAPI
Posted by Daniel Xu 1 year, 2 months 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 new QAPI flag.

Daniel Xu (3):
  qga: test: Use absolute path to test data
  qga: Add optional `merge-output` flag to guest-exec qapi
  qga: test: Add tests for `merge-output` flag

 qga/commands.c        |  13 +++-
 qga/qapi-schema.json  |   6 +-
 tests/unit/test-qga.c | 135 ++++++++++++++++++++++++++++++++++++------
 3 files changed, 133 insertions(+), 21 deletions(-)

-- 
2.39.1
Re: [PATCH 0/3] qga: Add optional `merge-output` flag to guest-exec QAPI
Posted by Daniel Xu 1 year, 2 months ago
On Thu, Feb 23, 2023, at 7:05 PM, Daniel Xu wrote:
> 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 new QAPI flag.
>
> Daniel Xu (3):
>   qga: test: Use absolute path to test data
>   qga: Add optional `merge-output` flag to guest-exec qapi
>   qga: test: Add tests for `merge-output` flag
>
>  qga/commands.c        |  13 +++-
>  qga/qapi-schema.json  |   6 +-
>  tests/unit/test-qga.c | 135 ++++++++++++++++++++++++++++++++++++------
>  3 files changed, 133 insertions(+), 21 deletions(-)
>
> -- 
> 2.39.1

Apologies for spamming the list. I thought my mail provider
was swallowing my sends but it looks like the list was a bit
slow.

Thanks,
Daniel