qga: Add optional stream-output argument to guest-exec
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest3 patches 7 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/3 | qga: Fix memory leak when output stream is unusedqga/ | +2 | 1 reply | |
| 2/3 | qga: Add optional stream-output argument to guest-execqga/ qga/ | +18 | 6 replies | |
| 3/3 | qga: test: Add test for guest-exec stream-outputtests/ | +77 | 0 replies |
Reviews trailers per patch
1 of 3 patches has a Reviewed-by or Acked-by.
| Patch | Konstantin Kostiuk |
|---|---|
| 1/3 | R-b |
| 2/3 | |
| 3/3 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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