From: "Daniel P. Berrangé" <berrange@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Thomas Huth" <thuth@redhat.com>,
"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>,
"Daniel P. Berrangé" <berrange@redhat.com>,
qemu-ppc@nongnu.org
Subject: [PATCH v2 7/7] tests/functional: stop output from zstd command when uncompressing
Date: Fri, 28 Feb 2025 10:27:38 +0000 [thread overview]
Message-ID: <20250228102738.3064045-8-berrange@redhat.com> (raw)
In-Reply-To: <20250228102738.3064045-1-berrange@redhat.com>
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(
--
2.48.1
next prev parent reply other threads:[~2025-02-28 10:29 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 ` Daniel P. Berrangé [this message]
2025-03-05 9:05 ` [PATCH v2 7/7] tests/functional: stop output from zstd command when uncompressing Thomas Huth
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=20250228102738.3064045-8-berrange@redhat.com \
--to=berrange@redhat.com \
--cc=alex.bennee@linaro.org \
--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 \
--cc=thuth@redhat.com \
/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).