From: Thomas Huth <thuth@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>, qemu-devel@nongnu.org
Cc: "Harsh Prateek Bora" <harshpb@linux.ibm.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Daniel Henrique Barboza" <danielhb413@gmail.com>,
"Nicholas Piggin" <npiggin@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
qemu-ppc@nongnu.org
Subject: Re: [PATCH v2 7/7] tests/functional: stop output from zstd command when uncompressing
Date: Wed, 5 Mar 2025 10:05:53 +0100 [thread overview]
Message-ID: <a65bc513-5e13-4e63-96f8-5486a51ab377@redhat.com> (raw)
In-Reply-To: <20250228102738.3064045-8-berrange@redhat.com>
On 28/02/2025 11.27, Daniel P. Berrangé wrote:
> The zstd command will print incremental decompression progress to stderr
> when running. Fortunately it is not on stdout as that would confuse the
> TAP parsing, but we should still not have this printed. By switching
> from 'check_call' to 'run' with the check=True and capture_output=True
> we'll get the desired silence on success, and on failure the raised
> exception will automatically include stdout/stderr data for diagnosis
> purposes.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
> tests/functional/qemu_test/uncompress.py | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/tests/functional/qemu_test/uncompress.py b/tests/functional/qemu_test/uncompress.py
> index 76dcf22385..ce79da1b68 100644
> --- a/tests/functional/qemu_test/uncompress.py
> +++ b/tests/functional/qemu_test/uncompress.py
> @@ -13,7 +13,7 @@
> import stat
> import shutil
> from urllib.parse import urlparse
> -from subprocess import check_call, CalledProcessError
> +from subprocess import run, CalledProcessError, DEVNULL
>
> from .asset import Asset
>
> @@ -46,8 +46,8 @@ def zstd_uncompress(zstd_path, output_path):
> return
>
> try:
> - check_call(['zstd', "-f", "-d", zstd_path,
> - "-o", output_path])
> + run(['zstd', "-f", "-d", zstd_path,
> + "-o", output_path], capture_output=True, check=True)
> except CalledProcessError as e:
> os.remove(output_path)
> raise Exception(
Reviewed-by: Thomas Huth <thuth@redhat.com>
prev parent reply other threads:[~2025-03-05 9:06 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-28 10:27 [PATCH v2 0/7] tests/functional: a few misc cleanups and fixes Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 1/7] tests/functional: remove unused 'bin_prefix' variable Daniel P. Berrangé
2025-02-28 16:52 ` Richard Henderson
2025-02-28 10:27 ` [PATCH v2 2/7] tests/functional: set 'qemu_bin' as an object level field Daniel P. Berrangé
2025-02-28 16:53 ` Richard Henderson
2025-02-28 10:27 ` [PATCH v2 3/7] tests/functional: remove all class level fields Daniel P. Berrangé
2025-02-28 16:53 ` Richard Henderson
2025-03-05 11:51 ` Thomas Huth
2025-03-05 11:55 ` Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 4/7] tests/functional: reduce tuxrun maxmem to work on 32-bit hosts Daniel P. Berrangé
2025-02-28 16:54 ` Richard Henderson
2025-03-05 8:59 ` Thomas Huth
2025-02-28 10:27 ` [PATCH v2 5/7] tests/functional: skip memaddr tests on 32-bit builds Daniel P. Berrangé
2025-02-28 17:06 ` Richard Henderson
2025-03-05 9:02 ` Thomas Huth
2025-03-05 11:32 ` Thomas Huth
2025-03-05 11:45 ` Daniel P. Berrangé
2025-02-28 10:27 ` [PATCH v2 6/7] tests/functional: drop unused 'get_tag' method Daniel P. Berrangé
2025-03-05 9:04 ` Thomas Huth
2025-02-28 10:27 ` [PATCH v2 7/7] tests/functional: stop output from zstd command when uncompressing Daniel P. Berrangé
2025-03-05 9:05 ` Thomas Huth [this message]
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=a65bc513-5e13-4e63-96f8-5486a51ab377@redhat.com \
--to=thuth@redhat.com \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=danielhb413@gmail.com \
--cc=harshpb@linux.ibm.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=npiggin@gmail.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@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).