From: Daniel Xu <dxu@dxuuu.xyz>
To: qemu-devel@nongnu.org, berrange@redhat.com
Cc: hmodi@aviatrix.com
Subject: [PATCH 0/3] qga: Add optional stream-output argument to guest-exec
Date: Mon, 18 Sep 2023 04:54:20 -0600 [thread overview]
Message-ID: <cover.1695034158.git.dxu@dxuuu.xyz> (raw)
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
next reply other threads:[~2023-09-18 10:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-18 10:54 Daniel Xu [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1695034158.git.dxu@dxuuu.xyz \
--to=dxu@dxuuu.xyz \
--cc=berrange@redhat.com \
--cc=hmodi@aviatrix.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).