From patchwork Mon Jul 29 15:27:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 815045 Delivered-To: patch@linaro.org Received: by 2002:adf:b359:0:b0:367:895a:4699 with SMTP id k25csp1319584wrd; Mon, 29 Jul 2024 08:29:28 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCVLR7lKAOjZX59dAelkWO2MEgkld/yWl1YZTT1jEHH5xwQBPav9/R1vBfRTP04Dj4gy3Xo2QRSAKhb+idaRIMpt X-Google-Smtp-Source: AGHT+IGAZ7nYnMAcftPO2O3QR/IDHiRZtnFIeNVKx4f6PDBwntjVv6XYJPvYkxmPtWaOipI+/m/v X-Received: by 2002:a05:620a:f0e:b0:79f:84f:5b40 with SMTP id af79cd13be357-7a1e5258545mr945607785a.35.1722266968207; Mon, 29 Jul 2024 08:29:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722266968; cv=none; d=google.com; s=arc-20160816; b=SgpZ8GQUiH2f00dYLm6PPUNqp6+O/jfeJBOiNvhJUIiaLHG/Nec7pzaXYigQ523LUB 7xfSAFF8aCJgAgG40puW8y88Efkei8W9ztrS4zDazwHp7wecBsSHVgrZK1lkNdG3gq8A c/c28q70ioL9uy4yRRlpaCNrIMa5XEpsbXXhGDXIvEmAWQRqGgYGurEa4o0o49EyJLhS Fg46gaoZPFv+beHeXC9HHATksgKPMphz6cnCKLdcUs4TXhpfa5IWAi9ovbgNon2+WSrv 0n3gjdPRhBKhr0f0jYGkK2ZbHMWJgarC/RAM7HT2ronyiWA6tLFMRX06EaAA1TjDwqex EaCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; 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=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; fh=Wll5zcIshwC25KTNRStP4nPuF6V2l9tJ4yFbKqJqmtg=; b=lc2LSrXEHm8x62SalzgTx5SMo381hJFyHCzKP7LUDud5Zvu7s9gsE+sT7IxfdxWQx8 HpHfFfZiYhNel7gfk79bHET5D2T3j5ONv0eKXCAqLkdxob4edXOyUc9uy7ZKNyiagdPb IhGs6PuizC5nz5f/aLL0hE0WHTa2CkHggJefb9Q4FB/Xzz3XAPyF1Po8udgYSxOJqHHU j1ytwkKlniwBa2yOcZH35LlsOzxH17T3NLxmeuuqR2i+21OjGVSR4KuzwJ06+PFdVnqw ptyKgmzWrSVAcB4dAZu+oN8pmKerYNlQ7/JaWuFSQgTOxxDQ0hN4NFYKSxqUqxq2PfLP OLWA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=so0frPNn; 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 af79cd13be357-7a1d739b8e9si1081121985a.13.2024.07.29.08.29.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Mon, 29 Jul 2024 08:29:28 -0700 (PDT) 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=so0frPNn; 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 1sYSIn-0008Gl-FL; Mon, 29 Jul 2024 11:28:45 -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 1sYSIl-0007yQ-NJ for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:43 -0400 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYSIf-00008Q-P9 for qemu-devel@nongnu.org; Mon, 29 Jul 2024 11:28:42 -0400 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-42122ac2f38so11731225e9.1 for ; Mon, 29 Jul 2024 08:28:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722266916; x=1722871716; 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=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; b=so0frPNnsN2O8ATzTRyytvUPJufmDis7tThJdjT0TqjVurhHgfQ8q16gs4KRNXygp1 svhGNf7DCv60u/Cuqu5vUjk8KVmXDcobJ1LnFTKuTbNtF+8Ho+AgeQMUZsa4oxTo+4UG 2Zcs7ur9pMFX/b7lGo6pN/IlAwSk70+vYzfbxUAEjcRwvRykV8nEqLraLpFlSdsP47HY yoAm18E3UL1V0lXgSu1kdOhsSGO7A/P7p+us9SDa2ECzQNgVxfiUZyHATge2BZvpEJ4T ShBUR8Lm7DR/sIfgSLKpkBsptC5CpK9tU2JXwUu1D//7Kqs7qK3jBRkucL/EElapcqZs AXfA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722266916; x=1722871716; 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=zXdSwZIkaei7IVXcOo85+RXKqlbMq+68sLXgYS3E5lM=; b=S/KZQipT+X0c5SgI3boaYYdARG0LOWEDmK36oR46xewu4OjSNaOPbJGfYLYV+pPOWd ZYSWSzubt8VIg1BRPhH+OX0/TcPP2EXxiKJTZzxYLqMm+lCFawze7vH3gcclHGyYBoJH S6XJfrSdLZ+eyZnPPJxYY3PRvXz2b2PwLDzyZ5KezNYaqRLCMYd6LGZoMREyRXTV9gYR xwmmJEnyjFuuivTnSNegSnXLIN0pOgFoFVKbNYXxfQZugtVcBwfuGBofjGyRkpsPs2fv wy2XSX3tcU56IILbpBUciPZGyX3QEv2MOlq44WMDR1VSCKhSQIbEuMIuUSEueu221xs2 +7bg== X-Gm-Message-State: AOJu0YzeSDhnHkI1PfJZjuo+9p8PdGZ5kprAq50913jd5Ch2oB6tL1hh MPTgDpnhY/8gVOhSjVVGQFND0tg3EQ827WZs12pyPuJNoq5bCXQOZ83vpvLyDeI+OdmdZCV0lcz u X-Received: by 2002:a05:600c:350c:b0:426:6981:1bd with SMTP id 5b1f17b1804b1-42811e52330mr53491205e9.5.1722266915665; Mon, 29 Jul 2024 08:28:35 -0700 (PDT) Received: from localhost.localdomain ([176.176.173.10]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-427ef3f459fsm129574945e9.0.2024.07.29.08.28.34 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Mon, 29 Jul 2024 08:28:35 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Cleber Rosa , Akihiko Odaki , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 13/14] tests/avocado: mips: add hint for fetchasset plugin Date: Mon, 29 Jul 2024 17:27:13 +0200 Message-ID: <20240729152714.10225-14-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240729152714.10225-1-philmd@linaro.org> References: <20240729152714.10225-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.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, T_SPF_TEMPERROR=0.01 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 From: Cleber Rosa Avocado's fetchasset plugin runs before the actual Avocado job (and any test). It analyses the test's code looking for occurrences of "self.fetch_asset()" in the either the actual test or setUp() method. It's not able to fully analyze all code, though. The way these tests are written, make the fetchasset plugin blind to the assets. This adds some more code duplication, true, but it will aid the fetchasset plugin to download or verify the existence of these assets in advance. Signed-off-by: Cleber Rosa Reviewed-by: Akihiko Odaki Tested-by: Philippe Mathieu-Daudé Message-ID: <20240726134438.14720-3-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 450d67be6a..b8b0a4df10 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -274,8 +274,7 @@ def test_mips64el_malta_5KEc_cpio(self): # Wait for VM to shut down gracefully self.vm.wait() - def do_test_mips_malta32el_nanomips(self, kernel_url, kernel_hash): - kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + def do_test_mips_malta32el_nanomips(self, kernel_path_xz): kernel_path = self.workdir + "kernel" with lzma.open(kernel_path_xz, 'rb') as f_in: with open(kernel_path, 'wb') as f_out: @@ -303,7 +302,8 @@ def test_mips_malta32el_nanomips_4k(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page4k.xz') kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) def test_mips_malta32el_nanomips_16k_up(self): """ @@ -316,7 +316,8 @@ def test_mips_malta32el_nanomips_16k_up(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page16k_up.xz') kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) def test_mips_malta32el_nanomips_64k_dbg(self): """ @@ -329,7 +330,8 @@ def test_mips_malta32el_nanomips_64k_dbg(self): 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page64k_dbg.xz') kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' - self.do_test_mips_malta32el_nanomips(kernel_url, kernel_hash) + kernel_path_xz = self.fetch_asset(kernel_url, asset_hash=kernel_hash) + self.do_test_mips_malta32el_nanomips(kernel_path_xz) def test_aarch64_xlnx_versal_virt(self): """