qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] qga: Add optional stream-output argument to guest-exec
@ 2023-09-18 10:54 Daniel Xu
  2023-09-18 10:54 ` [PATCH 1/3] qga: Fix memory leak when output stream is unused Daniel Xu
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Daniel Xu @ 2023-09-18 10:54 UTC (permalink / raw)
  To: qemu-devel, berrange; +Cc: hmodi

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

-- 
2.41.0



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

end of thread, other threads:[~2023-10-01 18:40 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-18 10:54 [PATCH 0/3] qga: Add optional stream-output argument to guest-exec Daniel Xu
2023-09-18 10:54 ` [PATCH 1/3] qga: Fix memory leak when output stream is unused Daniel Xu
2023-09-21  9:55   ` Konstantin Kostiuk
2023-09-18 10:54 ` [PATCH 2/3] qga: Add optional stream-output argument to guest-exec Daniel Xu
2023-09-18 15:05   ` Markus Armbruster
2023-09-18 16:59     ` Daniel Xu
2023-09-18 15:14   ` Daniel P. Berrangé
2023-09-18 17:17     ` Daniel Xu
2023-09-27  8:43       ` Konstantin Kostiuk
2023-10-01 18:39         ` Daniel Xu
2023-09-18 10:54 ` [PATCH 3/3] qga: test: Add test for guest-exec stream-output 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).