From: "Alex Bennée" <alex.bennee@linaro.org>
To: qemu-devel@nongnu.org
Cc: "Kyle Evans" <kevans@freebsd.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Warner Losh" <imp@bsdimp.com>,
qemu-arm@nongnu.org, "Thomas Huth" <th.huth+qemu@posteo.eu>,
"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
"Brad Smith" <brad@comstyle.com>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Alex Bennée" <alex.bennee@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>
Subject: [PATCH v3 3/8] tests/functional: allow tests to define decompression target
Date: Fri, 20 Mar 2026 15:51:02 +0000 [thread overview]
Message-ID: <20260320155107.2143191-4-alex.bennee@linaro.org> (raw)
In-Reply-To: <20260320155107.2143191-1-alex.bennee@linaro.org>
When dealing with multi-stage decompression we want to specify the
target file name lest we just overload the cache name. It also allows
for something is little more friendly than the cache hash.
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
---
tests/functional/qemu_test/testcase.py | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu_test/testcase.py
index c2c916f6077..eaec1bea138 100644
--- a/tests/functional/qemu_test/testcase.py
+++ b/tests/functional/qemu_test/testcase.py
@@ -35,7 +35,7 @@
class QemuBaseTest(unittest.TestCase):
- def uncompress(self, compressed, format=None):
+ def uncompress(self, compressed, target=None, format=None):
'''
@params compressed: filename, Asset, or file-like object to uncompress
@params format: optional compression format (gzip, lzma)
@@ -52,8 +52,11 @@ def uncompress(self, compressed, format=None):
if isinstance(compressed, Asset):
compressed.fetch()
- (name, _ext) = os.path.splitext(str(compressed))
- uncompressed = self.scratch_file(os.path.basename(name))
+ if target is not None:
+ uncompressed = self.scratch_file(target)
+ else:
+ (name, _ext) = os.path.splitext(str(compressed))
+ uncompressed = self.scratch_file(os.path.basename(name))
uncompress(compressed, uncompressed, format)
--
2.47.3
next prev parent reply other threads:[~2026-03-20 15:52 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 15:50 [PATCH v3 0/8] testing/next: gdb-multiarch, check-tcg, docker, vbsa tests (pre-PR) Alex Bennée
2026-03-20 15:51 ` [PATCH v3 1/8] tests/tcg: allow filtering of TCG tests Alex Bennée
2026-03-20 15:51 ` [PATCH v3 2/8] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
2026-03-24 13:15 ` Michael Tokarev
2026-03-24 13:27 ` Peter Maydell
2026-03-20 15:51 ` Alex Bennée [this message]
2026-03-20 15:51 ` [PATCH v3 4/8] tests/functional: add VBSA linux tests Alex Bennée
2026-03-20 15:51 ` [PATCH v3 5/8] tests/lcitool: Remove python3-sqlite3 from the list of needed packages Alex Bennée
2026-03-20 15:51 ` [PATCH v3 6/8] tests/lcitool: Update openSUSE to version 16 Alex Bennée
2026-03-20 15:51 ` [PATCH v3 7/8] tests/docker: Update the opensuse-leap container file " Alex Bennée
2026-03-20 15:51 ` [PATCH v3 8/8] tests: Replace ncat with socat in migration test and drop ncat from containers Alex Bennée
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=20260320155107.2143191-4-alex.bennee@linaro.org \
--to=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=brad@comstyle.com \
--cc=farosas@suse.de \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=th.huth+qemu@posteo.eu \
--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