From patchwork Tue Jul 30 22:19:55 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: 815335 Delivered-To: patch@linaro.org Received: by 2002:a5d:4acf:0:b0:367:895a:4699 with SMTP id y15csp496204wrs; Tue, 30 Jul 2024 15:20:48 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCX3jAHQ1sT2pBEx7g6A5XUgCfdZ0hSs0OH9FBMlPkY89zbSbneIDvlHfC7S5awpf8E5enIEr53Qo+WHDrBmyiUK X-Google-Smtp-Source: AGHT+IEoVaBmewtuKtqwJaWTqM/LWMCu9B3xyOPcAK+5hFmME8+0eH1JFekyy7P/6xFPCJUJQaQD X-Received: by 2002:a05:6358:60c8:b0:1ac:f3df:3bda with SMTP id e5c5f4694b2df-1adb243ebecmr1497906655d.1.1722378047875; Tue, 30 Jul 2024 15:20:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1722378047; cv=none; d=google.com; s=arc-20160816; b=nP9rPtr99nD+BacJmEskUhVIAi5GtGHREss/d8vm+3G52gaz6Cp/sDL/R8nWd4Lqh1 C2aGIJwPBLQSP6SMVPSbfhlbwW1QaF8kpsdwXkPyLZ4WWd8Pb0gi6yFZa8Xl2f13SPrV mbyxectVnBb1dxDYYlxy+7NDMhkVi9yG4sN2BHU4rY9sJgvPoAv9nnFElP/v6JP1kCDd fyzRgYMzXJ5mmGINLlNaITh5vReRwj4sWqGsO7KEd3YZrp50beTjTGDUqTkBz4PbfTuo m3MEiGGBToVC9izZqF4aVCpkLXdqvLx7GBMuw1EgoMAaqt+UoOb8muTnR6fXc41zr9vU LpnQ== 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=umFSLygPuqgIPLKkDW9OSH6Q6efGNGKpXiE5oAuksp2S/nHddhZSq9ql0UQxo3L539 d/rVQxDYyF3yHLkjpqqwztqvyMxb+lfXohTK5MJEIe86r32fcfaNn5o9MoZa3dfUM0vF IFw5qXvL4hM3hzP6Nh1MsovLBODmtYp1c9nDt0c/oF8+uItKUQMd+O64M982z5CbJrsW RYNZl4NkjmPn8rQSCtv18w1TuUV2+3x+sngr4uuG7ZPYl0Lw9k+W+2Ip8dnWo4DQ0hQk 8cRnR1V45R23ygDH+xUyjUW/r7t3saumLEFZD1Lz1p7haiIqzAgLlqyYgqj3zGuwkYXf FCgA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Bjkjlmx+; 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 6a1803df08f44-6bb3fb07942si137153656d6.525.2024.07.30.15.20.47 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 30 Jul 2024 15:20:47 -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=Bjkjlmx+; 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 1sYvCh-0006OA-Gn; Tue, 30 Jul 2024 18:20:23 -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 1sYvCf-0006HB-Mx for qemu-devel@nongnu.org; Tue, 30 Jul 2024 18:20:21 -0400 Received: from mail-wr1-x436.google.com ([2a00:1450:4864:20::436]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sYvCd-0006jb-OF for qemu-devel@nongnu.org; Tue, 30 Jul 2024 18:20:21 -0400 Received: by mail-wr1-x436.google.com with SMTP id ffacd0b85a97d-368380828d6so3211431f8f.1 for ; Tue, 30 Jul 2024 15:20:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1722378018; x=1722982818; 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=Bjkjlmx+97OBo1yFjl2ZIgRLBzvuaaDbVeYCFb3w4FRDnFqIHdo4tjFiti+xr/1eNK wtn0NfVqjHcNR0qIG3nepKRkMRHdsAz4uKj1zgGmkJCNSDcaRXcYVbHWQOYt2ZxzHPb3 YfCKw0PciGUYGLdZ9NE+T4Jk0bTxPoO6A8ORVJWzsVrUwCf7ht4F2TW0Kljg6YvFouY4 oWcaqXoJywDtO8nE3uOXuwZCg52Po57MqfIwS+OMpLkmPy6iRi9ohg0tIgsYAy+tZpQf f2l4xValW/8vQUwuDEHCyphmoLy93tfP4wlVbJHrVWC9cqhQPBFnXE8W1jYJ1zkdx2KA JwUQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1722378018; x=1722982818; 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=qyDka8q+wvI2idK9MFQwnpFXdAEWorCRubBM2zdPG33Jdw2jYKcopyD3MbO/d4A35r N+XBGv3l1Z6Dodb4eLpbRs3HSldYp7IS9bOZ8RUQJT8GMfaei/vIJ8h7YEb6Iki7kZ1a 2tMOtxIB62iQgfoJyh+4OnGfb6S93sUg84mA6nCnyiPp+qUJScx/bsqb0uCRO1RKDaYc JtWZjY83D1q04qgdISNyrlbZQQf1Ac0sfV0NozUbYEjrzQW3fkiBuIzHzoxWtSRlPxMT H4iKM+fgqDfJN1kEBYOA5jpSpWMXqjMdSnlly2rOJgE3tUDfTpqLSLQ0CI9gkXvbI03e +mNw== X-Gm-Message-State: AOJu0YziuGPZNqHSnSd7lFlz2FnM7UjcU56g2mLuyfVSSDqzIabuT2IZ 6C/NTBoR9oA8WFr8C6kjK7gsEEuajUyDvkK1oMc/fLO7VW98EBUcQr0WQL45QB1ojBI+m7ENnB3 LL2w= X-Received: by 2002:a05:6000:1187:b0:367:9b22:28cb with SMTP id ffacd0b85a97d-36b5d0cd7fcmr7436738f8f.59.1722378018069; Tue, 30 Jul 2024 15:20:18 -0700 (PDT) Received: from localhost.localdomain ([78.196.4.158]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-36b367fc7c3sm15519178f8f.49.2024.07.30.15.20.17 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Tue, 30 Jul 2024 15:20:17 -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 4/6] tests/avocado: mips: add hint for fetchasset plugin Date: Wed, 31 Jul 2024 00:19:55 +0200 Message-ID: <20240730221957.34533-5-philmd@linaro.org> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240730221957.34533-1-philmd@linaro.org> References: <20240730221957.34533-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::436; envelope-from=philmd@linaro.org; helo=mail-wr1-x436.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 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): """