From patchwork Fri Jan 10 13:17:42 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Alex_Benn=C3=A9e?= X-Patchwork-Id: 856245 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:385:e875:8a9e with SMTP id k28csp222853wrc; Fri, 10 Jan 2025 05:24:20 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCUoQqujJh/0i/sWD9z6BSic8bu7jgOAJHEj8aH8HlzZs54aByh6bQV0REPY8MdTAEYfsJsAZQ==@linaro.org X-Google-Smtp-Source: AGHT+IHvOo9LMTvUuJxJd/zeS6izomIot0dIvRKPNeHtrjNvlOZVJPpIDpWfH2ewV7ni5bUxyLkb X-Received: by 2002:a05:622a:20d:b0:467:8630:584f with SMTP id d75a77b69052e-46c71081952mr145221521cf.36.1736515460149; Fri, 10 Jan 2025 05:24:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736515460; cv=none; d=google.com; s=arc-20240605; b=Mddje7PpyBK4e+aabaeNmeto4rrNsnt9ebQHaf6pDGLMFh/dB6LxYsj98ckotRCVGl z/0i4WN+BL56D7znpE5IB9JfI25WBVyTPb2zfhCZJZAHjkCcBsKU8+T/THnT8HJkHfBS oJhJxJ9V/dubEg3pMEQQMp6q4un7klJDHygGy3vWtqIWB/3BV75DeiGwk/cseYmQ6QcI +UZhAskFTIIM5LN+skLmlQfCtTu6f2SHpIvlgEKxpy5T5c1mSd87C3MoEijIBNUdwQFo X+c+fVLmErpCnrLzlocyV20WuhlwpZdG4tto9USMofRKe1Iv2FBkxVEMATH5rnaZdAyq B64w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=tGvy/F1fDgUfBPiL+7E48KKTfhRYEDJs/NtU4xaiBlE=; fh=/9nbhPlDW3M0RyZvrSPQg6gmYbaldEOI5dYaEr27Kgc=; b=lZ0bR8PUYchzLXrXm+ibgH9VrrKoKbW/tVFqk5H0kjUrKH/dt0GTAEBQ0jELsdG9Wj F3gI3FsrSYiw61hi/3RQ+Ks8BjkV8DYCF1gHeHvJLBRPZcum/vv3Yft894r/LbXh/h25 gkv4J5+JJpdxvcf/Wu57+dggSI8K4UEGE6VADpXx1c4xnOOzDTOzy9ezB4GD6yrFxJNS ZEui8bjHBQlH1fUGv2qR+dyUnLwMlkWoAT9DmZYB5V/p01Q76yHgN03259VVsw6u5mAE gHsxcjWLHCHpAdeNhBLBepY3X7Bu0D99VAGOtGgJI1kxluuZv+Pn+EyRyvDex6/2EejU Qtvw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lnluB3VB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id d75a77b69052e-46c87425566si19910061cf.616.2025.01.10.05.24.19 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Jan 2025 05:24:20 -0800 (PST) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=lnluB3VB; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org; dara=neutral header.i=@linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tWEzY-0000bO-Q1; Fri, 10 Jan 2025 08:24:02 -0500 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 1tWEz7-0008OI-N3 for qemu-devel@nongnu.org; Fri, 10 Jan 2025 08:23:36 -0500 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tWEz5-0005e8-Md for qemu-devel@nongnu.org; Fri, 10 Jan 2025 08:23:33 -0500 Received: by mail-ej1-x635.google.com with SMTP id a640c23a62f3a-aaee2c5ee6eso341970266b.1 for ; Fri, 10 Jan 2025 05:23:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1736515410; x=1737120210; 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=tGvy/F1fDgUfBPiL+7E48KKTfhRYEDJs/NtU4xaiBlE=; b=lnluB3VBm9toKUmLeoDotqmW9OpAvHj/GyAg8InnvLEKWjERCbw1ZTQxAO3ySYQSLA F3RJ3t1sauxl5LHUO6frHYLAFtcHKEujLBi++y8jzn7NON4Qskmr9PUfLwqsE/Sx5YDE JXXPiLoh7z3A2QzaAPr9rdF1Mh/8vIT9CTYH9wdviiwmKBdkGaRwKHVpToTHiJC3nVU8 1VRTXWX9wR5n+Gz/kenejXbVk5k+ihJgVohNrMUlAS1vjrGKZIIicjH53bHL2/FkVtRo SwZu3PjzpQ9vWodIK2gFMM+nl+ihxJF9PUC05t5vaT3eAc02uWDzMEO+bcIKeOXiFs4A Tsxg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736515410; x=1737120210; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=tGvy/F1fDgUfBPiL+7E48KKTfhRYEDJs/NtU4xaiBlE=; b=PN07trIMCfKdArqbg1OCXLG6ug3fPSvKQPAfDqNtxgTS7+SJ5VITAp27TvAQh/rcG8 Bz1Y1OispnwNMcjUll/aY2ud6FjAtFskPhOmlrRD94R/NvxNjhJhK+apJgLJ9TnTgc0z Xft6vyU5Y7yvJbYnEh7mTyq6Tc37EYyNhzKKxXYpXSp+7B1/JX4u+ixI5fza8PT1Lg3o /jTF8M5VJuZwhW1FIuW9AoUdHKCfBZgVYxeKEcykXud9sIykl7FD3BM/dwdfa8q1/wXn d5HEHKGZ62XICZ9mYo5XF3WH0637WCrl6ZEnctgDlAdf03tJQq1oAP1PT3O1lI9+eyLT DZrw== X-Gm-Message-State: AOJu0Yy/+eC/qMtysal+c+bfg3x2yWyZ1MeWmWWVUqPCDqTp+yTWWoPt v8DsKdAZVkHXQthgtQfzkwoUNspy9dggAkMpiOyPdrrfRGMGnLf6wiUrpewwdjU= X-Gm-Gg: ASbGncsMYa3q9GpXNSdrvndBh/Fx/dgnwm+cbMv+Zc4nObgvr6oEJpYfWncTXGlG7am Wj8BAAGrbA3dOftVjnChnDOVU77OmRyzZu5wGvu0xc7AGMrBIzFQlyggso3ijJd6mXonrA4kmoC S2d7KcEcYc3zSzc86aBno/f2uC+uqmJ8mAMaMr663nzaIRKDMtXAs0g+lbJEdF24gQpx9hH3s9F 5IbqyyIFuDsIkJi81posSNq2MJPF7PbQwEaJC6NGs+cGlmiquFin2o= X-Received: by 2002:a17:907:3e91:b0:aaf:74b3:80db with SMTP id a640c23a62f3a-ab2ab670608mr825065266b.3.1736515410220; Fri, 10 Jan 2025 05:23:30 -0800 (PST) Received: from draig.lan ([85.9.250.243]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c95615a6sm168041366b.94.2025.01.10.05.23.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 05:23:26 -0800 (PST) Received: from draig.lan (localhost [IPv6:::1]) by draig.lan (Postfix) with ESMTP id DB32C5F9CC; Fri, 10 Jan 2025 13:17:55 +0000 (GMT) From: =?utf-8?q?Alex_Benn=C3=A9e?= To: qemu-devel@nongnu.org Cc: =?utf-8?q?Alex_Benn=C3=A9e?= , Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= , =?utf-8?q?Dani?= =?utf-8?q?el_P=2E_Berrang=C3=A9?= Subject: [PULL 20/32] tests/functional: update tuxruntest to use uncompress utility Date: Fri, 10 Jan 2025 13:17:42 +0000 Message-Id: <20250110131754.2769814-21-alex.bennee@linaro.org> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20250110131754.2769814-1-alex.bennee@linaro.org> References: <20250110131754.2769814-1-alex.bennee@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=alex.bennee@linaro.org; helo=mail-ej1-x635.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: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org Use the utility functions to reduce code duplication. Reviewed-by: Thomas Huth Signed-off-by: Alex Bennée Message-Id: <20250108121054.1126164-21-alex.bennee@linaro.org> diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qemu_test/tuxruntest.py index 7227a83757..41a4945a14 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -73,17 +73,7 @@ def fetch_tuxrun_assets(self, kernel_asset, rootfs_asset, dtb_asset=None): Fetch the TuxBoot assets. """ kernel_image = kernel_asset.fetch() - disk_image_zst = rootfs_asset.fetch() - - disk_image = self.scratch_file("rootfs.ext4") - - check_call(['zstd', "-f", "-d", disk_image_zst, - "-o", disk_image], - stdout=DEVNULL, stderr=DEVNULL) - # zstd copies source archive permissions for the output - # file, so must make this writable for QEMU - os.chmod(disk_image, stat.S_IRUSR | stat.S_IWUSR) - + disk_image = self.uncompress(rootfs_asset) dtb = dtb_asset.fetch() if dtb_asset is not None else None return (kernel_image, disk_image, dtb)