From patchwork Fri Jul 26 13:44:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742791 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 986B817B4F3 for ; Fri, 26 Jul 2024 13:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001501; cv=none; b=kP/kA5IGmP7X4uHYbyXORgsgFn6kvvQn2loXkbTlOzd/XD9eEp20IcRhFuiBddLIMjU8Uh+00AYq89qSkmfyNW/kVLPfs/ds1kzfxeDZ/gyujkJfEfl8QktHQw5cWi5X4bvy80H7l1RvpZIaeLA9uE7bgL9Gxh42vnSxyHmKmBc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001501; c=relaxed/simple; bh=B+JMSyLMXbS0LSvCeLLledli0X8i7T7WaezqxjOFlIA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pNrMHgiwS+oUb68j57Dj36VuPZKb/fmxlnwTsQPvbU1uaWQbhHE5U93JKsjnrImeVq6XPZzlCY5088CYCuOlUR3Chi9h+VYeiMJB8E6okglxluN3iOEcozaCKMkYrLh2x0uxESWfsKKV8PmmZu6WKbu8nDW+5x4TLZoRhvo00ho= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=a4me83nQ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="a4me83nQ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001498; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=P7FQv58StIJYRSxNKiflwjN+bDbno3sTr5DQJiQhOCs=; b=a4me83nQK6NIIlOEvxXGPViQPJhVJ2gjCPbYop8wFPv/YvfRxCdNpp1v3obl2Kcr7JMek5 UEDEMdpVWNBVw2icoxi1bwygsE/wvsFBHKNuOddVNwcwiDW+pfw4LdgGvPRpir3pE6FbY9 4hGmCAzjS1l8WiS/2z3iBtorC+FDZso= Received: from mx-prod-mc-05.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-336-kMaxmtupO6SdmFdhmEXmeg-1; Fri, 26 Jul 2024 09:44:55 -0400 X-MC-Unique: kMaxmtupO6SdmFdhmEXmeg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CF8C21956046; Fri, 26 Jul 2024 13:44:52 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A97441955D45; Fri, 26 Jul 2024 13:44:48 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 01/13] tests/avocado: mips: fallback to HTTP given certificate expiration Date: Fri, 26 Jul 2024 09:44:26 -0400 Message-ID: <20240726134438.14720-2-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 The SSL certificate installed at mipsdistros.mips.com has expired: 0 s:CN = mipsdistros.mips.com i:C = US, O = Amazon, OU = Server CA 1B, CN = Amazon a:PKEY: rsaEncryption, 2048 (bit); sigalg: RSA-SHA256 v:NotBefore: Dec 23 00:00:00 2019 GMT; NotAfter: Jan 23 12:00:00 2021 GMT Because this project has no control over that certificate and host, this falls back to plain HTTP instead. The integrity of the downloaded files can be guaranteed by the existing hashes for those files (which are not modified here). Reviewed-by: Alex Bennée Signed-off-by: Cleber Rosa Tested-by: Philippe Mathieu-Daudé --- tests/avocado/boot_linux_console.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index c35fc5e9ba..450d67be6a 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -299,7 +299,7 @@ def test_mips_malta32el_nanomips_4k(self): :avocado: tags=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page4k.xz') kernel_hash = '477456aafd2a0f1ddc9482727f20fe9575565dd6' @@ -312,7 +312,7 @@ def test_mips_malta32el_nanomips_16k_up(self): :avocado: tags=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page16k_up.xz') kernel_hash = 'e882868f944c71c816e832e2303b7874d044a7bc' @@ -325,7 +325,7 @@ def test_mips_malta32el_nanomips_64k_dbg(self): :avocado: tags=endian:little :avocado: tags=cpu:I7200 """ - kernel_url = ('https://mipsdistros.mips.com/LinuxDistro/nanomips/' + kernel_url = ('http://mipsdistros.mips.com/LinuxDistro/nanomips/' 'kernels/v4.15.18-432-gb2eb9a8b07a1-20180627102142/' 'generic_nano32r6el_page64k_dbg.xz') kernel_hash = '18d1c68f2e23429e266ca39ba5349ccd0aeb7180' From patchwork Fri Jul 26 13:44:27 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742792 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4A83B17C20D for ; Fri, 26 Jul 2024 13:45:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001505; cv=none; b=gXEZnmt6vxjYuhJZXJayH2AQxli6UDw/+wPrhZewaW3uUOd9YOqyfN8Z1OVNeT5Nv5WEJcyumhGqhrTcsGEX9ZPZ3A2AiDbH4IUm1nAp2TH31noW/t65a4C+S0TLfhSQhzW0RT7bsyfGRQamL/zbaeox5KIb5t1S8Th+ZUBO4zU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001505; c=relaxed/simple; bh=pm53+ti9b2oNDi+nfcUMmvnbmv9j2wIaBUWaeeJgWOw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UUOAT4pHOkD5WOhMIIk/eYQRkZb5J2ZxI5QPLCSblwKshdiAf0BNcfoJeDJxvwLiFnCP2rxslbAfpzK/6XjIYX7HmQriio96cGygTohTeswLQATYorU7/S/nR2jzCFzAz98RCXgv1dBar8Os8hRBpm7+YBduSxsTe3C20W6AK9Q= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=Ry3oicW7; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="Ry3oicW7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001503; 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=RKmLOo511M5++BDmKAMU+H3V3j7+sw7OERXfgONtCK4=; b=Ry3oicW7vetjljsQ/cjGtPCFYktnkueJZZScStEjDpL+n9s++GVE9jjd9p7MtnAcOPtBPj fl96C4teSvHLVv5Tr+VW9BipVrVN9goCvZS+bVH6OJESX/zQ+g3Jp7ekK8QgH9Mnj5QuVV HtAhZ8znVHf0UjFn9W1umeCMM7TDEUY= Received: from mx-prod-mc-01.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-372-QtkdACIBPma6-WCXhF2TOg-1; Fri, 26 Jul 2024 09:45:00 -0400 X-MC-Unique: QtkdACIBPma6-WCXhF2TOg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E48F21955D53; Fri, 26 Jul 2024 13:44:57 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4E6F51955D4A; Fri, 26 Jul 2024 13:44:52 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 02/13] tests/avocado: mips: add hint for fetchasset plugin Date: Fri, 26 Jul 2024 09:44:27 -0400 Message-ID: <20240726134438.14720-3-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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 Tested-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): """ From patchwork Fri Jul 26 13:44:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742793 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 333871E51F for ; Fri, 26 Jul 2024 13:45:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001512; cv=none; b=Eut9X5IfLQcoYsFhhv2k+kJ7YUWWhMUqEC6oglBPBOFrUiHXLWAeC5sbH6Dvf/XTmwH3vw8MWUTK7yqkNsvucknRPEwV8AhYW43XhHZ7GVOCz9AT14l8ohppk+Z5JYurXgFWMal5z32AHWeoNgyqGuvWw/o+LUmbDsWQBc0YAt8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001512; c=relaxed/simple; bh=jHCUIM+RYqPqB2UI6fy8qFUoDGCmOaxu61kmYgMyhsA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=HnaTfkMw3UqYJ+FlivYmnrhhnQsiUwcwG4tkjUOogYvDij7LQ7mIr8xtKa9lqB5Dz9195xoirGN1q1ZGmEf+1SXCttmOhmTMgAnLzi8VR9yAB1E/GA4I8hH12nWat3GAeiN6bdKQo/Wbhvi0MsXDd7HlWdxd4qQfuNW99H5qO7g= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=WvgRSOU7; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="WvgRSOU7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001510; 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=E3IWYfQZY9Vtpyu9w1tUYKrkYYnY1w3NcI8rW4hxkqc=; b=WvgRSOU7MdEBrShciCWLIbxPsFHL7yl603WQsf+BrLfj0pkzntL1Q1bjHC3z2kQ/bs4boR zOgpQbMmfdX+xAuojr8R59HD+QWxx3mOr0kx1hcR0vJqZ4IxQsAAHPbEa6kMIhDX1eYjcU YWwFvVegbFMv3PXOCOlqCrBzkZ/LH7s= Received: from mx-prod-mc-03.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-670-PAgA_eesNUeDe2ihR7jBMg-1; Fri, 26 Jul 2024 09:45:05 -0400 X-MC-Unique: PAgA_eesNUeDe2ihR7jBMg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D3B11955D4E; Fri, 26 Jul 2024 13:45:03 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 102E31955D42; Fri, 26 Jul 2024 13:44:57 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 03/13] tests/avocado/intel_iommu.py: increase timeout Date: Fri, 26 Jul 2024 09:44:28 -0400 Message-ID: <20240726134438.14720-4-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Based on many runs, the average run time for these 4 tests is around 250 seconds, with 320 seconds being the ceiling. In any way, the default 120 seconds timeout is inappropriate in my experience. Let's increase the timeout so these tests get a chance to completion. Signed-off-by: Cleber Rosa --- tests/avocado/intel_iommu.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py index 008f214397..9e7965c5df 100644 --- a/tests/avocado/intel_iommu.py +++ b/tests/avocado/intel_iommu.py @@ -25,6 +25,8 @@ class IntelIOMMU(LinuxTest): :avocado: tags=flaky """ + timeout = 360 + IOMMU_ADDON = ',iommu_platform=on,disable-modern=off,disable-legacy=on' kernel_path = None initrd_path = None From patchwork Fri Jul 26 13:44:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742794 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 81EBF17B4FF for ; Fri, 26 Jul 2024 13:45:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001514; cv=none; b=W9t0Od0IvyiCaMZgQFU1wyOD5icUHjPJ/NbOv7LrXLDRscpAUCuK6AHdtyQe6NogK4Ut6CVu0/Vi4udlMDWPY5t0ShHHZa2dDJCwwSwRmHDtCobBBWLD9ZCvmL63UVVObbizQsRL96FLBtcTykrB3CeSKoc6ZS3g9blVDPza7JA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001514; c=relaxed/simple; bh=1zX2K2QJLCXIFYCEQbFOJq6h9l4RjEhyqg+jefGa8KA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QFB2lzHCEGOlLWbpdmut56GV381gyLRO5XFyF36RL+5vnOUf90TDb4XimqQ1OaWBJzihey4NQBsudt4fTPITNbkb/uyAg+67TYBHpYt4rAYj3q8gXzWaP4Z2y++Nmm2ynxcji7FDzfTGys/wcGKQsgk6tNm4ZobhlVf+raoqKtU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=IO57rz/L; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="IO57rz/L" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001511; 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=osLPoiTFxmzb7yDc5D1S/zDpmyUMFotz0CS6WEgfGpM=; b=IO57rz/LPyiIaP+fyI+jk0mSl9nSyGFB0nZFzvJRtEHc5WFmr0d8USwHVpBchoNU4daPlb iGIhD6myvgpmVqVHn9oJ96kLRzhouPIALuOyp7EF6whu63zKtwuMx1599X98ARCcasGS+3 gJwi/j1qEPHrH7OwpeWxIasVBFC2dQs= Received: from mx-prod-mc-03.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-149-3RQj_R13N2mlf7KIO6P6CQ-1; Fri, 26 Jul 2024 09:45:10 -0400 X-MC-Unique: 3RQj_R13N2mlf7KIO6P6CQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 04B251944A95; Fri, 26 Jul 2024 13:45:08 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4B9EB1955D45; Fri, 26 Jul 2024 13:45:03 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 04/13] tests/avocado: add cdrom permission related tests Date: Fri, 26 Jul 2024 09:44:29 -0400 Message-ID: <20240726134438.14720-5-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Signed-off-by: Cleber Rosa --- tests/avocado/cdrom.py | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 tests/avocado/cdrom.py diff --git a/tests/avocado/cdrom.py b/tests/avocado/cdrom.py new file mode 100644 index 0000000000..c9aa5d69cb --- /dev/null +++ b/tests/avocado/cdrom.py @@ -0,0 +1,41 @@ +# Simple functional tests for cdrom devices +# +# Copyright (c) 2023 Red Hat, Inc. +# +# Author: +# Cleber Rosa +# +# This work is licensed under the terms of the GNU GPL, version 2 or +# later. See the COPYING file in the top-level directory. + +import os + +from avocado.utils.iso9660 import iso9660 +from avocado_qemu import QemuSystemTest + + +class Cdrom(QemuSystemTest): + """ + :avocado: tags=block,cdrom,quick + :avocado: tags=machine:none + """ + def setUp(self): + super().setUp() + self.iso_path = os.path.join(self.workdir, "cdrom.iso") + iso = iso9660(self.iso_path) + iso.create() + iso.close() + + def test_plain_iso_rw(self): + self.vm.add_args('-drive', f'file={self.iso_path}') + self.vm.launch() + query_block_result = self.vm.qmp('query-block')['return'] + self.assertEqual(len(query_block_result), 1) + self.assertFalse(query_block_result[0]["inserted"]["ro"]) + + def test_media_cdrom_ro(self): + self.vm.add_args('-drive', f'file={self.iso_path},media=cdrom') + self.vm.launch() + query_block_result = self.vm.qmp('query-block')['return'] + self.assertEqual(len(query_block_result), 1) + self.assertTrue(query_block_result[0]["inserted"]["ro"]) From patchwork Fri Jul 26 13:44:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742795 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A42D1E4B0 for ; Fri, 26 Jul 2024 13:45:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001520; cv=none; b=PEiQg/zyFEbRBjPVzQMvuzOBzxh0ikmnB76MGsykjGQYcVrXxChTpNrs97Cr82trW0FXjdC/l9BrDFsUn5sdDeSvxsT5jiIG01PyO+/h7p+ncgIfS7HEKrxZWfmdHKdIckU7ZXWtL0OISy9P516V3wU8FL3ZnU8w4hRf+CW9nBE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001520; c=relaxed/simple; bh=97b8YgaveA4LK6HRs7GsLX007P7pXU7xzg3hfb3Ho/s=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nXDdJdUceT0N7RsgFmZA4sB2jdCi/XDF0n1BVAA+Bp24IV9qkLJBpymVxBoCF6iCFNiacL8fKU5JaKP4dEV2P2dugsNPy43Rk9hxj2DxB38J8Myo3GmjoT1abjjofPO86D67dvi1wLvxJDrJKnZEzNmTOTYJYNwM7K6c+7jVCRk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=I1zFoCAg; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="I1zFoCAg" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001518; 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=WtaWhlmHpoy33xPksIjdi5YUZQGPJj68+Jp6A9OldAg=; b=I1zFoCAgIzHok5VIZGoBh+WRRG6IoWDvbEoEr8ock63JIiay6C5G5mQuWPgp3ZxZGEtTrw gvcYpn98AyvOgMQvX9WEqNsnh3Yq02o3yYOtP88qlacZwMGW/wpC5UHRLMvFi0kaa6e75W sJknY7X7fbwAGvCo8l2rg2k51bP2D34= Received: from mx-prod-mc-01.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-223-GsuuMM2uP7WZa0qYNGJc5w-1; Fri, 26 Jul 2024 09:45:14 -0400 X-MC-Unique: GsuuMM2uP7WZa0qYNGJc5w-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A2DB31955BFA; Fri, 26 Jul 2024 13:45:12 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 708501955D48; Fri, 26 Jul 2024 13:45:08 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 05/13] tests/avocado: machine aarch64: standardize location and RO access Date: Fri, 26 Jul 2024 09:44:30 -0400 Message-ID: <20240726134438.14720-6-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 The tests under machine_aarch64_virt.py and machine_aarch64_sbsaref.py should not be writing to the ISO files. By adding "media=cdrom" the "ro" is autmatically set. While at it, let's use a single code style and hash for the ISO url. Signed-off-by: Cleber Rosa --- tests/avocado/machine_aarch64_sbsaref.py | 6 +++++- tests/avocado/machine_aarch64_virt.py | 14 +++++++------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index e920bbf08c..1275f24532 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -129,7 +129,11 @@ def boot_alpine_linux(self, cpu): "-cpu", cpu, "-drive", - f"file={iso_path},format=raw", + f"file={iso_path},media=cdrom,format=raw", + "-device", + "virtio-rng-pci,rng=rng0", + "-object", + "rng-random,id=rng0,filename=/dev/urandom", ) self.vm.launch() diff --git a/tests/avocado/machine_aarch64_virt.py b/tests/avocado/machine_aarch64_virt.py index a90dc6ff4b..6831d2c0ed 100644 --- a/tests/avocado/machine_aarch64_virt.py +++ b/tests/avocado/machine_aarch64_virt.py @@ -37,13 +37,13 @@ def test_alpine_virt_tcg_gic_max(self): :avocado: tags=machine:virt :avocado: tags=accel:tcg """ - iso_url = ('https://dl-cdn.alpinelinux.org/' - 'alpine/v3.17/releases/aarch64/' - 'alpine-standard-3.17.2-aarch64.iso') + iso_url = ( + "https://dl-cdn.alpinelinux.org/" + "alpine/v3.17/releases/aarch64/alpine-standard-3.17.2-aarch64.iso" + ) - # Alpine use sha256 so I recalculated this myself - iso_sha1 = '76284fcd7b41fe899b0c2375ceb8470803eea839' - iso_path = self.fetch_asset(iso_url, asset_hash=iso_sha1) + iso_hash = "5a36304ecf039292082d92b48152a9ec21009d3a62f459de623e19c4bd9dc027" + iso_path = self.fetch_asset(iso_url, algorithm="sha256", asset_hash=iso_hash) self.vm.set_console() kernel_command_line = (self.KERNEL_COMMON_COMMAND_LINE + @@ -60,7 +60,7 @@ def test_alpine_virt_tcg_gic_max(self): self.vm.add_args("-smp", "2", "-m", "1024") self.vm.add_args('-bios', os.path.join(BUILD_DIR, 'pc-bios', 'edk2-aarch64-code.fd')) - self.vm.add_args("-drive", f"file={iso_path},format=raw") + self.vm.add_args("-drive", f"file={iso_path},media=cdrom,format=raw") self.vm.add_args('-device', 'virtio-rng-pci,rng=rng0') self.vm.add_args('-object', 'rng-random,id=rng0,filename=/dev/urandom') From patchwork Fri Jul 26 13:44:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742796 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E75217BB0E for ; Fri, 26 Jul 2024 13:45:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001524; cv=none; b=qmkaoIYBs+H4Gc2SXeEUKpkCS60DodlzynUWbZA1KeU2lJVr9VTCTsvf9Hreg8MmJGRoLFPGLpW6VEDOs1APVrQ886G9oULjUz6D2yBSDJUSMUkxasQPBokginVM6G6/nhXtplYP/PThW/BfXQ89IU+4Y94iwYWYkwYsBuG8cg4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001524; c=relaxed/simple; bh=8x1+FJiPG6Vt01TlPOvILg8n38jlzXBlgxHlNbOyUzw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=MdqTf3pIv8mdkSjAnaSQuvhiRj0zjopGtCYyiHK5HMGRd9RpzgvOThxeD2/7Lx4Qt6eKJe9as226iNCjnC5TmlXDv70PydfUG/KIcDPKmdyiiriPQMHSduZN/9tLsu+enWU8HELk5q1wsoH3KEQpxntrHKeh9yDbLtDsLfG+Bm4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=eCs++XRF; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eCs++XRF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001522; 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=1OvDLu3KIbWHiu6ZxO0CUx4o4QNDavrUPXIZjllUrVA=; b=eCs++XRFrSblQzhVBugn7ok/HQu5XN71QJ5o142AJ0bUNDymPzHor3QewqDjxnTM2J8K7G vhc0PEzpcro2RCP9lZyyNGjKp+Ehs2j1kOOhcFZXP+npyG3HbsOkVspLbFYA7MY0OAYyCA y0S5p0Eh+mUTF+/4mj5/4VhT29tLleQ= 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-488-X4q3-WUWMgibfuwHxzfhaQ-1; Fri, 26 Jul 2024 09:45:19 -0400 X-MC-Unique: X4q3-WUWMgibfuwHxzfhaQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 920EF1944AA6; Fri, 26 Jul 2024 13:45:16 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D2BD61955D42; Fri, 26 Jul 2024 13:45:12 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 06/13] tests/avocado: use more distinct names for assets Date: Fri, 26 Jul 2024 09:44:31 -0400 Message-ID: <20240726134438.14720-7-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Avocado's asset system will deposit files in a cache organized either by their original location (the URI) or by their names. Because the cache (and the "by_name" sub directory) is common across tests, it's a good idea to make these names as distinct as possible. This avoid name clashes, which makes future Avocado runs to attempt to redownload the assets with the same name, but from the different locations they actually are from. This causes cache misses, extra downloads, and possibly canceled tests. Signed-off-by: Cleber Rosa --- tests/avocado/kvm_xen_guest.py | 3 ++- tests/avocado/netdev-ethtool.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py index f8cb458d5d..318fadebc3 100644 --- a/tests/avocado/kvm_xen_guest.py +++ b/tests/avocado/kvm_xen_guest.py @@ -40,7 +40,8 @@ def get_asset(self, name, sha1): url = base_url + name # use explicit name rather than failing to neatly parse the # URL into a unique one - return self.fetch_asset(name=name, locations=(url), asset_hash=sha1) + return self.fetch_asset(name=f"qemu-kvm-xen-guest-{name}", + locations=(url), asset_hash=sha1) def common_vm_setup(self): # We also catch lack of KVM_XEN support if we fail to launch diff --git a/tests/avocado/netdev-ethtool.py b/tests/avocado/netdev-ethtool.py index 5f33288f81..462cf8de7d 100644 --- a/tests/avocado/netdev-ethtool.py +++ b/tests/avocado/netdev-ethtool.py @@ -27,7 +27,8 @@ def get_asset(self, name, sha1): url = base_url + name # use explicit name rather than failing to neatly parse the # URL into a unique one - return self.fetch_asset(name=name, locations=(url), asset_hash=sha1) + return self.fetch_asset(name=f"qemu-netdev-ethtool-{name}", + locations=(url), asset_hash=sha1) def common_test_code(self, netdev, extra_args=None): From patchwork Fri Jul 26 13:44:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742797 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3CA1C1E536 for ; Fri, 26 Jul 2024 13:45:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001530; cv=none; b=S/7X2PgitPzXCTE37K3cyUcnHOhXNCVIdRKn9j7gxks/7tmrOFGP8DJIoXq9IW//fUF851hsdGXRRAM3Rk/SRdO2MU5g/L9K0b1uNqpL8+OZ4YnjkVg9w4x5cRh/icNRpNxTe+mUb6HyjzhshVqVPlVq/nFWTKwPzuK/Rz8e5Ls= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001530; c=relaxed/simple; bh=YUNzxDPTLigm1IS75kbC8tV0dctEwU3smncbGQXiBeE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=KDUG0E+m2jSIAM6xp3FBHZ+C0PJoVWUlhb5IqFqOhy9pu3O6Y2Z3f74zjQUap6BTqqPGpM2mOnIsiqi3wXohVeu/Yq4R3HmWCqGluxW+3ot2EzDgOY2O3jjEW4gXBlQQZg6Mga/K76Djb2QMDykW/5QD1XHSdM2JpTLdG6cvXqc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=ONG+W+4+; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="ONG+W+4+" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001528; 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=iANeBO6ReZ4SXr/ZZKfmq7nYRFwkGFSuGPP72ITezII=; b=ONG+W+4+3jPyudFONeVwmTPSooQTMZ9o8dbUnbyAoaWFhaebikWEjoX6SlpK9jTmtkAKCF McV1PA+2quO1htWovU/TdYCVVgw510OhiYnmSQ+GRCC23JGbHcEiOt2XqTIRGcCBjv6Rxw fBzUfXBLLjR5eOWAQS4VVla+NC80+GU= Received: from mx-prod-mc-03.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-336-YaN_GngSPvyKyKgwQTcq-w-1; Fri, 26 Jul 2024 09:45:23 -0400 X-MC-Unique: YaN_GngSPvyKyKgwQTcq-w-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CEAF81955BFA; Fri, 26 Jul 2024 13:45:20 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D164F1955D45; Fri, 26 Jul 2024 13:45:16 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 07/13] tests/avocado/kvm_xen_guest.py: cope with asset RW requirements Date: Fri, 26 Jul 2024 09:44:32 -0400 Message-ID: <20240726134438.14720-8-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Some of these tests actually require the root filesystem image, obtained through Avocado's asset feature and kept in a common cache location, to be writable. This makes a distinction between the tests that actually have this requirement and those who don't. The goal is to be as safe as possible, avoiding causing cache misses (because the assets get modified and thus need to be dowloaded again) while avoid copying the root filesystem backing file whenever possible. This also allow these tests to be run in parallel with newer Avocado versions. Signed-off-by: Cleber Rosa --- tests/avocado/kvm_xen_guest.py | 27 ++++++++++++++++++--------- 1 file changed, 18 insertions(+), 9 deletions(-) diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py index 318fadebc3..d73fa888ef 100644 --- a/tests/avocado/kvm_xen_guest.py +++ b/tests/avocado/kvm_xen_guest.py @@ -10,6 +10,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later import os +import shutil from qemu.machine import machine @@ -43,7 +44,7 @@ def get_asset(self, name, sha1): return self.fetch_asset(name=f"qemu-kvm-xen-guest-{name}", locations=(url), asset_hash=sha1) - def common_vm_setup(self): + def common_vm_setup(self, readwrite=False): # We also catch lack of KVM_XEN support if we fail to launch self.require_accelerator("kvm") @@ -56,11 +57,19 @@ def common_vm_setup(self): "367962983d0d32109998a70b45dcee4672d0b045") self.rootfs = self.get_asset("rootfs.ext4", "f1478401ea4b3fa2ea196396be44315bab2bb5e4") + if readwrite: + dest = os.path.join(self.workdir, os.path.basename(self.rootfs)) + shutil.copy(self.rootfs, dest) + self.rootfs = dest - def run_and_check(self): + def run_and_check(self, readwrite=False): + if readwrite: + drive = f"file={self.rootfs},if=none,format=raw,id=drv0" + else: + drive = f"file={self.rootfs},if=none,readonly=on,format=raw,id=drv0" self.vm.add_args('-kernel', self.kernel_path, '-append', self.kernel_params, - '-drive', f"file={self.rootfs},if=none,snapshot=on,format=raw,id=drv0", + '-drive', drive, '-device', 'xen-disk,drive=drv0,vdev=xvda', '-device', 'virtio-net-pci,netdev=unet', '-netdev', 'user,id=unet,hostfwd=:127.0.0.1:0-:22') @@ -90,11 +99,11 @@ def test_kvm_xen_guest(self): :avocado: tags=kvm_xen_guest """ - self.common_vm_setup() + self.common_vm_setup(True) self.kernel_params = (self.KERNEL_DEFAULT + ' xen_emul_unplug=ide-disks') - self.run_and_check() + self.run_and_check(True) self.ssh_command('grep xen-pirq.*msi /proc/interrupts') def test_kvm_xen_guest_nomsi(self): @@ -102,11 +111,11 @@ def test_kvm_xen_guest_nomsi(self): :avocado: tags=kvm_xen_guest_nomsi """ - self.common_vm_setup() + self.common_vm_setup(True) self.kernel_params = (self.KERNEL_DEFAULT + ' xen_emul_unplug=ide-disks pci=nomsi') - self.run_and_check() + self.run_and_check(True) self.ssh_command('grep xen-pirq.* /proc/interrupts') def test_kvm_xen_guest_noapic_nomsi(self): @@ -114,11 +123,11 @@ def test_kvm_xen_guest_noapic_nomsi(self): :avocado: tags=kvm_xen_guest_noapic_nomsi """ - self.common_vm_setup() + self.common_vm_setup(True) self.kernel_params = (self.KERNEL_DEFAULT + ' xen_emul_unplug=ide-disks noapic pci=nomsi') - self.run_and_check() + self.run_and_check(True) self.ssh_command('grep xen-pirq /proc/interrupts') def test_kvm_xen_guest_vapic(self): From patchwork Fri Jul 26 13:44:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742798 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39D4217BB0E for ; Fri, 26 Jul 2024 13:45:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001533; cv=none; b=npjDvfLFX0eK3IUb1MUksttx3znbPiEulW6Ht1W9I3C6ISlyMsfPLJHVrOnwlxqxJViuqYcbkACKEg8Os9lBoTtxB8oJVjdkS1J8RnFjwgKX5Lp0Ap+ikYcpINipe/p0JlYSedBLANas4JZpnQfuNGDi4fOdo1/7CtZxLI7nLr4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001533; c=relaxed/simple; bh=vwrL5/odkotTJdCXRBSTvzUIWyYXQa+eCHoWvg1/U+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=U+wUmawdROa2dMyTMrN1IqVZyuEWilFCN+q9zffkjf2RGaRxgspO29V9J0TxGnuKk2iHRuJ9NZF3QvQFBeBski8UqPDKeSxhPR5oUW42pviLXGhxbiIomdia1qdqXNbTFT7mxBNFz7Ht045QKYmpth+mRf2K0S7e8RYotAO6Iig= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=KzYEvm5f; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="KzYEvm5f" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001531; 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=CfbZVGkAr1tSkWl9/QjabXB/PTPT9K6rU+mi0TPjxrc=; b=KzYEvm5fIf+OUp4CaI62M/yKPjbgSnN1W5h0DdS9PyhP5nTZJjYQbsYgkS0WsovkSdXt7I UxZcb0BXoiBSFzy0/ZItvfXT+gnrEUfz1mn8uE4MlR3tC9hRK5gPcetZhR/xExSVIFm43/ M9EXmPXZI5JBai/23vj0zEmI3+rkzt0= Received: from mx-prod-mc-01.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-265-33CqhGQePNa5PVJ-dZS0Yg-1; Fri, 26 Jul 2024 09:45:26 -0400 X-MC-Unique: 33CqhGQePNa5PVJ-dZS0Yg-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C48F11944B2C; Fri, 26 Jul 2024 13:45:24 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 264501955D42; Fri, 26 Jul 2024 13:45:20 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 08/13] testa/avocado: test_arm_emcraft_sf2: handle RW requirements for asset Date: Fri, 26 Jul 2024 09:44:33 -0400 Message-ID: <20240726134438.14720-9-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 The asset used in the mentioned test gets truncated before it's used in the test. This means that the file gets modified, and thus the asset's expected hash doesn't match anymore. This causes cache misses and re-downloads every time the test is re-run. Let's make a copy of the asset so that the one in the cache is preserved and the cache sees a hit on re-runs. Signed-off-by: Cleber Rosa Reviewed-by: Daniel P. Berrangé --- tests/avocado/boot_linux_console.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index b8b0a4df10..2929aa042d 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -401,14 +401,16 @@ def test_arm_emcraft_sf2(self): 'fe371d32e50ca682391e1e70ab98c2942aeffb01/spi.bin') spi_hash = '65523a1835949b6f4553be96dec1b6a38fb05501' spi_path = self.fetch_asset(spi_url, asset_hash=spi_hash) + spi_path_rw = os.path.join(self.workdir, os.path.basename(spi_path)) + shutil.copy(spi_path, spi_path_rw) - file_truncate(spi_path, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB + file_truncate(spi_path_rw, 16 << 20) # Spansion S25FL128SDPBHICO is 16 MiB self.vm.set_console() kernel_command_line = self.KERNEL_COMMON_COMMAND_LINE self.vm.add_args('-kernel', uboot_path, '-append', kernel_command_line, - '-drive', 'file=' + spi_path + ',if=mtd,format=raw', + '-drive', 'file=' + spi_path_rw + ',if=mtd,format=raw', '-no-reboot') self.vm.launch() self.wait_for_console_pattern('Enter \'help\' for a list') From patchwork Fri Jul 26 13:44:34 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742799 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 973371E51E for ; Fri, 26 Jul 2024 13:45:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001537; cv=none; b=Ef3c+o5w4j29f0OBRxne734reKKrABRFIMRq7++1drMLAtb04FKmq1mREbem7Rj8Zb6AMyKTxPMrV19P0bt8Q9lUFP4Km1Ief1KCKHpBSXeqeP6PKz81QU56RWbQAFlT8UUNTJKebrGcoSX/rdCAsHnmWwqo3mOU5Ph77uKv+gs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001537; c=relaxed/simple; bh=uOJJXadgsAZq3WmO2qAZQTeIcvR/iwwubszGqZNC0PM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tv/axxOHLym5FJwEcyGwRMGRM+JqHp19VDRvAcbCRR+b6xLLQQs8TB7r9Sa4YVoImWE3SF2Glu5+Dih5d0HT/k21+xkQ2tDf8JbA8qvP26WH36NYJ2rw41u/MfeARgNc3CGzKIJHNeiNPGvTCwMRrXo4CEuCawdwm+A6TK0nJHM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=hMBIIVh1; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="hMBIIVh1" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001534; 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=hMBIIVh1/E2B7GXSZ4LGFsNc6MN5i7wjRqwU78eVl8M0NY9d/Mt+7/CQ2aMv43CPlmrY0J QY0vMrDJyqQweYRgHPKCJfZepkjuYCq9GeP9tcQKzaH33U5yt9Fr+r60xsra8EuHH/cK81 5qdcN/IqgqkrN8K51STTXuPAz4A8KPk= 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-600-Du1ZquumO3icphIrhLcVaQ-1; Fri, 26 Jul 2024 09:45:31 -0400 X-MC-Unique: Du1ZquumO3icphIrhLcVaQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 33DD91944A87; Fri, 26 Jul 2024 13:45:29 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 24ACF1955D42; Fri, 26 Jul 2024 13:45:24 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 09/13] tests/avocado/boot_xen.py: fetch kernel during test setUp() Date: Fri, 26 Jul 2024 09:44:34 -0400 Message-ID: <20240726134438.14720-10-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 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 = 90 XEN_COMMON_COMMAND_LINE = 'dom0_mem=128M loglvl=all guest_loglvl=all' - def fetch_guest_kernel(self): + def setUp(self): + super(BootXen, self).setUp() + # Using my own built kernel - which works kernel_url = ('https://fileserver.linaro.org/' 's/JSsewXGZ6mqxPr5/download?path=%2F&files=' 'linux-5.9.9-arm64-ajb') kernel_sha1 = '4f92bc4b9f88d5ab792fa7a43a68555d344e1b83' - kernel_path = self.fetch_asset(kernel_url, - asset_hash=kernel_sha1) - - return kernel_path + self.kernel_path = self.fetch_asset(kernel_url, + asset_hash=kernel_sha1) 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 = self.fetch_guest_kernel() self.vm.set_console() @@ -56,7 +55,7 @@ def launch_xen(self, xen_path): '-append', self.XEN_COMMON_COMMAND_LINE, '-device', 'guest-loader,addr=0x47000000,kernel=%s,bootargs=console=hvc0' - % (kernel_path)) + % (self.kernel_path)) self.vm.launch() From patchwork Fri Jul 26 13:44:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742800 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB7811E51E for ; Fri, 26 Jul 2024 13:45:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001546; cv=none; b=VctGllWKs4dO+bt/fdAEOcB5+NFaLe3QIKQawRBxLyPB4VNM4I5mmpSjG61Rm6wHgkimD7YG76cWFgTfmGBybI9M9cKGb2k8qXrjTWxvU/ANr/4Mj9+aBbcVCVDMyLh6yHXHFL81Vne2htO0+OtgBVca9g1iyzUJumcA905d3l4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001546; c=relaxed/simple; bh=DDzXYnuxAnF14vr6BSNq5PMlogVQicbxHLRVmxqLErg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YuIAjdYS/0vfNSDdF0IN/mztQfd/poiK/EB2ayy6HA4HMpA18OGB2KjsmyXLRYCah6Cw9TQ+4PRIBwO1vDWJOgupmfsuaBocSoGoBnvcf9fH37A2B8MZ+cZPTIuQsGEDGqI8t8mUUqpD+Neim5O4Y2gssH/mTD1eS5hZjDDiWNg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=NLqP+uGT; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="NLqP+uGT" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001544; 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=9Pp0EmgfUgef5CCbhzHhQ+sBuTsis6yWoLZCERPLAmQ=; b=NLqP+uGTwMbKS1KJczDznX1EVv9HPaSIPO3kYjYUAZ7vP1f4QPQ5IoyAv2gAWWLaX6+cce EGMsi7OBBr+SJV9mXS2Q5WepmYW4fkhwPCRny6bjmHjFyFAUGTwksU5auGCaxqSQCNz30j R94H8eI9vn/y9+g6y5lgXv26Goq+rV4= 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-113--MtupRyvNCOkAExirddxAA-1; Fri, 26 Jul 2024 09:45:37 -0400 X-MC-Unique: -MtupRyvNCOkAExirddxAA-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 7FD191955D63; Fri, 26 Jul 2024 13:45:33 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 701441955D48; Fri, 26 Jul 2024 13:45:29 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 10/13] tests/avocado/tuxrun_baselines.py: use Avocado's zstd support Date: Fri, 26 Jul 2024 09:44:35 -0400 Message-ID: <20240726134438.14720-11-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 Signed-off-by: Cleber Rosa Reviewed-by: Daniel P. Berrangé --- tests/avocado/tuxrun_baselines.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/avocado/tuxrun_baselines.py b/tests/avocado/tuxrun_baselines.py index 736e4aa289..bd02e88ed6 100644 --- a/tests/avocado/tuxrun_baselines.py +++ b/tests/avocado/tuxrun_baselines.py @@ -17,6 +17,7 @@ from avocado_qemu import QemuSystemTest from avocado_qemu import exec_command, exec_command_and_wait_for_pattern from avocado_qemu import wait_for_console_pattern +from avocado.utils import archive from avocado.utils import process from avocado.utils.path import find_command @@ -40,17 +41,12 @@ def get_tag(self, tagname, default=None): return default + @skipUnless(archive._probe_zstd_cmd(), + 'Could not find "zstd", or it is not able to properly ' + 'decompress decompress the rootfs') def setUp(self): super().setUp() - # We need zstd for all the tuxrun tests - # See https://github.com/avocado-framework/avocado/issues/5609 - zstd = find_command('zstd', False) - if zstd is False: - self.cancel('Could not find "zstd", which is required to ' - 'decompress rootfs') - self.zstd = zstd - # Process the TuxRun specific tags, most machines work with # reasonable defaults but we sometimes need to tweak the # config. To avoid open coding everything we store all these @@ -99,8 +95,8 @@ def fetch_tuxrun_assets(self, csums=None, dt=None): asset_hash = isum, algorithm = "sha256") - cmd = f"{self.zstd} -d {disk_image_zst} -o {self.workdir}/rootfs.ext4" - process.run(cmd) + archive.extract(disk_image_zst, os.path.join(self.workdir, + "rootfs.ext4")) if dt: dsum = csums.get(dt, None) From patchwork Fri Jul 26 13:44:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742801 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C75151E51F for ; Fri, 26 Jul 2024 13:45:50 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001552; cv=none; b=aPPf9dftDIUJGe0uRLbnmGgP5x5NJLix6Zn9CXpXbTuf3OTg/t+ZqtkWym8odW4hSOkxawwlqNaRSzvr7stPlwlDiqIGjfSMPzS14QfpBAadNQkh3VUNkYjXfJwszh6EXL0NGhfr4K/bngREWuYw/PBnjVOMrebyELcwp1ni3wU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001552; c=relaxed/simple; bh=stN7LSPeJfpeO6AjTu74XONPO2TxufjVsVOgft4YlMY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TtQ5GHQRAkAihxgJJ/M++c9bMsjexdB9NUjRp/8TGzzr0Oe4OueWt88N4o0/g4JJQSjqpYSa2RG0qImY7FmcFoEW//VJ4Njwr/m3ujqhvkkx0FElAshwaZ7ibqEQamEiuZ80JwIe4nCsyyZFsV3Kxeg5d1UOtikhPg7X2fnNsKM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=jN1wgmon; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="jN1wgmon" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001549; 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=22aK5G9Gu9BLJGucdCy0aPoPQpR5xm/lyRWYWqyAjJA=; b=jN1wgmon9cPb5i+f9/vzA8nlXJYIumD3eaHXFqH7s2/QPoZLD4Xmy4Kepv9W13BC1cbuLn mTkayTjgV9+YfgGMh8BBVdH1UBrDNaHPzkxYhwSlt18+Rfv3pYXlwObElfRe6ksfbZ3b79 QJf/B7Z7U8890JqBrjvI/15gEC0bTOs= 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-80-1NnmSBVsP8KgRivKXZD1fA-1; Fri, 26 Jul 2024 09:45:46 -0400 X-MC-Unique: 1NnmSBVsP8KgRivKXZD1fA-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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 97E1718EB20E; Fri, 26 Jul 2024 13:45:38 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B7C961955D42; Fri, 26 Jul 2024 13:45:33 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 11/13] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image Date: Fri, 26 Jul 2024 09:44:36 -0400 Message-ID: <20240726134438.14720-12-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 When the OpenBSD based tests are run in parallel, the previously single instance of the image would become corrupt. Let's give each test its own copy. Signed-off-by: Cleber Rosa --- tests/avocado/machine_aarch64_sbsaref.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index 1275f24532..8816308b86 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -7,6 +7,7 @@ # SPDX-License-Identifier: GPL-2.0-or-later import os +import shutil from avocado import skipUnless from avocado.utils import archive @@ -187,7 +188,9 @@ def boot_openbsd73(self, cpu): ) img_hash = "7fc2c75401d6f01fbfa25f4953f72ad7d7c18650056d30755c44b9c129b707e5" - img_path = self.fetch_asset(img_url, algorithm="sha256", asset_hash=img_hash) + cached_img_path = self.fetch_asset(img_url, algorithm="sha256", asset_hash=img_hash) + img_path = os.path.join(self.workdir, os.path.basename(cached_img_path)) + shutil.copy(cached_img_path, img_path) self.vm.set_console() self.vm.add_args( From patchwork Fri Jul 26 13:44:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742802 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 48DB81E51E for ; Fri, 26 Jul 2024 13:46:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001565; cv=none; b=AqZiU8FPpCv1U3hPA6lS2M0JGu5UaBsS+jjVE+RnTSH/7WZ4bXVc/d6oV5y0bz0emWykTt2KdlKQQqvg+OX7svLONXmkgVs0wFTOt77Bv+hXMNWl9B9+gklnzt90ocOC1EoIhDq0qB0/ak5teCwdGbk/P1PJr59ONf7hqkx8nl4= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001565; c=relaxed/simple; bh=0TnTNn0cZYwx27T5Vn5p9M9AWTLMPZqgcyuq6rrJCew=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=GfTPi+4XGySIe4iqM4ducYNZqzkZRclhvmx4y4dwzm1duDV+hMsdnkrC4SxCfBF1oc0rqGm02RVVfx1yawffeTXoJfjlejCYRpt5Y9R784Hl/4hvD74Jf7uq2BxLg68fFEh4E8a5xP3QracwP0XOaTIF3JGB/DAL0LL+x8yoE1s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=HlHP68dZ; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="HlHP68dZ" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001563; 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=EIz6GUKRiMrJ4ToqmN6PNK35L1sSA8CzTEn9Mn2ZcHQ=; b=HlHP68dZbfL6pybj5VGb0kahdW13tWTdVJJ9UwIK6pDpnwtasi6YHh1RwK2M1EYMMg6fxe zDjJ/OpnjCczP+0dJKXTozuWKht02TZEuO2l0bw8S9w7uRofovdizLLRKyJPFgviXsKfUA lemJaZxXCmK7z4M1nP1DXjVvN3nR/Ts= Received: from mx-prod-mc-01.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-192-S669IZyENCGJsElLcUAWWw-1; Fri, 26 Jul 2024 09:45:57 -0400 X-MC-Unique: S669IZyENCGJsElLcUAWWw-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CE5FB1918E4D; Fri, 26 Jul 2024 13:45:42 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8A2331955D52; Fri, 26 Jul 2024 13:45:38 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 12/13] Bump avocado to 103.0 Date: Fri, 26 Jul 2024 09:44:37 -0400 Message-ID: <20240726134438.14720-13-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 This bumps Avocado to latest the LTS release. An LTS release is one that can receive bugfixes and guarantees stability for a much longer period and has incremental minor releases made. Even though the 103.0 LTS release is pretty a rewrite of Avocado when compared to 88.1, the behavior of all existing tests under tests/avocado has been extensively tested no regression in behavior was found. Reference: https://avocado-framework.readthedocs.io/en/103.0/releases/lts/103_0.html Signed-off-by: Cleber Rosa --- pythondeps.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pythondeps.toml b/pythondeps.toml index f6e590fdd8..175cf99241 100644 --- a/pythondeps.toml +++ b/pythondeps.toml @@ -30,5 +30,5 @@ sphinx_rtd_theme = { accepted = ">=0.5", installed = "1.1.1" } # Note that qemu.git/python/ is always implicitly installed. # Prefer an LTS version when updating the accepted versions of # avocado-framework, for example right now the limit is 92.x. -avocado-framework = { accepted = "(>=88.1, <93.0)", installed = "88.1", canary = "avocado" } +avocado-framework = { accepted = "(>=103.0, <104.0)", installed = "103.0", canary = "avocado" } pycdlib = { accepted = ">=1.11.0" } From patchwork Fri Jul 26 13:44:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13742803 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C13091E51E for ; Fri, 26 Jul 2024 13:46:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.133.124 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001585; cv=none; b=IbfeqWHC8AJeaTSAEfK7NhwP5vYVGbDLXZ7C8e+E3r+420sMFs8UrxvJuB30nRPkpmwMzIDRC2VIJKsFXaebX4KyqHXKnXFZvjUmSRqkVeK/vGygapYTQmlo0txB6RtKsJp3FiNGWF2lJP/EzSL+JIfSSoN6l/cf9easJ8P8ZEc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722001585; c=relaxed/simple; bh=nd9uOdF5ixjSilVwzdWEGLL+i33lm9IfHRsSqxvXQwA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Xqa5XmqzbKZRY3kZ5qM75SpsGXlj5yPyUJ88ZpxPd9ZpxksJ15nQpfYNpN6NEHbQNR8pFy8opcdvyDCgn59M4KCDxC1GPm3fqJ/Llzv99x9+R2CprdTF80zo6bY2X8dw/x2Z5azmrcLZ1Ulo7S/AKaVnqEU3nqIfj0/2d9HBkhQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=JRd4hw9p; arc=none smtp.client-ip=170.10.133.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="JRd4hw9p" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722001582; 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=Im4JjI8yzxxn9wQq5bZQLL26rZjo/9QxJ6+zUl4DQ7s=; b=JRd4hw9pQKflbRFcRgvbfdvcHmBW4u9jb229hQ3T/sgQKIRjSVDvMgVOW/gGK1k2FoSjkU 8TEQ30M1JJwKrtfu+QpuPtKwIZgmbfQ+MTkYsngWYW/Vqi352jUZcDB/PRKB3hbJ4sqtyi exIIE0TKD2gG04ZOK3t6Al/WZ363Nig= Received: from mx-prod-mc-01.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-170-dGOgJqcsNGmzR9AyTJmYdQ-1; Fri, 26 Jul 2024 09:46:17 -0400 X-MC-Unique: dGOgJqcsNGmzR9AyTJmYdQ-1 Received: from mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.40]) (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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B640C19E5770; Fri, 26 Jul 2024 13:46:07 +0000 (UTC) Received: from p1.localdomain.com (unknown [10.22.17.77]) by mx-prod-int-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2A4F71955D42; Fri, 26 Jul 2024 13:45:42 +0000 (UTC) From: Cleber Rosa To: qemu-devel@nongnu.org Cc: Peter Maydell , Thomas Huth , Beraldo Leal , Sriram Yagnaraman , David Woodhouse , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= , Leif Lindholm , Jiaxun Yang , kvm@vger.kernel.org, =?utf-8?q?Alex_?= =?utf-8?q?Benn=C3=A9e?= , Marcin Juszkiewicz , Wainer dos Santos Moschetta , qemu-arm@nongnu.org, Radoslaw Biernacki , Cleber Rosa , Paul Durrant , Paolo Bonzini , Akihiko Odaki Subject: [PATCH 13/13] Avocado tests: allow for parallel execution of tests Date: Fri, 26 Jul 2024 09:44:38 -0400 Message-ID: <20240726134438.14720-14-crosa@redhat.com> In-Reply-To: <20240726134438.14720-1-crosa@redhat.com> References: <20240726134438.14720-1-crosa@redhat.com> Precedence: bulk X-Mailing-List: kvm@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.40 The updated Avocado version allows for the execution of tests in parallel. While on a CI environment it may not be a good idea to increase the parallelization level in a single runner, developers may leverage that on specific CI runners or on their development environments. This also multiplies the timeout for each test accordingly. The reason is that more concurrency can lead to less resources, and less resources can lead to some specific tests taking longer to complete and then time out. The timeout factor being used here is very conservative (being equal to the amount of parallel tasks). The worst this possibly oversized timeout value can do is making users wait a bit longer for the job to finish if a test hangs. Overall, users can expect a much quicker turnaround on most systems with a value such as 8 on a 12 core machine. Signed-off-by: Cleber Rosa --- docs/devel/testing.rst | 12 ++++++++++++ tests/Makefile.include | 6 +++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/docs/devel/testing.rst b/docs/devel/testing.rst index 23d3f44f52..5600123743 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -983,6 +983,18 @@ of Avocado or ``make check-avocado``, and can also be queried using: pyvenv/bin/avocado list tests/avocado +To run tests in parallel, the ``AVOCADO_PARALLEL`` environment +variable can be defined with a value different than ``1`` (its default +value). Example: + + .. code:: + + make check-avocado AVOCADO_PARALLEL=4 + +Please exercise care when using parallel execution with the QEMU +Avocado tests as a higher system load can cause time sensitive tests +to timeout and be interrupted. + Manual Installation ~~~~~~~~~~~~~~~~~~~ diff --git a/tests/Makefile.include b/tests/Makefile.include index 6618bfed70..545b5155f9 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -94,6 +94,9 @@ TESTS_RESULTS_DIR=$(BUILD_DIR)/tests/results ifndef AVOCADO_TESTS AVOCADO_TESTS=tests/avocado endif +ifndef AVOCADO_PARALLEL + AVOCADO_PARALLEL=1 +endif # Controls the output generated by Avocado when running tests. # Any number of command separated loggers are accepted. For more # information please refer to "avocado --help". @@ -141,7 +144,8 @@ check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images --show=$(AVOCADO_SHOW) run --job-results-dir=$(TESTS_RESULTS_DIR) \ $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ --filter-by-tags-include-empty-key) \ - $(AVOCADO_CMDLINE_TAGS) \ + $(AVOCADO_CMDLINE_TAGS) --max-parallel-tasks=$(AVOCADO_PARALLEL) \ + -p timeout_factor=$(AVOCADO_PARALLEL) \ $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado")