From nobody Sun Nov 24 12:09:10 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=1724229016; cv=none; d=zohomail.com; s=zohoarc; b=bR1gMYtsIehMHVPUWSE9XIUevh1raOGfskOkQNQMOMYLwS4D4K0Y8joMecVPgq6pElH6HY+kMpD6XVnzSeawUB7NxEz2BQng1fNriBHXW5onctSkIYoyuchIHTqg8A5TnSN/l/+dze8bOzmejdanNBpArca+4qoIs4X3FnQHv4g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1724229016; 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=t2Lv61V7e4ZwGeTVBaeIVh9jO6Nj6mHSFeOrznA7SVw=; b=aQoV9qpJ5nAGcr5w1v055hz4BpidxqGSeUZtemo8TBYDW3Pn40xhhZVx/GdG0S1g2Zwpio+w1LJo3EACrbA3LGANpadblq6XSQsvViED7a+eSG+rPPWfOn9g4tCWQnkCglqoTEzHJ5Tex8Lk00QD6ENcY5lHq0SXQ5ryoB8w0Lg= 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 172422901678179.01453396023157; Wed, 21 Aug 2024 01:30:16 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sgghS-0005RZ-N4; Wed, 21 Aug 2024 04:28:14 -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 1sgghR-0005L8-1N for qemu-devel@nongnu.org; Wed, 21 Aug 2024 04:28:13 -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 1sgghN-0004FA-Qb for qemu-devel@nongnu.org; Wed, 21 Aug 2024 04:28:12 -0400 Received: from mx-prod-mc-02.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-656-ohjlbr2gNyCaRR5M5xx1LA-1; Wed, 21 Aug 2024 04:28:05 -0400 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 87D631955F43; Wed, 21 Aug 2024 08:28:03 +0000 (UTC) Received: from thuth-p1g4.str.redhat.com (dhcp-192-191.str.redhat.com [10.33.192.191]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DCCA31955F1B; Wed, 21 Aug 2024 08:27:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1724228889; 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=t2Lv61V7e4ZwGeTVBaeIVh9jO6Nj6mHSFeOrznA7SVw=; b=KX5Ly/yzmyZ9HbDGHmnwG9HWGfLMGr0pdMYg8EqI2E9woyp/ImFFuSpWuSdnpzNGzEs29z ADVrqgT6rAt1a1E+63qZnah/KuH6F2kkBc0osrrcaHaH5EaGViSwMEbWyESqnpqJ43OMqx SD0+Si3oSwDe3/Tsr9c09X1vB99tWaM= X-MC-Unique: ohjlbr2gNyCaRR5M5xx1LA-1 From: Thomas Huth To: =?UTF-8?q?Alex=20Benn=C3=A9e?= , qemu-devel@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , "Daniel P . Berrange" Cc: Ani Sinha , Richard Henderson , John Snow , qemu-ppc@nongnu.org, Fabiano Rosas Subject: [PATCH v4 02/35] tests/avocado/boot_xen.py: fetch kernel during test setUp() Date: Wed, 21 Aug 2024 10:27:03 +0200 Message-ID: <20240821082748.65853-3-thuth@redhat.com> In-Reply-To: <20240821082748.65853-1-thuth@redhat.com> References: <20240821082748.65853-1-thuth@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.15 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=thuth@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: 11 X-Spam_score: 1.1 X-Spam_bar: + X-Spam_report: (1.1 / 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_SBL_CSS=3.335, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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: 1724229018508116600 Content-Type: text/plain; charset="utf-8" From: Cleber Rosa 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 Reviewed-by: Akihiko Odaki Tested-by: Marcin Juszkiewicz Message-ID: <20240806173119.582857-7-crosa@redhat.com> Signed-off-by: Thomas Huth --- 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.46.0