From nobody Sun Mar 22 15:41:45 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=1774021969; cv=none; d=zohomail.com; s=zohoarc; b=ZbhE00xr/IFTUexamfv3P+Hw2s9PzHE6wtheTDefhK8hfHSK++0pVAWnmgO2JtrI1yXgtZhtzKf9qZqGpfJ/Q8TxtJqXSWXAFl10dEfl86qAwePJI/qujzescinWoLGJBsY0glezqqYcz8/9089Z8+MPQdampeHr1+fcIxdtOb4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1774021969; 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=iJbEUZpmThQTsQmi5K8+7Did2I+cvGuGrzPZ/J/vnzJoHjLPBmTFiN7tbKw4+aF0IzBPSTEQAmvxXMGLa3D6BhlI9RxJr8NeHdoxCnQXek7JBA3IEmvlUAITGUbbnyn9PyOWOSN/iDpLfpawfunIXrFBO9nCyhDCsp7iSlsNqxQ= 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 1774021969641869.1260289828726; Fri, 20 Mar 2026 08:52:49 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1w3c8C-0007aY-PM; Fri, 20 Mar 2026 11:51:24 -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 1w3c83-0007XO-Mm for qemu-devel@nongnu.org; Fri, 20 Mar 2026 11:51:15 -0400 Received: from mail-ej1-x629.google.com ([2a00:1450:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1w3c80-0005Vw-Oo for qemu-devel@nongnu.org; Fri, 20 Mar 2026 11:51:15 -0400 Received: by mail-ej1-x629.google.com with SMTP id a640c23a62f3a-b97ed4ad579so133170166b.3 for ; Fri, 20 Mar 2026 08:51:12 -0700 (PDT) Received: from draig.lan ([185.124.0.237]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b9832f8dc51sm169939766b.22.2026.03.20.08.51.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 20 Mar 2026 08:51:08 -0700 (PDT) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id 0C8535F911; Fri, 20 Mar 2026 15:51:08 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1774021871; x=1774626671; 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=ONLR23h2OB3+66OF7Xx3ksY71yKh1fkffBSlRn0WYzlcGGVv6S301KIgJa3TZ/AnEB WdQyMjPNP+QVbbQfhnVVdKVBEcA4IN7+sH3BKVhtks/F2ymr/iihnhdO5+ZR8dY26H0+ ZtdMvmnWmVe6bYwP0z2N+OeagcGNTkLu1XZL2k77lqOFgPAJir0piEwMfZCdETBchXaP bGFgv6TVWIcjqOytNvTYFizRJ4VGOAiE2BW7y0j4qlpfIcHkKUDtNW8YDPi3OaTYrljh CMt33nYSsePhh1zTdvbYZzUJ93yZG1RMYS3W4WI3/J9kn6MA+dSgozzmvvUbgWgfMxOO V/aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1774021871; x=1774626671; 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=fiydjGRN1xV42ozbTN5jL+asVxtN9TxYhiJDEvNoLLzRpewZNK4QXhomt2veFK/FuU 0wrW7afzea6xrpOOHfSVl5HfHMddAP7icOHRC1j7ofH0WpMcYWI3GgEOfvu90uahKM5d rvqhIsQaweb/T9jAn4YvVxqOw+uKqZylKaOkhYCEOZCwLOXiWINjZ8NorxOrnObBfTWH O0/dhyfQbwp+x3I9yG7PJrNw3hA+pFcvLj/tys8pjcPz7IGvyG6AcB4NMpLFMoR/ImsN 4dblcZIMz4plazzX24BnQzRUJdWpyROzu7H/GZmtGL8t54iYPAM+jZjJnRebI7Q+IMgu nCww== X-Gm-Message-State: AOJu0Yx1eBZKWMslgwBQqsG8nI6AJIQRQG2KYIaRal9yYt1Paa09ZZto Pv76nMaaeS5C33AJ0StjrHr7vC/PZJbyUNWROPqnerxgd9FcL949c06ZN5CypLTuJ8w= X-Gm-Gg: ATEYQzyN36WIBPrDAKoHGmzN5bhbdITA7FUp+v9DU4g+TYl10r5+AUSrHX/zVcGbgh9 rUahMs8n7sueMFJShjeHxj88fs722A9a0FnJ4qCE0WE0clwo44NTgByqX4QVohq9cs0KhMA+gXM Z5jJfIy6DxE4RpvXcaljhmQjBl3xRJOwKZNY1ddkG2vRWcW7u3xVrifEYOMQlSpxxtIINRzQ6Y2 4C7RvsqCwu1sjHI/liTmIoIc8bbnNuLiFpqISxgWtQrGOvJEPhzWak8OMWscgrXiPqu7HEv8PTD I9/nMoIn8me1vK29izYlxuxRo5/Ly8xgPjdTieyHSbypwe2mf6R6QDNETL1EUiIe4ZhjW1xqbWo j7ehXE9KKb2m/vcu9eiv+e9K0fM5VwzUXHFdOzBcKmc2XomSMEGS2SwqK9LdBrbBH112iT0YRil FUQqFS/JSP9xR9xvPJJ4gIBPI= X-Received: by 2002:a17:907:1604:b0:b97:edc1:f9c4 with SMTP id a640c23a62f3a-b982f1ed7b2mr288505466b.1.1774021871186; Fri, 20 Mar 2026 08:51:11 -0700 (PDT) From: =?UTF-8?q?Alex=20Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: Kyle Evans , Peter Maydell , Pierrick Bouvier , Warner Losh , qemu-arm@nongnu.org, Thomas Huth , Peter Xu , Fabiano Rosas , Brad Smith , Thomas Huth , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Paolo Bonzini Subject: [PATCH v3 3/8] tests/functional: allow tests to define decompression target Date: Fri, 20 Mar 2026 15:51:02 +0000 Message-ID: <20260320155107.2143191-4-alex.bennee@linaro.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260320155107.2143191-1-alex.bennee@linaro.org> References: <20260320155107.2143191-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::629; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x629.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: 1774021971617158500 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