From nobody Sat Apr 11 23:08:39 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1773078578; cv=none; d=zohomail.com; s=zohoarc; b=YLv3e3/cbD+K1zEk3jjTrIcLdsMAL1FLfXeWr32dSOXQQ0ICqoaSAIr13B1TaJaz1zFck8y+mvXjegmajWtXyJz5/7QkwUWawC0U2qsqdiI/wFZm4W/RKtCLtkDkHmqfTQKCA9Iu5u4KT4OFSwDNB3Z370TK8XUnKK4w2XbKCsY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1773078578; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Re1Z7KTF6pGt06r2qKUhhUG6rRUM2+jHUzT54RyU8Vo=; b=gdlf0QWkk40KRMXnU3aNLnNLhFqTB8X5rWIcb8qbzM0sOmH1jXpkVaynC1JgbCmmOHNjLZ44vmQPmu+5MJASzIQu+PYRZ+Jb5N3sON8ezguqMgiZllCKdeYEDXbpcNDeBrYzZHuZujUtdhSuH2FEj5zd6S7EW/NT6Z7ZaxS17hU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1773078578239960.7039900940325; Mon, 9 Mar 2026 10:49:38 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vzejJ-0000it-TR; Mon, 09 Mar 2026 13:49:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vzeiq-0000aR-Cq for qemu-devel@nongnu.org; Mon, 09 Mar 2026 13:49:01 -0400 Received: from mail-wm1-x333.google.com ([2a00:1450:4864:20::333]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vzeim-0002pA-7y for qemu-devel@nongnu.org; Mon, 09 Mar 2026 13:48:50 -0400 Received: by mail-wm1-x333.google.com with SMTP id 5b1f17b1804b1-48534e9076fso11833335e9.0 for ; Mon, 09 Mar 2026 10:48:46 -0700 (PDT) Received: from draig.lan ([185.124.0.126]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-485237f354esm94164265e9.5.2026.03.09.10.48.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 10:48:43 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 084865FB68; Mon, 09 Mar 2026 17:48:42 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1773078525; x=1773683325; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Re1Z7KTF6pGt06r2qKUhhUG6rRUM2+jHUzT54RyU8Vo=; b=FTFZ8SEdYsfPazS3nfdP1tVdim/bsrpGwI70n2zDXiZti4Pjv9VT+l6siqmdWJkfQ9 BONi6CyjbNkmllgagTGlYZQR+J3B/cvi/EUbCT9FLPdQKTILRgqsQiVn6nokby/oYHPC fA9WGeH6N6RhpbmUV+K1/hVjrwxNfEE1eHsJsGsaqiGWarsvN5O6CU2i7czGDUelLTql 7IMGjvbyBTl26p8nzhHuUtJhCJjbYEdeCfGu+opEk8mamzxcmc6YyjPAL0O0EC1mCk8u fAFth+aLBYdK7WppVcFyiQqtQLWqR+eZIQkWaxjOACYQIJ5stxWSedntDsC+nr8JL4ai 7V5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773078525; x=1773683325; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=Re1Z7KTF6pGt06r2qKUhhUG6rRUM2+jHUzT54RyU8Vo=; b=rYmDYcc7CT3YwvjBKDNGVqZ7SjwnDmDu7TcxAjEC+doNUU4QEGg3cqaZQMzP8nW3M3 Gm3ysCNBuffvbIBjokiMtUymzFI8AEmB3heS27bvWxneNeZUMUkAfw76eQtj1WWqkAf1 60GUp37MV+FEScGE5fiN/lHdJsOjH6cD/KxD3R3qS+i/vQFhi3lbvdirNqDM64ryhWsT 6CtgBK8eDKRrrtg6uoiHh5Cw3L0t4aJdUK4Skfb8ZuJZyBKaqYMdWhgOD9aLsQx+932G kqfHFawovKnPVGHv3JdvRY+WTuIxOvXDFApu9h0z61dpXmcFZS9doQYgb9D0GTj4AqJX UPnQ== X-Gm-Message-State: AOJu0YwR0Ngd14wCfXmD77o3FklghXvuNAPNBOplHG5DCckMCjMLyCJm jDaGwKVBXKn7gnEh9o7peOXMdYveYM2utrsJYqaVQXUQoo8X43MKBlrla9w5BwcmPRw= X-Gm-Gg: ATEYQzzMi+vEm+MQeWw8CcbaRCgDpHO29djYJMRQyPr6rkR+pRurBQOzXvmKCSmobh5 I55UpVs4LPEk5Lx3x1FzRfu96MfaHgoljGXNUs6Vi/8vMv9qNAmqOnCY/ZGspqVkKvtceTanoPJ h0WdmSOGhrdPcrd8yjpLz6Ehribx3VlBTPVWScr1QRsWVn8TSn0JuGKRm5PX7kE7RNLoLgx31Br fP9FQJB92a4afaRvJJHYXG+rdpqSVqFRmp1hnPnanq0YFASIH+2PbKlnUrfcWbxslUQGUHW0W5x 4E/VuDryM8dfiTPbWLlAd9AwTUwF40/jBkblE+VVsbmfl/OZrBWdhEEUOwN1PVHAXsBhSXMqAVq s9JyDzrJRMNFHgEiA3SP4YjCKUyah5067CoXOCgDNV2T7dKPqNv04CK4MiH+I3go5DNYwnYgZ+1 mJDpe68PpcP/on8fqwlIgk6Kg= X-Received: by 2002:a05:600c:1d1e:b0:483:c35d:3659 with SMTP id 5b1f17b1804b1-48526957d5cmr208195725e9.18.1773078525397; Mon, 09 Mar 2026 10:48:45 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Brad Smith , qemu-arm@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , Kyle Evans , Pierrick Bouvier , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Warner Losh , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 4/5] tests/functional: allow tests to define decompression target Date: Mon, 9 Mar 2026 17:48:40 +0000 Message-ID: <20260309174841.4184117-5-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260309174841.4184117-1-alex.bennee@linaro.org> References: <20260309174841.4184117-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::333; envelope-from=alex.bennee@linaro.org; helo=mail-wm1-x333.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: qemu development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1773078580740158500 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 Signed-off-by: Alex Benn=C3=A9e --- 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 @@ =20 class QemuBaseTest(unittest.TestCase): =20 - def uncompress(self, compressed, format=3DNone): + def uncompress(self, compressed, target=3DNone, format=3DNone): ''' @params compressed: filename, Asset, or file-like object to uncomp= ress @params format: optional compression format (gzip, lzma) @@ -52,8 +52,11 @@ def uncompress(self, compressed, format=3DNone): if isinstance(compressed, Asset): compressed.fetch() =20 - (name, _ext) =3D os.path.splitext(str(compressed)) - uncompressed =3D self.scratch_file(os.path.basename(name)) + if target is not None: + uncompressed =3D self.scratch_file(target) + else: + (name, _ext) =3D os.path.splitext(str(compressed)) + uncompressed =3D self.scratch_file(os.path.basename(name)) =20 uncompress(compressed, uncompressed, format) =20 --=20 2.47.3