Skip to content

qga: Add optional stream-output argument to guest-exec

Daniel Xu qemu-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/3qga: Fix memory leak when output stream is unusedqga/commands.c+2 -21 reply
2/3qga: Add optional stream-output argument to guest-execqga/commands.c qga/qapi-schema.json+18 -16 replies
3/3qga: test: Add test for guest-exec stream-outputtests/unit/test-qga.c+77 -00 replies

Reviews trailers per patch

1 of 3 patches has a Reviewed-by or Acked-by.

PatchKonstantin Kostiuk
1/3R-b
2/3
3/3

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

Read the v1 thread

Cover letter [PATCH 0/3] qga: Add optional stream-output argument to guest-exec

Currently, commands run through guest-exec are "silent" until they finish running. This is fine for short lived commands. But for commands that take a while, this is a bad user experience.

Usually long running programs know that they will run for a while. To improve user experience, they will typically print some kind of status to output at a regular interval. So that the user knows that their command isn't just hanging.

This patchset adds support for an optional stream-output parameter to guest-exec. This causes subsequent calls to guest-exec-status to return all buffered output. This allows downstream applications to be able to relay "status" to the end user.

I also uncovered a latent memory leak bug with the added unit test. The fix is in commit 1.

Daniel Xu (3):
qga: Fix memory leak when output stream is unused
qga: Add optional stream-output argument to guest-exec
qga: test: Add test for guest-exec stream-output

 qga/commands.c        | 16 +++++++--
 qga/qapi-schema.json  |  7 +++-
 tests/unit/test-qga.c | 77 +++++++++++++++++++++++++++++++++++++++++++
 3 files changed, 97 insertions(+), 3 deletions(-)
Signature · 1 line
2.41.0