From nobody Sun Nov 10 21:09:25 2024 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=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1722965654; cv=none; d=zohomail.com; s=zohoarc; b=T0nacushB/vUe0TxZRfIWdBgmjE3O8yFDgEDAWtTjKETJZgewagqMZYAJvUHEuiz0DByQHhn9+YeDM0DoskEXYe4UoaRRcRSz3wyNwaiI3w0hdQ1r4COkm4NG9XGBoeWEDz8F1ygAHrrx+1eRJ7wCQYmGaAk51BWybtGKFEGzls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1722965654; h=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=SjcpbA2sD6CYVWhEq7nq8PpqkGiIsiq71NF+s5HMhDo=; b=iJDOjfzSsPVphyoPGKzf01uN2fzjad3Dag6Y4XXJ01Zvn/HYDtMPE8+pH3QeVg9ilDrzWazMIXPkZ1j9rBBQl9o4/Nl1m1KJhuaTIM2RklTx+9Wwebu54Hu+1YoqQbUxbFl6ZfVTFfAE39v3hYiUk21qQ5/ONF+h21z5uHTiKwc= 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 1722965654913310.9738646713412; Tue, 6 Aug 2024 10:34:14 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sbO3b-0001D9-7l; Tue, 06 Aug 2024 13:33:11 -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 1sbO3T-0000iM-DW for qemu-devel@nongnu.org; Tue, 06 Aug 2024 13:33:07 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sbO3Q-0006S2-Kh for qemu-devel@nongnu.org; Tue, 06 Aug 2024 13:33:03 -0400 Received: from mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-682-jdUwjjb2PYOdaJpWsbZVsg-1; Tue, 06 Aug 2024 13:32:56 -0400 Received: from mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.12]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9BE3B1955D48; Tue, 6 Aug 2024 17:32:46 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.39.192.15]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CA23019560AE; Tue, 6 Aug 2024 17:32:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SjcpbA2sD6CYVWhEq7nq8PpqkGiIsiq71NF+s5HMhDo=; b=NmQocmiPSmPAZPoQEwgjSbe6vx39mbgErohQJFhDusNi+6QnYB+dc1lHHYQCIRt1n0W8QC fNNkNFuTgaQSynYOREQOPDr6LlI3QF7LR8k1nm6YHh3zKb7PegUO2/AnWMzRrsPcpVsbX+ XNGjOhn2XSx4Pcv3iboocXL1zUZ/AtE= X-MC-Unique: jdUwjjb2PYOdaJpWsbZVsg-1 From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Marcin Juszkiewicz , Pavel Dovgalyuk , Radoslaw Biernacki , Troy Lee , Akihiko Odaki , Beraldo Leal , kvm@vger.kernel.org, Joel Stanley , Paolo Bonzini , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= , Paul Durrant , Eric Auger , David Woodhouse , qemu-arm@nongnu.org, Cleber Rosa , Andrew Jeffery , Jamin Lin , Steven Lee , Peter Maydell , Yoshinori Sato , Wainer dos Santos Moschetta , Thomas Huth , =?UTF-8?q?Alex=20Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 6/9] tests/avocado/boot_xen.py: fetch kernel during test setUp() Date: Tue, 6 Aug 2024 13:31:16 -0400 Message-ID: <20240806173119.582857-7-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-1-crosa@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 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=170.10.133.124; envelope-from=crosa@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.144, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1722965656990116600 Content-Type: text/plain; charset="utf-8" The kernel is a common blob used in all tests. By moving it to the setUp() method, the "fetch asset" plugin will recognize the kernel and attempt to fetch it and cache it before the tests are started. Signed-off-by: Cleber Rosa --- tests/avocado/boot_xen.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/avocado/boot_xen.py b/tests/avocado/boot_xen.py index f29bc58b9e..490a127a3e 100644 --- a/tests/avocado/boot_xen.py +++ b/tests/avocado/boot_xen.py @@ -30,23 +30,22 @@ class BootXen(LinuxKernelTest): timeout =3D 90 XEN_COMMON_COMMAND_LINE =3D 'dom0_mem=3D128M loglvl=3Dall guest_loglvl= =3Dall' =20 - def fetch_guest_kernel(self): + def setUp(self): + super(BootXen, self).setUp() + # Using my own built kernel - which works kernel_url =3D ('https://fileserver.linaro.org/' 's/JSsewXGZ6mqxPr5/download?path=3D%2F&files=3D' 'linux-5.9.9-arm64-ajb') kernel_sha1 =3D '4f92bc4b9f88d5ab792fa7a43a68555d344e1b83' - kernel_path =3D self.fetch_asset(kernel_url, - asset_hash=3Dkernel_sha1) - - return kernel_path + self.kernel_path =3D self.fetch_asset(kernel_url, + asset_hash=3Dkernel_sha1) =20 def launch_xen(self, xen_path): """ Launch Xen with a dom0 guest kernel """ self.log.info("launch with xen_path: %s", xen_path) - kernel_path =3D self.fetch_guest_kernel() =20 self.vm.set_console() =20 @@ -56,7 +55,7 @@ def launch_xen(self, xen_path): '-append', self.XEN_COMMON_COMMAND_LINE, '-device', 'guest-loader,addr=3D0x47000000,kernel=3D%s,boota= rgs=3Dconsole=3Dhvc0' - % (kernel_path)) + % (self.kernel_path)) =20 self.vm.launch() =20 --=20 2.45.2