From patchwork Tue Aug 6 17:31:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755156 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 8C5E93C08A for ; Tue, 6 Aug 2024 17:32:06 +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=1722965528; cv=none; b=OAUjygeo+orucd9+SAzekFySxhc5V7OGIgfVggx10mfqjhZeIjtQ0XW7yB3I7QFfUCUVF6LOecfuPrM06D2AQWD86ApJh5azBLOAExRxJ00eD5bsYAfz7PpiJ8NT3+1FHc+TvR/FatFztWaZTvYAHL/zb7RkeROmbDMUQSkV3Es= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965528; c=relaxed/simple; bh=3ltEtQnhEUMjlxlHwauDlJLQDZFdwaQXGsQUmfZoUxk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=QzgRuJCIvSfaW6LUK/Jcoe5iqgw5GawcFoxyuLG3NLtR14Iqkq5xgKpcEqzugJxOh151eatlBGAkdwQCQTMBPSFvY7nAWlxX5UdlmruLgAghPT2qj7vrSyF6vVS0TWESa2cMbNx0xIDi56EHQIYeQMBj2a5l+wTnxKy1u3KuZ9g= 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=B2WiUEbN; 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="B2WiUEbN" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965525; 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=3d6XMb3rg8qagy9L556QHcs1su9m4o4U8evvKQPrw1o=; b=B2WiUEbNqyPBJFkCG+rZBdhSY2QXVSXlKgaghgHXlZx69ylkrAP9VOLimUXRVa4ftIvKRG ToK3UMb+PiSB4U9ZmRf0HqEXW5TD+dZI02k2s/bihZc+UafgPejI+sK5KS+w93No46dNIL vBRBL737RrqEa0CSJicr1pHSwJNjev4= 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-78-HCMI_sXsMvKtkbo1ab6cCw-1; Tue, 06 Aug 2024 13:31:58 -0400 X-MC-Unique: HCMI_sXsMvKtkbo1ab6cCw-1 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 71A2E195422B; Tue, 6 Aug 2024 17:31:49 +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 A23AC19560AE; Tue, 6 Aug 2024 17:31:38 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 1/9] Bump avocado to 103.0 Date: Tue, 6 Aug 2024 13:31:11 -0400 Message-ID: <20240806173119.582857-2-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 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. To keep behavior of jobs as close as possible with previous version, this version bump keeps the execution serial (maximum of one task at a time being run). Reference: https://avocado-framework.readthedocs.io/en/103.0/releases/lts/103_0.html Signed-off-by: Cleber Rosa --- pythondeps.toml | 2 +- tests/Makefile.include | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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" } diff --git a/tests/Makefile.include b/tests/Makefile.include index 6618bfed70..537804d101 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -141,7 +141,7 @@ 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=1 \ $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado") From patchwork Tue Aug 6 17:31:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755157 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 CF9AD481B7 for ; Tue, 6 Aug 2024 17:32:13 +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=1722965535; cv=none; b=ht4lHN+TNFiQcgVAci0lN2JCKBpSrLTmTQVcdvsVh9EaopvX1d8si8f0sEEIWgDzjQEa6U0XPmCxwSf8poa9V3caMW1W3oRu1rdk2xR55VJHEn4KzRjLK7ZdFLEPp6Qg86mTqeFJSVMdeh8DqdqXefCUkSiML9AQ9BQ///TRNaw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965535; c=relaxed/simple; bh=H9DpM7EtYX7HeZKPbEoYHYVCDUyFErhc576f86uLpgE=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=e+9cZY4WXtc9IU5EZeypZcsilyWH74YvtkTTfO9HeJvhYQQwrkp7o4LY/m98icFMMuDO33wepkiTPq5njaRuDftOfl2hY2zLp8rUK3+nAqdktyEyPidWAngdQ9mk9URiuWGpihEHepzrEInozIoiTm8n3h9I788/Za7iJwFCd54= 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=cvBcIExn; 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="cvBcIExn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965532; 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=X/GXQbUC+egQPtXlpcMkSOyDnU1wegvQLfhRmhDNQso=; b=cvBcIExnHBO9QaancAk2jTyQH+v1B3Pk2hW8y3sI/X4dw0sYMjeKM7hlI+w4N//nPUuoTo Uv2nOuLz451hZ6FA1XSpsHh/Lb+e0FImK1Xy/n7KkB1i6xZXOeBEPZ91P6UGc6iFvToqLr W2kmq0GWU1Ik+eCg57X+Kb9rOZOBOOc= 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-652-qFtQ_wqSOQOYfMZtDARYNA-1; Tue, 06 Aug 2024 13:32:08 -0400 X-MC-Unique: qFtQ_wqSOQOYfMZtDARYNA-1 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4783E1955BEF; Tue, 6 Aug 2024 17:32:04 +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 E2C8F1956046; Tue, 6 Aug 2024 17:31:49 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 2/9] tests/avocado: apply proper skipUnless decorator Date: Tue, 6 Aug 2024 13:31:12 -0400 Message-ID: <20240806173119.582857-3-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 Commit 9b45cc993 added many cases of skipUnless for the sake of organizing flaky tests. But, Python decorators *must* follow what they decorate, so the newlines added should *not* exist there. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth --- tests/avocado/boot_linux_console.py | 1 - tests/avocado/intel_iommu.py | 1 - tests/avocado/linux_initrd.py | 1 - tests/avocado/machine_aspeed.py | 2 -- tests/avocado/machine_mips_malta.py | 2 -- tests/avocado/machine_rx_gdbsim.py | 2 -- tests/avocado/reverse_debugging.py | 4 ---- tests/avocado/smmu.py | 1 - 8 files changed, 14 deletions(-) diff --git a/tests/avocado/boot_linux_console.py b/tests/avocado/boot_linux_console.py index 2929aa042d..cffdd6b5a2 100644 --- a/tests/avocado/boot_linux_console.py +++ b/tests/avocado/boot_linux_console.py @@ -1522,7 +1522,6 @@ def test_ppc_mac99(self): # like issues with a buggy kernel. As a result we don't want it # gating releases on Gitlab. @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_sh4_r2d(self): """ :avocado: tags=arch:sh4 diff --git a/tests/avocado/intel_iommu.py b/tests/avocado/intel_iommu.py index 008f214397..992583fa7d 100644 --- a/tests/avocado/intel_iommu.py +++ b/tests/avocado/intel_iommu.py @@ -13,7 +13,6 @@ from avocado_qemu.linuxtest import LinuxTest @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - class IntelIOMMU(LinuxTest): """ :avocado: tags=arch:x86_64 diff --git a/tests/avocado/linux_initrd.py b/tests/avocado/linux_initrd.py index aad5b19bd9..7f47b98ae7 100644 --- a/tests/avocado/linux_initrd.py +++ b/tests/avocado/linux_initrd.py @@ -54,7 +54,6 @@ def test_with_2gib_file_should_exit_error_msg_with_linux_v3_6(self): self.assertRegex(self.vm.get_log(), expected_msg) @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_with_2gib_file_should_work_with_linux_v4_16(self): """ :avocado: tags=flaky diff --git a/tests/avocado/machine_aspeed.py b/tests/avocado/machine_aspeed.py index f8e263d37e..c0b01e8f1f 100644 --- a/tests/avocado/machine_aspeed.py +++ b/tests/avocado/machine_aspeed.py @@ -323,7 +323,6 @@ def do_test_aarch64_aspeed_sdk_start(self, image): self.wait_for_console_pattern('Starting kernel ...') @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_arm_ast2500_evb_sdk(self): """ :avocado: tags=arch:arm @@ -343,7 +342,6 @@ def test_arm_ast2500_evb_sdk(self): self.wait_for_console_pattern('nodistro.0 ast2500-default ttyS4') @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_arm_ast2600_evb_sdk(self): """ :avocado: tags=arch:arm diff --git a/tests/avocado/machine_mips_malta.py b/tests/avocado/machine_mips_malta.py index 8cf84bd805..07a80633b5 100644 --- a/tests/avocado/machine_mips_malta.py +++ b/tests/avocado/machine_mips_malta.py @@ -102,7 +102,6 @@ def test_mips_malta_i6400_framebuffer_logo_1core(self): self.do_test_i6400_framebuffer_logo(1) @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_mips_malta_i6400_framebuffer_logo_7cores(self): """ :avocado: tags=arch:mips64el @@ -114,7 +113,6 @@ def test_mips_malta_i6400_framebuffer_logo_7cores(self): self.do_test_i6400_framebuffer_logo(7) @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_mips_malta_i6400_framebuffer_logo_8cores(self): """ :avocado: tags=arch:mips64el diff --git a/tests/avocado/machine_rx_gdbsim.py b/tests/avocado/machine_rx_gdbsim.py index 412a7a5089..72f0296e21 100644 --- a/tests/avocado/machine_rx_gdbsim.py +++ b/tests/avocado/machine_rx_gdbsim.py @@ -23,7 +23,6 @@ class RxGdbSimMachine(QemuSystemTest): KERNEL_COMMON_COMMAND_LINE = 'printk.time=0 ' @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_uboot(self): """ U-Boot and checks that the console is operational. @@ -49,7 +48,6 @@ def test_uboot(self): #exec_command_and_wait_for_pattern(self, 'version', gcc_version) @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_linux_sash(self): """ Boots a Linux kernel and checks that the console is operational. diff --git a/tests/avocado/reverse_debugging.py b/tests/avocado/reverse_debugging.py index 92855a02a5..f24287cd0a 100644 --- a/tests/avocado/reverse_debugging.py +++ b/tests/avocado/reverse_debugging.py @@ -207,7 +207,6 @@ def get_pc(self, g): # unidentified gitlab timeout problem @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_x86_64_pc(self): """ :avocado: tags=arch:x86_64 @@ -225,7 +224,6 @@ class ReverseDebugging_AArch64(ReverseDebugging): # unidentified gitlab timeout problem @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_aarch64_virt(self): """ :avocado: tags=arch:aarch64 @@ -250,7 +248,6 @@ class ReverseDebugging_ppc64(ReverseDebugging): # unidentified gitlab timeout problem @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_ppc64_pseries(self): """ :avocado: tags=arch:ppc64 @@ -265,7 +262,6 @@ def test_ppc64_pseries(self): # See https://gitlab.com/qemu-project/qemu/-/issues/1992 @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - def test_ppc64_powernv(self): """ :avocado: tags=arch:ppc64 diff --git a/tests/avocado/smmu.py b/tests/avocado/smmu.py index aadda71e4b..83fd79e922 100644 --- a/tests/avocado/smmu.py +++ b/tests/avocado/smmu.py @@ -14,7 +14,6 @@ from avocado_qemu.linuxtest import LinuxTest @skipUnless(os.getenv('QEMU_TEST_FLAKY_TESTS'), 'Test is unstable on GitLab') - class SMMU(LinuxTest): """ :avocado: tags=accel:kvm From patchwork Tue Aug 6 17:31:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755158 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 8E07554BD4 for ; Tue, 6 Aug 2024 17:32:22 +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=1722965544; cv=none; b=p0pWNe3u0M/KazEyYxHCwBulct+N4ixT/smC6t33LhniI/znFswyQi/qeHAdeU4A3wB6Uuyl6BmJH/BmwLFg4Tx6tOOHc/WnRTTxd+FHI/Bjg7IiAxKG1rVLrzoYe3YfjINeEAJotoCd2GWmNCE2WE0RTga/EQqQpHnAk2vOaOc= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965544; c=relaxed/simple; bh=ptCjm3ovv7r1KQq7eJlaiU2FhFTHUWJq7lzgmGoKJYU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=WT+9NtPxtWvdjZ7AXJ4gxWX7gUsjXdnGrWNUzPGZIgruEp38YcRu3P2nrLOufC1fGFM9gtwduYbDiFFDGwPH2Io4dNn8fGpXpDDpfKCW7pClscJ1MNEKFUhciHoxcq3nomN2xP6j94nSNjtwRq/WX9D4VDTqpzbeHJwD5Iv0AYY= 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=V3W5UCpl; 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="V3W5UCpl" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965541; 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=nbyiJBKV1667Kt+ZajabFyIsW7lZeMVEfNzrj1/3epM=; b=V3W5UCplgf/h9H1w1kphSOZcPDOofRFqc0GKjKZfbOvqwcI47Yr3e4fUm6qZky5917/Q/s cGbwJR6nitwdfEqoHia9VghP3O+8gmE38n6AfEUZ6SATIl2+LfZXnTcmmMjQNtoJT9nHEq FRY/0nte9hWDX32eCvd0JUlObCt36fQ= 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-553-S8N2O7wLOCCk9w6DrMGlUA-1; Tue, 06 Aug 2024 13:32:18 -0400 X-MC-Unique: S8N2O7wLOCCk9w6DrMGlUA-1 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 E086C1955D53; Tue, 6 Aug 2024 17:32:13 +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 BE04C19560AE; Tue, 6 Aug 2024 17:32:04 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 3/9] tests/avocado: add cdrom permission related tests Date: Tue, 6 Aug 2024 13:31:13 -0400 Message-ID: <20240806173119.582857-4-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 The "media=cdrom" parameter is also used on some Avocado tests as a way to protect files from being written. The tests here bring a more fundamental check that this behavior can be trusted. 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 Tue Aug 6 17:31:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755159 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 1DDF64AEF4 for ; Tue, 6 Aug 2024 17:32:33 +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=1722965555; cv=none; b=EaIJTSKisDAe50qs9Iz/kkTFi7rpGVEmXc4fJglWkhhHV1w7Z0lvoA6plvHMQS6+3JqaUfD3d/gj4FBzEpw5EXLIwOKCuRAg8mSoY1gExdERQQwoHsZ5PUE7412TMOAKDrIO90WTOgzCKpxr9iTwn26uF68XodcTqwn9kOBudBI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965555; c=relaxed/simple; bh=OhzYNbZPzGg77MDx/pheT2uHbetV90+v1AP9GbtrVtI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Z+n8cvckuPR0cfA2wma2IJ+j7D1dVgngMd2+O7RMkaFD4lhna/5T5a0ifb04HvAS7qBiJhvdIxIJqK3ytwC+S/hNicAczXW/VRhJQdwwOaCKNyhWuOR/JoVVYDV108OWkwbf+a0AQzz/+mY9vE2DIqcCP3xNRTQAQxJVfm78hRk= 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=EacumavA; 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="EacumavA" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965553; 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=KL0H1z5/pg3dizYMSsFK6oSLNICej54wUK//KBAoyq8=; b=EacumavArqJQAHHLIAZVw/W0V/2RCdX+a+L73LJ51kTYeLe+amc0sbupXqzMOJ7dsdyc/R qakByiJtJ+Kzc39ist11KgWQ0h/5Qyscyg5jmLxzfpJ1rDTuJRnwZ4/TUXWDQUoznfBdts pLqeD542CC5eJaHL9qQ7RDrUosk3Mws= 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-459-9eWeJM_pNJ6UG27hhqXTPg-1; Tue, 06 Aug 2024 13:32:29 -0400 X-MC-Unique: 9eWeJM_pNJ6UG27hhqXTPg-1 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 76C5C1955BED; Tue, 6 Aug 2024 17:32:26 +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 7B3E21956046; Tue, 6 Aug 2024 17:32:14 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 4/9] tests/avocado: machine aarch64: standardize location and RO access Date: Tue, 6 Aug 2024 13:31:14 -0400 Message-ID: <20240806173119.582857-5-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 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 | 2 +- tests/avocado/machine_aarch64_virt.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index e920bbf08c..756f316ac9 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -129,7 +129,7 @@ def boot_alpine_linux(self, cpu): "-cpu", cpu, "-drive", - f"file={iso_path},format=raw", + f"file={iso_path},media=cdrom,format=raw", ) 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 Tue Aug 6 17:31:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755160 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 9BBCE38DE1 for ; Tue, 6 Aug 2024 17:32:44 +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=1722965566; cv=none; b=XtuPzSN7zUyH4P2GfA3gmvx4Lkuw+ZxmCoGS5gLE4cn1TcsW6quwrSX3mDug3a1P++zF58Uc0TPFoH4bVFTc+3tT/nNk8wNnI26VbUPUJQOMFBok4W3rqjzKft9SdE0l+Pq8Szp1IcZhWxJYRgkrmZWTzGq+8TmUIbFuj2l9mEI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965566; c=relaxed/simple; bh=FsuQNbQBP2SBdeZ94q7ludvQR7YYJ9Xh0f8eZsY4x7U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mYSGcVhSKv+xCdrzNPbMamQo6DYxLHI7k8YdqnBrJCy0me/N6t561oqxsfghg2Xt5RIQRvBbHIYUOqdLtMNz3edb/YKDUnGqimwQ/teyslsBP2wBsVLA/Qnya4A8468gSLj1HTNj9mYn7VuqqObEgZf90hSLHhCH0TLBMMim52g= 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=XATz4wQL; 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="XATz4wQL" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965563; 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=01Mezu2vBS7e/Bbaib7lIYgCl8rkcleLFRElcDYTArc=; b=XATz4wQLgQ8ICgGPDf+/zGd7zuIWWesdIdw1S81ovTCm0ecweuBEYxlOp6AYlBBxsOzCOa d9VGUj+bHqSHTa2OHDPyVebRtffJu+nNMtt/IuKdlw2z21MZqE+lFVsTcAl1rxI8B+T5IO ChRXb2yY73tNOmMcDz3iX2Ykt/YkWn8= 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-294-zxumTil8PJCidnFK9zrJIg-1; Tue, 06 Aug 2024 13:32:40 -0400 X-MC-Unique: zxumTil8PJCidnFK9zrJIg-1 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 4F6CD1955D45; Tue, 6 Aug 2024 17:32:36 +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 C21A419560AE; Tue, 6 Aug 2024 17:32:26 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 5/9] tests/avocado: simplify parameters on fetch_asset with name only Date: Tue, 6 Aug 2024 13:31:15 -0400 Message-ID: <20240806173119.582857-6-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 When an asset has a single location, it's possible to use that URI as the name of the asset. Reference: https://avocado-framework.readthedocs.io/en/103.0/api/utils/avocado.utils.html#avocado.utils.asset.Asset Reference: https://avocado-framework.readthedocs.io/en/103.0/api/test/avocado.html#avocado.Test.fetch_asset Signed-off-by: Cleber Rosa --- tests/avocado/kvm_xen_guest.py | 2 +- tests/avocado/netdev-ethtool.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/avocado/kvm_xen_guest.py b/tests/avocado/kvm_xen_guest.py index f8cb458d5d..b6ee1ff752 100644 --- a/tests/avocado/kvm_xen_guest.py +++ b/tests/avocado/kvm_xen_guest.py @@ -40,7 +40,7 @@ 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=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..7345ded28c 100644 --- a/tests/avocado/netdev-ethtool.py +++ b/tests/avocado/netdev-ethtool.py @@ -27,7 +27,7 @@ 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=url, asset_hash=sha1) def common_test_code(self, netdev, extra_args=None): From patchwork Tue Aug 6 17:31:16 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755161 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 0BD4629CE5 for ; Tue, 6 Aug 2024 17:32: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=1722965581; cv=none; b=kiBkIpPA7nz4QpcUS7rKCPezOImn4NR5/bCkuttrTHLKRc2p1M82nV5+sqDMmT+h3KNANfWbDEiNC6YA7kjE4xlhqOAxOCfN6AOLwdxFnbr1SvQXdVeKda1yhGmlD50EEyDjkhEdI/2Omx9IX6dyA1QkGd0iNHuEllz3NsPVanU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965581; c=relaxed/simple; bh=uOJJXadgsAZq3WmO2qAZQTeIcvR/iwwubszGqZNC0PM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=YA72qxRWXvyH1S6RAK5WUrtxSnMv3b4q2F6Hj6wb8TzkSoKv7HmGrivloW1ynpu1oYAtgFL1lFFnYsMX2LQHPTuoWUpNt9H6UftGkEANg85mMKXIlTouYSoQyWa0YrhrXmIoQR2DUtp4XeMXEObyZjGLxvIp+RUYMgv/CHGLIU0= 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=BBjSPEsE; 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="BBjSPEsE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965579; 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=BBjSPEsEp5W/wmu/sQ3+mREGl0C9S3r45dxWPKI72jUnWA499pjqGkQQBPGEslMdUi6Pxt WWOqSNxbTcWOOeZ5b5Ew8fsrXcOhDU/TMX4oACFim7Rv9HtLV14labUYVh6uImRlgIFLgQ TsyS+ypQGkEQyvVabeRbAfygwkxzTDA= 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 X-MC-Unique: jdUwjjb2PYOdaJpWsbZVsg-1 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) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=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> 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.12 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 Tue Aug 6 17:31:17 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755162 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 E97534D9FE for ; Tue, 6 Aug 2024 17:33:01 +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=1722965583; cv=none; b=eympQ7J6DnUFL0lWWijPkKdYYK5EetlDW5QSANPf2D2X3zSBEW9xpqB4HjCByDb0wz2pxAw7H1M9tYCkF59sxunM+6iHH/4veGtpIiw63f1mGRnxhRkvSoTBHO5vB8gUH/NQqxJX7jLM5jiBpqtfvZq2xmQheY+puvWhVabm5Xw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965583; c=relaxed/simple; bh=k31f73xLdPxzX1A1daff9oOyY3w8/pU4WG8XseWt+ho=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tp6acfDRNAGXDyfDzlNemEea5GN71o3kz3j0oB9wAO76XDFx0U7WGZeQfEizWpZUh+9AuM1TPa3GOwbN8rzWbD7B/igOVtygLi5R/OvUmqUvDsf1HpfMjbQ9aVAhY2TVhe3xV+wSdjtMu7+1cx8y9N8f83nlnsV2UPJTsZe0AFw= 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=iDGoy/k7; 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="iDGoy/k7" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965580; 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=/43rvxiHluDKPSD2ULvPBKTQ4qhQty2OCaQvduh/gz8=; b=iDGoy/k7iKj/XqthrNxrmnAC5lNSK4gQ8qjNaL6titvDoaPDJ/l9mcm+LuXDAECHvE5dFK HUql15dfJ9oCD0MNKQVO+SvJH9tZgen1LXXZk9FY7KQoJz9LEPSRHNjQJSUIhiddQGq5cG TnZH928x2rWxisGDJlrqhGeYizUd5TI= 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-615-PKl5JxhrOmm8bMkomHdUyg-1; Tue, 06 Aug 2024 13:32:59 -0400 X-MC-Unique: PKl5JxhrOmm8bMkomHdUyg-1 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-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0E0DA1955F0D; Tue, 6 Aug 2024 17:32:56 +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 C7EB91956046; Tue, 6 Aug 2024 17:32:46 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 7/9] tests/avocado/tuxrun_baselines.py: use Avocado's zstd support Date: Tue, 6 Aug 2024 13:31:17 -0400 Message-ID: <20240806173119.582857-8-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 This makes use of the avocado.utils.archive support for zstd. In order to not duplicate code, the skip condition uses a private utility from the module which is going to become public in Avocado versions 103.1 LTS (and also in versions >= 107.0). Reference: https://github.com/avocado-framework/avocado/pull/5996 Reference: https://github.com/avocado-framework/avocado/pull/5953 Signed-off-by: Cleber Rosa --- 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 Tue Aug 6 17:31:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755163 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 CCFF24D9FE for ; Tue, 6 Aug 2024 17:33:12 +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=1722965594; cv=none; b=d5A5xDUpAoh8ieFLICBNHTM1yQZ6Y/QDODbHMwJE9IqyRkHHjffOdhMaKtCOY2fquebcp301MvxZDjLu5Om9A9DCIhO+vo3Ri7WK6HnWO8OW0lX7pgZvvUeguepJDA3v81rmFodhMfLfZaxs0N3pXHUoE1HxrXAs9L6GgGiw+jU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965594; c=relaxed/simple; bh=oAVm9bnQV/3odujBQge14xXDV8alMWTy2bW+6t9o4og=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XYxJdQcD4Um8oFB/9TOrJEyPePeAn5cHbMx1mBiFDsNux97a3/wSsn8HO+vtfGsp43HjRLyDZQeJt7hNGGTWEHuQOKUAC9Lv0DSJoWIItvUOqiE5FglN7oEizUI09BxoPYqQo0m9nVVuvra0x015OVW1sP5gvftJ4+/cpMy9qn8= 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=D7htS79C; 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="D7htS79C" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965592; 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=AJ8MtrhXTfXLVW/4fRGaR/9OyloXeKfWbGmEuGEPmm8=; b=D7htS79C4jfD+PxO5wH3v91H3jOhHRqgndCp43T/udmykeqHQDY11DgfCrY+57jQhqbX7D KZwjMEemGX9bcFhIq5Rn0qFzz/W2J4Z6OXH84obfi9PUBbxOX1DXI6akhxM2qsRTHPl8AE hGT9Oi4gcV3sMlpkPKuqtuePpTcYOYg= 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-364-jlnfk0gfN_Os1NWJgBe8QQ-1; Tue, 06 Aug 2024 13:33:08 -0400 X-MC-Unique: jlnfk0gfN_Os1NWJgBe8QQ-1 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-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CD25F1955BF4; Tue, 6 Aug 2024 17:33:05 +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 8527A19560AE; Tue, 6 Aug 2024 17:32:56 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 8/9] tests/avocado/machine_aarch64_sbsaref.py: allow for rw usage of image Date: Tue, 6 Aug 2024 13:31:18 -0400 Message-ID: <20240806173119.582857-9-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 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 snapshot. Signed-off-by: Cleber Rosa Reviewed-by: Philippe Mathieu-Daudé --- tests/avocado/machine_aarch64_sbsaref.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/avocado/machine_aarch64_sbsaref.py b/tests/avocado/machine_aarch64_sbsaref.py index 756f316ac9..f8bf40c192 100644 --- a/tests/avocado/machine_aarch64_sbsaref.py +++ b/tests/avocado/machine_aarch64_sbsaref.py @@ -190,7 +190,7 @@ def boot_openbsd73(self, cpu): "-cpu", cpu, "-drive", - f"file={img_path},format=raw", + f"file={img_path},format=raw,snapshot=on", ) self.vm.launch() From patchwork Tue Aug 6 17:31:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cleber Rosa X-Patchwork-Id: 13755164 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 041D04C62E for ; Tue, 6 Aug 2024 17:33:27 +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=1722965609; cv=none; b=PclMAjDJuEeIFVPIwBp/SVNuc2VcLfoKOJVYUEGGPNgjJldDR9OoeP7HX6F/0Vp3fD46uUQgvx/2/RL0zTDBnrRbb/G9vu9Q/2iTt0j8IqmfLxvsJ5f8Z6lPjEbLxQXobRJ/cbxWdIpdcFApbCi9iJeiI5Zt4UzfilOB+sWZHuA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722965609; c=relaxed/simple; bh=7ut8EEmDneYDyE2hlA6M4OWZSgC94PiThNc6Xyauz2M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=epAar5+aa2EaTyA7kDJqgD3WX3CgZZkt1nmnLyZaC4s1sfVwg4mnTTQsFfiRXUrRt6kmAR2A/xAbuYT9sPEh6BQgPKfl3YNziuJVe+rxFYJma9Sxx1d3Oz2JbiqwyjnCaal5Qtx5le85PNh4fOwn5Df0CxOqsXgb35CB8+RpEzg= 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=TdHNX1PE; 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="TdHNX1PE" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1722965607; 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=nf0S6+2UWAoiK8QJhCNo+DMvi4LJgeUAgWrNmgWlrjc=; b=TdHNX1PEAVq0gxeOzr7g/JzB+uhrkp0i7LnUFNcy8nkMxut0MQCBhl4CeXs+Eb38UGFLrW 1y/Rl5CK6wAv1htku+WRmTVoX3ewVYIbfY1aob5UTEznyHj1Wqjfshfu8JVfV85lHoPsr1 K0c1fZDOAQ65ueQTAqQpE0dLdHayM1g= 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-678-z6V6pmDHM0m4MjOMBls8sg-1; Tue, 06 Aug 2024 13:33:22 -0400 X-MC-Unique: z6V6pmDHM0m4MjOMBls8sg-1 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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A773F1955D42; Tue, 6 Aug 2024 17:33:15 +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 809E819560AE; Tue, 6 Aug 2024 17:33:06 +0000 (UTC) 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_Mathieu-Daud=C3=A9?= , Aurelien Jarno , Sriram Yagnaraman , =?utf-8?q?C=C3=A9dric_L?= =?utf-8?q?e_Goater?= , 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_Benn=C3=A9e?= , Leif Lindholm Subject: [PATCH v2 9/9] Avocado tests: allow for parallel execution of tests Date: Tue, 6 Aug 2024 13:31:19 -0400 Message-ID: <20240806173119.582857-10-crosa@redhat.com> In-Reply-To: <20240806173119.582857-1-crosa@redhat.com> References: <20240806173119.582857-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.12 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 af73d3d64f..97ebc8211f 100644 --- a/docs/devel/testing.rst +++ b/docs/devel/testing.rst @@ -998,6 +998,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 537804d101..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) --max-parallel-tasks=1 \ + $(AVOCADO_CMDLINE_TAGS) --max-parallel-tasks=$(AVOCADO_PARALLEL) \ + -p timeout_factor=$(AVOCADO_PARALLEL) \ $(if $(GITLAB_CI),,--failfast) $(AVOCADO_TESTS), \ "AVOCADO", "tests/avocado")