From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028818; cv=none; d=zohomail.com; s=zohoarc; b=UD4YrMg7SkhBZl2Ja+t6+NDXsf8FU1i84PKLvkAJuOeYarbFozzjFsN9vPlEJK9UPbCT8d1WzOncQVOjU/PSP3ZLCO85LzN8/N9X2kkiWv61p3JmjKP5DMLvP6GW58YMQ8YdI0ArRj0mcUbBv2jisDDqPN4KgI1Q+MVwDWCM2q0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028818; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=j/j25DoaTM+J6e6fMux/TuPMvG0ZzjuZPFWGMca+3EQ=; b=CyhOSyiLxL6q6b+0XoBqYsYqFPs0HfKbMZTIp/DZ5cPlz3ww17NfwKCSZoB86bhAsIwyuvBmONeApzCy67N8fZs4KrJez75FON8rpiiQn3qW/rbEs5TZGz6KvtC2KZRoCcXlIsAP0ZVPaQQlaZiYx29FscHe8IVscZNzIe2erTU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028818901979.8286869194061; Tue, 19 Nov 2024 07:06:58 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnO-0005cX-Le; Tue, 19 Nov 2024 10:05:38 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnL-0005Zt-Fc for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:37 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnJ-0003f5-6G for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:34 -0500 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-68-Vsc4ZZpEP8WWQ39x3jCI3w-1; Tue, 19 Nov 2024 10:05:27 -0500 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 3B0551955EEA; Tue, 19 Nov 2024 15:05:26 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9AFA019560A3; Tue, 19 Nov 2024 15:05:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028731; 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=j/j25DoaTM+J6e6fMux/TuPMvG0ZzjuZPFWGMca+3EQ=; b=cKJD9ugBjO/U6gogtsthkrMlDLkAtYcHYxxBdqR8PsNWtXCfM6139yY8y7316jdIfVVqDe 1CdD4Xh4HkPzAVwpMycDMcYbh+JXPjzt6w83SC7t5gYcGRMLxxE0fgP6l94nXPlSvptbR9 12wrYz/DC1yuU3X5/cbxV7R6hLN0two= X-MC-Unique: Vsc4ZZpEP8WWQ39x3jCI3w-1 X-Mimecast-MFC-AGG-ID: Vsc4ZZpEP8WWQ39x3jCI3w From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 01/15] tests/functional: fix mips64el test to honour workdir Date: Tue, 19 Nov 2024 15:05:05 +0000 Message-ID: <20241119150519.1123365-2-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028820748116600 The missing directory separator resulted in the kernel file being created 1 level higher than expected. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_mips64el_malta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py index 6c6355b131..24ebcdb9c1 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -129,7 +129,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_coun= t): screendump_path =3D os.path.join(self.workdir, 'screendump.pbm') =20 kernel_path_gz =3D self.ASSET_KERNEL_4_7_0.fetch() - kernel_path =3D self.workdir + "vmlinux" + kernel_path =3D self.workdir + "/vmlinux" gzip_uncompress(kernel_path_gz, kernel_path) =20 tuxlogo_path =3D self.ASSET_TUXLOGO.fetch() --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028969; cv=none; d=zohomail.com; s=zohoarc; b=HJVwIPsIlYV8tDqBr5nQ1LkBkNDk9t/uTAzOqeIiO++bbQcuLymXciOMsNTxeClMw47ltVbYp8afmyV1Uuv8XBUODSuZK3baXTyleSZFOaPAI/hVEYHOWa0fx6K12r7a6B0UHdyfhNSeKv9x2LakyW7pxgYPFHWjdkCeVY1Y8T8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028969; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=B2lxy2lq0R8mXsbS7AtbFcVFuswhiZYcx09bEedRGO8=; b=jB53hvCRj07O2Jm+MiwMv2DQcq7HxYqkqRnkLZKbkivY1cgwBUQjaweHcpvSc6VLeziY0RvN9QF18jlSQneEEHEuuCS/j0wh361fJOarsZXEdPRlpjrMtsKAMHju9C0zD0pc94jLEbdvcR2KW2JKENKGR7edwsvAiOU2e9vrdA4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028969003429.0260608773783; Tue, 19 Nov 2024 07:09:29 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnT-0005mA-L0; Tue, 19 Nov 2024 10:05:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnQ-0005jX-Ih for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:40 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnP-0003gA-29 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:40 -0500 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-571-3kP7mMYbMcG23wopYga1fw-1; Tue, 19 Nov 2024 10:05:30 -0500 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 66BA119540F0; Tue, 19 Nov 2024 15:05:29 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CCC5D19560A3; Tue, 19 Nov 2024 15:05:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028738; 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=B2lxy2lq0R8mXsbS7AtbFcVFuswhiZYcx09bEedRGO8=; b=FerL49XCUNlsC0E2NRXt/LR3OuvgCL0VhN/bZXuFVv6Cf92nZV8XGb3e8w/h0yGtyQWABb +hQLDmEDkEZrfFaZTNlBRzN6w/gXGz5NZ4REAhtRODQXtAbSy36IS42G50QTZZ5h3bDXPM uWaJwSAMaiPq4YKfEyz1709fpFDnCYw= X-MC-Unique: 3kP7mMYbMcG23wopYga1fw-1 X-Mimecast-MFC-AGG-ID: 3kP7mMYbMcG23wopYga1fw From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 02/15] tests/functional: automatically clean up scratch files after tests Date: Tue, 19 Nov 2024 15:05:06 +0000 Message-ID: <20241119150519.1123365-3-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028969653116600 The build/tests/functional subdirectories are consuming huge amounts of disk space. Split the location for scratch files into a 'scratch' sub-directory, separate from log files, and delete it upon completion of each test. The new env variable QEMU_TEST_KEEP_SCRATCH can be set to preserve this scratch dir for debugging access if required. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Thomas Huth Tested-by: C=C3=A9dric Le Goater --- docs/devel/testing/functional.rst | 6 ++++++ tests/functional/qemu_test/testcase.py | 14 +++++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index bf6f1bb81e..6b5d0c5b98 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -65,6 +65,12 @@ to the QEMU binary that should be used for the test, for= example:: $ export QEMU_TEST_QEMU_BINARY=3D$PWD/qemu-system-x86_64 $ python3 ../tests/functional/test_file.py =20 +The test framework will automatically purge any scratch files created duri= ng +the tests. If needing to debug a failed test, it is possible to keep these +files around on disk by setting ```QEMU_TEST_KEEP_SCRATCH=3D1``` as an env +variable. Any preserved files will be deleted the next time the test is r= un +without this variable set. + Overview -------- =20 diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index 411978b5ef..b9418e2ac0 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -13,8 +13,9 @@ =20 import logging import os -import subprocess import pycotap +import shutil +import subprocess import sys import unittest import uuid @@ -40,11 +41,12 @@ def setUp(self, bin_prefix): self.assertIsNotNone(self.qemu_bin, 'QEMU_TEST_QEMU_BINARY must be= set') self.arch =3D self.qemu_bin.split('-')[-1] =20 - self.workdir =3D os.path.join(BUILD_DIR, 'tests/functional', self.= arch, - self.id()) + self.outputdir =3D os.path.join(BUILD_DIR, 'tests', 'functional', + self.arch, self.id()) + self.workdir =3D os.path.join(self.outputdir, 'scratch') os.makedirs(self.workdir, exist_ok=3DTrue) =20 - self.logdir =3D self.workdir + self.logdir =3D self.outputdir self.log_filename =3D os.path.join(self.logdir, 'base.log') self.log =3D logging.getLogger('qemu-test') self.log.setLevel(logging.DEBUG) @@ -56,6 +58,8 @@ def setUp(self, bin_prefix): self.log.addHandler(self._log_fh) =20 def tearDown(self): + if "QEMU_TEST_KEEP_SCRATCH" not in os.environ: + shutil.rmtree(self.workdir) self.log.removeHandler(self._log_fh) =20 def main(): @@ -108,7 +112,7 @@ def setUp(self): =20 console_log =3D logging.getLogger('console') console_log.setLevel(logging.DEBUG) - self.console_log_name =3D os.path.join(self.workdir, 'console.log') + self.console_log_name =3D os.path.join(self.logdir, 'console.log') self._console_log_fh =3D logging.FileHandler(self.console_log_name, mode=3D'w') self._console_log_fh.setLevel(logging.DEBUG) --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028797; cv=none; d=zohomail.com; s=zohoarc; b=KJePAq69yFIcfVYgT+GjLivHduXjvS+UDsJTwZ4BMDAEc+SqoW7UeWjyciCaq8Tze0H6d6XimV+BUtjloKTCBDR0lxjspzemVVjXpmXD4L9kFDCh+8fEj4nOJPaOPTnBJIux8GMsUHwrRQoZSkw4qOihpilavwbsbklWxeE3JwA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028797; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=pwD7zt6Qfqt0axaGqco5FEjpqlNdec3LrnP+hi6Hxa8=; b=VOStvOs+fLg0wRQVShnI1HaKGyZNkx4k5ehkCCU2bZH2ZC2TqHRMzI2LdSf5DlSQHyGOu25mapqtu09CfdUp7KZEdgYBbUQcwTqZq0Mq+LZ3WK9rxeqhgGgz5qVl7KxvUlDl0Q18x3b7F/2c7r8ZqER57VgJu5ZUfzqAW0UF3uI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028797891959.2582227578486; Tue, 19 Nov 2024 07:06:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnZ-0005tf-RV; Tue, 19 Nov 2024 10:05:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnT-0005oa-V4 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnS-0003gV-11 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:43 -0500 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-574-SsCgOoOpOHqlViTnxMFJqg-1; Tue, 19 Nov 2024 10:05:34 -0500 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 01EC91955F65; Tue, 19 Nov 2024 15:05:33 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id AA0D519560A3; Tue, 19 Nov 2024 15:05:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028740; 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=pwD7zt6Qfqt0axaGqco5FEjpqlNdec3LrnP+hi6Hxa8=; b=KTdz/UMK9QohPIXhXgS5bxWK0G8cCwHJ4jY47MJW9WigWTARVn7cBw6zWVr9kMviZsSj1D Nh0XPrwNRQqLpuv192IW9TxFq0Jc0evjFCH8+S0sARgbPinY3GPr+cTrlmbcgFTfXjxL59 zaeVtl7We9RW7Ez6PwqfHoxIVJm7h7o= X-MC-Unique: SsCgOoOpOHqlViTnxMFJqg-1 X-Mimecast-MFC-AGG-ID: SsCgOoOpOHqlViTnxMFJqg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 03/15] tests/functional: remove "AVOCADO" from env variable name Date: Tue, 19 Nov 2024 15:05:07 +0000 Message-ID: <20241119150519.1123365-4-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028798690116600 This env variable is a debugging flag to save screendumps in the mips64el malta tests. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_mips64el_malta.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/functional/test_mips64el_malta.py b/tests/functional/tes= t_mips64el_malta.py index 24ebcdb9c1..6d1195d362 100755 --- a/tests/functional/test_mips64el_malta.py +++ b/tests/functional/test_mips64el_malta.py @@ -159,7 +159,7 @@ def do_test_i6400_framebuffer_logo(self, cpu_cores_coun= t): loc =3D np.where(result >=3D match_threshold) tuxlogo_count =3D 0 h, w =3D tuxlogo_bgr.shape[:2] - debug_png =3D os.getenv('AVOCADO_CV2_SCREENDUMP_PNG_PATH') + debug_png =3D os.getenv('QEMU_TEST_CV2_SCREENDUMP_PNG_PATH') for tuxlogo_count, pt in enumerate(zip(*loc[::-1]), start=3D1): logger.debug('found Tux at position (x, y) =3D %s', pt) cv2.rectangle(screendump_bgr, pt, --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028797; cv=none; d=zohomail.com; s=zohoarc; b=ni7cBcVUlMx9bYOdKq1Tkiz8nRIzq6G8QDS6I19YItkv3Iq66ee2ulM44fQenCNC0yX0GQAHytySSg9HxcVe+YAm3yISE0ZFhaBOIZ5Dgod4QCJLzz+yppGlpC79/DNz80o8plq507dGDhQtqXXCZeuK1qkUHIxVNGeSudQ7y5Q= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028797; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=6HjkfIz7V3MLf9hlQGbdwpkUqrMkLTBQZOC3UbcGioc=; b=ih8lqAxH1OZ4WI3D6Ywnn/ShREpu/91/FWpn5lv1Km8z3w/NbguHL6Qjmf10soC4ss4gFFtn4d+44iBfXDFRPNS7rAtqXGWLgeThpDci362pmRHXcWzAGkV7wL6JsUJvqYE7hn1gLnWwVBSjfCitqoTFqFStzPJX0WQ1T0VOJR0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028797593719.890575653252; Tue, 19 Nov 2024 07:06:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnZ-0005te-R8; Tue, 19 Nov 2024 10:05:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnU-0005ob-7P for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:45 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnS-0003gh-R0 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:43 -0500 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-250-ookZ2uu9MQqrrjOjfANXcQ-1; Tue, 19 Nov 2024 10:05:37 -0500 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 E3ABA1953961; Tue, 19 Nov 2024 15:05:35 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 62B4719560A3; Tue, 19 Nov 2024 15:05:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028742; 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=6HjkfIz7V3MLf9hlQGbdwpkUqrMkLTBQZOC3UbcGioc=; b=BzR35QSaHUHV3Enb+xBaS76ZdbCgvS1HVNQIFwSD6XC2y1rMIjUWvNsUEnv2Fu2WzjVfwa KEUjCZy+LnBJ1himjdoB2lSt8jrLLUi2sppmrcHxQYSI+jfztVZZxwGANHpvf3iR5H/eAR fDg+cbmW9aOFxhE6w4EbUFxQSjcDy7E= X-MC-Unique: ookZ2uu9MQqrrjOjfANXcQ-1 X-Mimecast-MFC-AGG-ID: ookZ2uu9MQqrrjOjfANXcQ From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 04/15] tests/functional: remove todo wrt avocado.utils.wait_for Date: Tue, 19 Nov 2024 15:05:08 +0000 Message-ID: <20241119150519.1123365-5-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028798717116600 We're not using avocado anymore, so while the TODO item is still relevant, suggesting use of avocado.utils is not. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_m68k_nextcube.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/functional/test_m68k_nextcube.py b/tests/functional/test= _m68k_nextcube.py index 89385a134a..0124622c40 100755 --- a/tests/functional/test_m68k_nextcube.py +++ b/tests/functional/test_m68k_nextcube.py @@ -37,8 +37,7 @@ def check_bootrom_framebuffer(self, screenshot_path): self.vm.launch() =20 self.log.info('VM launched, waiting for display') - # TODO: Use avocado.utils.wait.wait_for to catch the - # 'displaysurface_create 1120x832' trace-event. + # TODO: wait for the 'displaysurface_create 1120x832' trace-event. time.sleep(2) =20 self.vm.cmd('human-monitor-command', --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028923; cv=none; d=zohomail.com; s=zohoarc; b=mvr8EER4nPUW+atbmqBz6bw/8ga6ITSvTUoPdvvQO6lZ9a+3FBRc/9LdJS3+nI9PkQjEy8IvRrnVTcA+eYb946t6jE4Fahfv05H9EGE7H7AcamVrdKYp5GjItt52hNmkr8MeW+5NEuubZ8ZuaFJqEoSwkK3UuEesETp97RGAxp8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028923; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=czEcijtwICqLMRcliVOE5Hsoj3anBl2/8MHBzdaCxGo=; b=S4/BuQmQh2F1Lcp9rCwiFO5fXHAcWGuNZ4aU8qbsyNPfBqtY99FoErn0b91+xhFrbj7kTDk6E8tbYjbt5lD3lNEGoJhOBRmfg7DByqF7KUrChO7hsOGv1g0NyTg9WsXKp8+jKE7u3IUyXgXI0adw52LhPtT4BSNFsfRS/UzvgQY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 173202892335874.7547995362612; Tue, 19 Nov 2024 07:08:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnj-0005w1-0e; Tue, 19 Nov 2024 10:05:59 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnW-0005q0-98 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnT-0003gr-Ks for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:45 -0500 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-28-HrWIauT8Oz2r6bf7k7wJXw-1; Tue, 19 Nov 2024 10:05:40 -0500 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 A1BBF195608B; Tue, 19 Nov 2024 15:05:39 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 48E3A19560A3; Tue, 19 Nov 2024 15:05:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028742; 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=czEcijtwICqLMRcliVOE5Hsoj3anBl2/8MHBzdaCxGo=; b=ebfIpqaEYV+gjH2WcH5fSC8FfJr87taFLwAuiR2zfbBwuSbW82L5FWTtf0exgvmfhSaoG7 bSnDby7tWLH2vxNYwiVjtq6VDSI5GW/a06iTcbK5/a1GvF4F2V+IA1WfzSNmnf5t09mVRs enMdNym/gCy7bSmpgBuTz9suDlFjyFs= X-MC-Unique: HrWIauT8Oz2r6bf7k7wJXw-1 X-Mimecast-MFC-AGG-ID: HrWIauT8Oz2r6bf7k7wJXw From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 05/15] tests/functional: remove leftover :avocado: tags Date: Tue, 19 Nov 2024 15:05:09 +0000 Message-ID: <20241119150519.1123365-6-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028925560116600 These tags are not honoured under the new functional test harness. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_arm_bpim2u.py | 20 -------------------- tests/functional/test_arm_orangepi.py | 27 --------------------------- 2 files changed, 47 deletions(-) diff --git a/tests/functional/test_arm_bpim2u.py b/tests/functional/test_ar= m_bpim2u.py index 2f9fa145e3..35ea58d46c 100755 --- a/tests/functional/test_arm_bpim2u.py +++ b/tests/functional/test_arm_bpim2u.py @@ -37,11 +37,6 @@ class BananaPiMachine(LinuxKernelTest): '5b41b4e11423e562c6011640f9a7cd3bdd0a3d42b83430f7caa70a432e6cd82c') =20 def test_arm_bpim2u(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:bpim2u - :avocado: tags=3Daccel:tcg - """ self.set_machine('bpim2u') deb_path =3D self.ASSET_DEB.fetch() kernel_path =3D self.extract_from_deb(deb_path, @@ -64,11 +59,6 @@ def test_arm_bpim2u(self): os.remove(dtb_path) =20 def test_arm_bpim2u_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Daccel:tcg - :avocado: tags=3Dmachine:bpim2u - """ self.set_machine('bpim2u') deb_path =3D self.ASSET_DEB.fetch() kernel_path =3D self.extract_from_deb(deb_path, @@ -105,11 +95,6 @@ def test_arm_bpim2u_initrd(self): os.remove(initrd_path) =20 def test_arm_bpim2u_gmac(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:bpim2u - :avocado: tags=3Ddevice:sd - """ self.set_machine('bpim2u') self.require_netdev('user') =20 @@ -160,11 +145,6 @@ def test_arm_bpim2u_gmac(self): =20 @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limit= ed') def test_arm_bpim2u_openwrt_22_03_3(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:bpim2u - :avocado: tags=3Ddevice:sd - """ self.set_machine('bpim2u') # This test download a 8.9 MiB compressed image and expand it # to 127 MiB. diff --git a/tests/functional/test_arm_orangepi.py b/tests/functional/test_= arm_orangepi.py index d2ed5fcc82..6d57223a03 100755 --- a/tests/functional/test_arm_orangepi.py +++ b/tests/functional/test_arm_orangepi.py @@ -49,11 +49,6 @@ class BananaPiMachine(LinuxKernelTest): '20d3e07dc057e15c12452620e90ecab2047f0f7940d9cba8182ebc795927177f') =20 def test_arm_orangepi(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:orangepi-pc - :avocado: tags=3Daccel:tcg - """ self.set_machine('orangepi-pc') deb_path =3D self.ASSET_DEB.fetch() kernel_path =3D self.extract_from_deb(deb_path, @@ -75,11 +70,6 @@ def test_arm_orangepi(self): os.remove(dtb_path) =20 def test_arm_orangepi_initrd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Daccel:tcg - :avocado: tags=3Dmachine:orangepi-pc - """ self.set_machine('orangepi-pc') deb_path =3D self.ASSET_DEB.fetch() kernel_path =3D self.extract_from_deb(deb_path, @@ -115,12 +105,6 @@ def test_arm_orangepi_initrd(self): os.remove(initrd_path) =20 def test_arm_orangepi_sd(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Daccel:tcg - :avocado: tags=3Dmachine:orangepi-pc - :avocado: tags=3Ddevice:sd - """ self.set_machine('orangepi-pc') self.require_netdev('user') deb_path =3D self.ASSET_DEB.fetch() @@ -167,11 +151,6 @@ def test_arm_orangepi_sd(self): =20 @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limit= ed') def test_arm_orangepi_armbian(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:orangepi-pc - :avocado: tags=3Ddevice:sd - """ self.set_machine('orangepi-pc') # This test download a 275 MiB compressed image and expand it # to 1036 MiB, but the underlying filesystem is 1552 MiB... @@ -208,12 +187,6 @@ def test_arm_orangepi_armbian(self): =20 @skipUnless(os.getenv('QEMU_TEST_ALLOW_LARGE_STORAGE'), 'storage limit= ed') def test_arm_orangepi_uboot_netbsd9(self): - """ - :avocado: tags=3Darch:arm - :avocado: tags=3Dmachine:orangepi-pc - :avocado: tags=3Ddevice:sd - :avocado: tags=3Dos:netbsd - """ self.set_machine('orangepi-pc') # This test download a 304MB compressed image and expand it to 2GB deb_path =3D self.ASSET_UBOOT.fetch() --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028848; cv=none; d=zohomail.com; s=zohoarc; b=UhWQRuQMiXl4Cup5LwBt4Pw3FqkRTQWqGJFKgGCpuNMBTxot9PLUmwKunhZCtbtQ3PQFH1exX2ZI7CGDywR5+x9NUrzFuq2TaRFv3gVPC68elm0Ed0TOO86/yZF7/Nb8qgYzGnWxPSKzCkch8ZxWpNH74nWmHUZVQxgc4GKVOvw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028848; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r8gyOHf35XX4TDNvnuZNUVMGe/idCR5wEtsU5xYTmH4=; b=SAQcIMR5lGGOFs6/2epU6+lU+ocN/EweHknSTWf3uvZGySSP4uN01dO4j4DVdbuGSuz0UXbzS8ACbI9A6NFqJVWKA1ZcJ4h8To4MBNIWLWVqhyc7/LxfH4dD2kccaWT9sZzGIKAzGs9vYbyXDf6AD5rIyVD4RkpSiAjezp/XP8Q= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028848792372.6933033717934; Tue, 19 Nov 2024 07:07:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnk-0005xl-9o; Tue, 19 Nov 2024 10:06:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnb-0005uP-0q for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:51 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnZ-0003jT-CU for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:50 -0500 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-590-694sOc_hPpW7vcLUNAUmew-1; Tue, 19 Nov 2024 10:05:44 -0500 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 9AB041953958; Tue, 19 Nov 2024 15:05:42 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4346B19560A3; Tue, 19 Nov 2024 15:05:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028748; 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=r8gyOHf35XX4TDNvnuZNUVMGe/idCR5wEtsU5xYTmH4=; b=R+eXmp3gtAYDQ6kpmnq+6nF7CFBX3NdqOxUII3kzhLY/cXXkQABxWqQTB1RBYh7dCSpdM4 rwumMxSIqMYPqYzxzgGEyNaPB3JrYtoiAaJsv643mJJuZzYOGGejOkyWa/WGP504Fowi6u 5TKNrLTFxxNGWLHyth3qW1enu4+Iqdk= X-MC-Unique: 694sOc_hPpW7vcLUNAUmew-1 X-Mimecast-MFC-AGG-ID: 694sOc_hPpW7vcLUNAUmew From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 06/15] tests/functional: remove obsolete reference to avocado bug Date: Tue, 19 Nov 2024 15:05:10 +0000 Message-ID: <20241119150519.1123365-7-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028850958116600 Historical bugs in avocado related to zstd support are not relevant to the code now that it uses QEMU's native test harness. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/tuxruntest.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index f05aa96ad7..ed2b238c92 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -39,7 +39,6 @@ def setUp(self): super().setUp() =20 # We need zstd for all the tuxrun tests - # See https://github.com/avocado-framework/avocado/issues/5609 (has_zstd, msg) =3D has_cmd('zstd') if has_zstd is False: self.skipTest(msg) --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028842; cv=none; d=zohomail.com; s=zohoarc; b=GNkTwpPXY3X8syE1dyaeVSoLtfiuJQbkxTX4Fpo601FbtKsKmEetwh5mHBuxWcaPj/IzZ7oxyEjp9b1aa2kCjrvWqU2z+cc4OC/04vWTWHX94l7tY/BwO64NWvYe+bmS2NnZ5m6KAXmkUx4AGF5UnJMSDFi3eAxo8RSgTEPWYsc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028842; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=AUtOvveI7gUeR2LCjTghP3TZKhcZjB6bpwPCLc7Ab+U=; b=QiatK5Ix3xBsDXG1cW1Rtbc885wXZqbWkwP55f6a/1sZxwrO1nQ+19mudG9MftXUZQs4MubRbfaB/v4QvsQj1aqQx4+ewpMieQFm5jYenrC74HPyKXp1cL2K5a1t3itmQ3MQLlnvNrsrZL8SXdVG+/bRdq0aqIdmQ9MH29fFS0Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028842220876.2077139500221; Tue, 19 Nov 2024 07:07:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnk-0005y2-LW; Tue, 19 Nov 2024 10:06:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnd-0005vR-Im for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnb-0003jQ-2G for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:52 -0500 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-13-1ryhJsNNN-2TDGFYT3gVJg-1; Tue, 19 Nov 2024 10:05:46 -0500 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 985C31955F3C; Tue, 19 Nov 2024 15:05:45 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3616619560A3; Tue, 19 Nov 2024 15:05:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028748; 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=AUtOvveI7gUeR2LCjTghP3TZKhcZjB6bpwPCLc7Ab+U=; b=Jf4hn6XLYmqIc77e8sbjJY0KS0LcaAlNf9sU6aeE/M5tT0ZqDP70lTn2LyT/HVqPNZlQVS TPeZL1hiNYz722zuAn5GCX6btYefHpsQo4VipuvUfX7LlKXJVZZ1jfU1trtumFGQxc3KaN 5/OAwIc094oQyVIzJo7MCirhDFJlK8o= X-MC-Unique: 1ryhJsNNN-2TDGFYT3gVJg-1 X-Mimecast-MFC-AGG-ID: 1ryhJsNNN-2TDGFYT3gVJg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 07/15] tests/functional: remove comments talking about avocado Date: Tue, 19 Nov 2024 15:05:11 +0000 Message-ID: <20241119150519.1123365-8-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028843285116600 The first comment is still relevant but should talk about our own test harness instead. The second comment adds no value over reading the code and can be removed. Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_acpi_bits.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acp= i_bits.py index ee40647d5b..6a7758c576 100755 --- a/tests/functional/test_acpi_bits.py +++ b/tests/functional/test_acpi_bits.py @@ -196,11 +196,11 @@ def copy_test_scripts(self): for filename in os.listdir(bits_test_dir): if os.path.isfile(os.path.join(bits_test_dir, filename)) and \ filename.endswith('.py2'): - # all test scripts are named with extension .py2 so that - # avocado does not try to load them. These scripts are - # written for python 2.7 not python 3 and hence if avocado - # loaded them, it would complain about python 3 specific - # syntaxes. + # all test scripts are named with extension .py2 so that o= ur + # test harness does not try to load them. These scripts are + # written for python 2.7 not python 3 and hence if our test + # harness loaded them, it would complain about python 3 + # specific syntaxes. newfilename =3D os.path.splitext(filename)[0] + '.py' shutil.copy2(os.path.join(bits_test_dir, filename), os.path.join(target_test_dir, newfilename)) @@ -399,8 +399,6 @@ def test_acpi_smbios_bits(self): =20 # biosbits has been configured to run all the specified test suites # in batch mode and then automatically initiate a vm shutdown. - # Set timeout to BITS_TIMEOUT for SHUTDOWN event from bits VM at p= ar - # with the avocado test timeout. self._vm.event_wait('SHUTDOWN', timeout=3DBITS_TIMEOUT) self._vm.wait(timeout=3DNone) self.logger.debug("Checking console output ...") --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028894; cv=none; d=zohomail.com; s=zohoarc; b=DzpaxChHtwAyK1i1FX+i9ZDsbBlMnp4RMdB4qvd7IgAnULlsrSMJKn/jYw46jVrnolrPMZ5mXyKBG9Q/+gpk8c1tnYuCQjNPi/kiQ+pUdhZuOhUVtlj4W3xbJr+v9s47Him4w7LSGxhvEVOHsm9+Lh9gS1I1eNQBYx2j5wf4Muc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028894; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mpQSBVmEKA0YchuFKMeQpzWQy9TzwDXdTqUn1SW8rgM=; b=RkSF0ge43X/IWV3WghLB0+rt954YPD/xEnc7XWajXp6jW6Jc+6pxBG42dOBEkTVBCa+zetwA5X1zqgd1qqE2U5ZumRypQgzWfNc7ZUnkg3mViNd2wAX00SAiVL1/v9zgZ8iWh371JyPhDTdHxmLw+1oTbQjB8CfwaR1i1Sh9Xh4= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028894803312.90319454222515; Tue, 19 Nov 2024 07:08:14 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnn-00060n-6V; Tue, 19 Nov 2024 10:06:03 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnf-0005vz-IL for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnd-0003k4-CD for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:54 -0500 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-76-M98W3FevOE2abGHUGtWi_g-1; Tue, 19 Nov 2024 10:05:49 -0500 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 9A2511955F3C; Tue, 19 Nov 2024 15:05:48 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3295A19560A3; Tue, 19 Nov 2024 15:05:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028752; 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=mpQSBVmEKA0YchuFKMeQpzWQy9TzwDXdTqUn1SW8rgM=; b=Jz+leoN6vGhOAPZ+HWc35VxSK943ZTLu3+cAgDzrTOTIoZciVof36iUvaWjpuphIKCyXoT pWmBm5Kh3Ao4hYZfY7VtCv04LJpJNPjAB3NI4z7xYN3R04txLIA6VweDYC9YgeuEcinTmW BtT369wjxLpF5AAVAtcG6H6Rvu2eijQ= X-MC-Unique: M98W3FevOE2abGHUGtWi_g-1 X-Mimecast-MFC-AGG-ID: M98W3FevOE2abGHUGtWi_g From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 08/15] tests/functional: honour self.workdir in ACPI bits tests Date: Tue, 19 Nov 2024 15:05:12 +0000 Message-ID: <20241119150519.1123365-9-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028895540116600 The ACPI bits test sets up its own private temporary directory into it creates scratch files. This is justified by a suggestion that we need to be able to preserve the scratch files. We have the ability to preserve the scratch dir with our functional harness, so there's no reason to diverge from standard practice in file placement. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: C=C3=A9dric Le Goater --- tests/functional/test_acpi_bits.py | 44 +++++++++--------------------- 1 file changed, 13 insertions(+), 31 deletions(-) diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acp= i_bits.py index 6a7758c576..8774a79312 100755 --- a/tests/functional/test_acpi_bits.py +++ b/tests/functional/test_acpi_bits.py @@ -150,7 +150,6 @@ class AcpiBitsTest(QemuBaseTest): #pylint: disable=3Dto= o-many-instance-attributes def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._vm =3D None - self._workDir =3D None self._baseDir =3D None =20 self._debugcon_addr =3D '0x403' @@ -169,7 +168,7 @@ def copy_bits_config(self): config_file =3D 'bits-cfg.txt' bits_config_dir =3D os.path.join(self._baseDir, 'acpi-bits', 'bits-config') - target_config_dir =3D os.path.join(self._workDir, + target_config_dir =3D os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER, 'boot') self.assertTrue(os.path.exists(bits_config_dir)) @@ -186,7 +185,7 @@ def copy_test_scripts(self): =20 bits_test_dir =3D os.path.join(self._baseDir, 'acpi-bits', 'bits-tests') - target_test_dir =3D os.path.join(self._workDir, + target_test_dir =3D os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER, 'boot', 'python') =20 @@ -224,8 +223,8 @@ def fix_mkrescue(self, mkrescue): the directory where we have extracted our pre-built bits grub tarball. """ - grub_x86_64_mods =3D os.path.join(self._workDir, 'grub-inst-x86_64= -efi') - grub_i386_mods =3D os.path.join(self._workDir, 'grub-inst') + grub_x86_64_mods =3D os.path.join(self.workdir, 'grub-inst-x86_64-= efi') + grub_i386_mods =3D os.path.join(self.workdir, 'grub-inst') =20 self.assertTrue(os.path.exists(grub_x86_64_mods)) self.assertTrue(os.path.exists(grub_i386_mods)) @@ -246,11 +245,11 @@ def generate_bits_iso(self): """ Uses grub-mkrescue to generate a fresh bits iso with the python test scripts """ - bits_dir =3D os.path.join(self._workDir, + bits_dir =3D os.path.join(self.workdir, 'bits-%d' %self.BITS_INTERNAL_VER) - iso_file =3D os.path.join(self._workDir, + iso_file =3D os.path.join(self.workdir, 'bits-%d.iso' %self.BITS_INTERNAL_VER) - mkrescue_script =3D os.path.join(self._workDir, + mkrescue_script =3D os.path.join(self.workdir, 'grub-inst-x86_64-efi', 'bin', 'grub-mkrescue') =20 @@ -289,17 +288,7 @@ def setUp(self): # pylint: disable=3Darguments-differ =20 self._baseDir =3D Path(__file__).parent =20 - # workdir could also be avocado's own workdir in self.workdir. - # At present, I prefer to maintain my own temporary working - # directory. It gives us more control over the generated bits - # log files and also for debugging, we may chose not to remove - # this working directory so that the logs and iso can be - # inspected manually and archived if needed. - self._workDir =3D tempfile.mkdtemp(prefix=3D'acpi-bits-', - suffix=3D'.tmp') - self.logger.info('working dir: %s', self._workDir) - - prebuiltDir =3D os.path.join(self._workDir, 'prebuilt') + prebuiltDir =3D os.path.join(self.workdir, 'prebuilt') if not os.path.isdir(prebuiltDir): os.mkdir(prebuiltDir, mode=3D0o775) =20 @@ -320,10 +309,10 @@ def setUp(self): # pylint: disable=3Darguments-differ =20 # extract the bits software in the temp working directory with zipfile.ZipFile(bits_zip_file, 'r') as zref: - zref.extractall(self._workDir) + zref.extractall(self.workdir) =20 with tarfile.open(grub_tar_file, 'r', encoding=3D'utf-8') as tarba= ll: - tarball.extractall(self._workDir) + tarball.extractall(self.workdir) =20 self.copy_test_scripts() self.copy_bits_config() @@ -333,7 +322,7 @@ def parse_log(self): """parse the log generated by running bits tests and check for failures. """ - debugconf =3D os.path.join(self._workDir, self._debugcon_log) + debugconf =3D os.path.join(self.workdir, self._debugcon_log) log =3D "" with open(debugconf, 'r', encoding=3D'utf-8') as filehandle: log =3D filehandle.read() @@ -359,25 +348,18 @@ def tearDown(self): """ if self._vm: self.assertFalse(not self._vm.is_running) - if not os.getenv('BITS_DEBUG') and self._workDir: - self.logger.info('removing the work directory %s', self._workD= ir) - shutil.rmtree(self._workDir) - else: - self.logger.info('not removing the work directory %s ' \ - 'as BITS_DEBUG is ' \ - 'passed in the environment', self._workDir) super().tearDown() =20 def test_acpi_smbios_bits(self): """The main test case implementation.""" =20 - iso_file =3D os.path.join(self._workDir, + iso_file =3D os.path.join(self.workdir, 'bits-%d.iso' %self.BITS_INTERNAL_VER) =20 self.assertTrue(os.access(iso_file, os.R_OK)) =20 self._vm =3D QEMUBitsMachine(binary=3Dself.qemu_bin, - base_temp_dir=3Dself._workDir, + base_temp_dir=3Dself.workdir, debugcon_log=3Dself._debugcon_log, debugcon_addr=3Dself._debugcon_addr) =20 --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028819; cv=none; d=zohomail.com; s=zohoarc; b=S92OuzLWQY3aUtqyInnT1FmfS7mwWbsOWqj6OcZv1qZylFRD6Zalo6QBSWDdtbULEjpO3WMvIkBFQ2sHTmRL/xQDPs9FSQ3JFERyia6IDymRv+inTi6ZwSdtNTDb6pcO/d+IKODnCzZtYLnx3gd2LeIZgMiZTASKxLf30dxzq9w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028819; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XaS7GUK8sXCJ8HP7DkXCnL6nTd/dINj5NE01cgoOXj8=; b=Ed9QDC4Yd0ygV5tusldRZwopS5S9vf00dNaAfXLh/b/4yEd9QYsgi+mVlCbBWxpZRwbaeAnUpMDyEY0yF6b7/PVyLk+gDrrmaZhfJ1tu1hnJpgEK4YjKDZy4ppjKRrcFWJC5kTmYSTtez11AnlSvOAif1OuBmXBufN6IICrg1Ek= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028819500531.1210766930383; Tue, 19 Nov 2024 07:06:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnk-0005zE-RU; Tue, 19 Nov 2024 10:06:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnh-0005wn-Vj for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:59 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnf-0003kJ-Be for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:05:57 -0500 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-50-3-PvyaLBNraX5yDVSNicgg-1; Tue, 19 Nov 2024 10:05:52 -0500 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 2EC281955F77; Tue, 19 Nov 2024 15:05:51 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1170919560A3; Tue, 19 Nov 2024 15:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028754; 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=XaS7GUK8sXCJ8HP7DkXCnL6nTd/dINj5NE01cgoOXj8=; b=RhF0nYh2aUO8O7O1IyLfUTqKmRYs44RUWlMuOftNHDgUmk0a2pQBLyBg/BeQFMXZ7Yi8Hk SJe/W9V8/TyO3ExPc97uitgdCYtHey74NXlAKExGL/E3B6vTWw9YDGssLhUtqSlIUvWIw2 TkjWFvSzQrNMvZen64j/GknxMIfOKYo= X-MC-Unique: 3-PvyaLBNraX5yDVSNicgg-1 X-Mimecast-MFC-AGG-ID: 3-PvyaLBNraX5yDVSNicgg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 09/15] tests/functional: put QEMUMachine logs in testcase log directory Date: Tue, 19 Nov 2024 15:05:13 +0000 Message-ID: <20241119150519.1123365-10-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028820761116600 We are not passing the 'log_dir' parameter to QEMUMachine, so the QEMU stdout/err logs are being placed in a temp directory and thus deleted after execution. This makes them inaccessible as gitlab CI artifacts. Pass the testcase log directory path into QEMUMachine to make the logs persistent. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Alex Benn=C3=A9e Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/testcase.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index b9418e2ac0..ca13af244b 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -163,10 +163,11 @@ def require_device(self, devicename): self.skipTest('no support for device ' + devicename) =20 def _new_vm(self, name, *args): - vm =3D QEMUMachine(self.qemu_bin, base_temp_dir=3Dself.workdir) + vm =3D QEMUMachine(self.qemu_bin, + base_temp_dir=3Dself.workdir, + log_dir=3Dself.logdir) self.log.debug('QEMUMachine "%s" created', name) self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) - self.log.debug('QEMUMachine "%s" log_dir: %s', name, vm.log_dir) if args: vm.add_args(*args) return vm --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028822; cv=none; d=zohomail.com; s=zohoarc; b=XbOQkhn2NS5xRJc1isVk2RSv/rcI3W2naZlm6TCJmRVBzOKNfhYDjAqmz1umTSFKBAd3Iz8CO0TrkhHZAWCybDVxZPAcuiggk34cwgqDchehF4a3aK8Nr2iv48CxVKkcz1MxN5oxYCfYZsDGrEbdTFCg/j2AUsm49j1o0801ALE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028822; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=QhmGAjq7xA6aE9VhKSkdKosyPITClYRJAPhCSIpmkvc=; b=jmPPK0B59J8JrpHB90P2HsQ9s0BzuLZeetp/psENkZEAcqSgnBxo2all2ixXgANMQzGWU+Dz7WmHv69A+K5Y6JO14aK5f5Ov+i5jld0rg/Anz1B7AJXSCcSZqc8VzezhIzksjjK/kgA5A3CryB/Ein5unyk9EXzHBg77yfcNPh0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028821994892.8925579449636; Tue, 19 Nov 2024 07:07:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnt-00063X-Jg; Tue, 19 Nov 2024 10:06:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnk-0005y5-DR for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnj-0003kz-00 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:00 -0500 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-205-J9Z5YT6qMxCRY6FOTRDlDw-1; Tue, 19 Nov 2024 10:05:55 -0500 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 F26CF1955F28; Tue, 19 Nov 2024 15:05:53 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 986B8195DF81; Tue, 19 Nov 2024 15:05:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028758; 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=QhmGAjq7xA6aE9VhKSkdKosyPITClYRJAPhCSIpmkvc=; b=F3KYuLKiw0JyWm3INoHQ9WiLQfZwg2olD2n8vFGZWgNZfFIE8RfUZWuujdnOI3NAfl5pRz HSLlLUBZDiSQQ9gWeD5SaBPk890qor9bdVcdpZ0bp1LlHd+u/cNn84HQuMHNPTXrqC85pt KzHEZoOM8AnDWIfGg9pw92/npojkJVA= X-MC-Unique: J9Z5YT6qMxCRY6FOTRDlDw-1 X-Mimecast-MFC-AGG-ID: J9Z5YT6qMxCRY6FOTRDlDw From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 10/15] tests/functional: honour requested test VM name in QEMUMachine Date: Tue, 19 Nov 2024 15:05:14 +0000 Message-ID: <20241119150519.1123365-11-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028822777116600 The functional test case class is going to the trouble of passing around a machine name, but then fails to give this QEMUMachine. As a result, QEMUMachine will create a completely random name. Since log file names match the machine name, this results in log files accumulating over time. Signed-off-by: Daniel P. Berrang=C3=A9 Reviewed-by: Thomas Huth Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/testcase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index ca13af244b..f9c9de1166 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -164,6 +164,7 @@ def require_device(self, devicename): =20 def _new_vm(self, name, *args): vm =3D QEMUMachine(self.qemu_bin, + name=3Dname, base_temp_dir=3Dself.workdir, log_dir=3Dself.logdir) self.log.debug('QEMUMachine "%s" created', name) --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028801; cv=none; d=zohomail.com; s=zohoarc; b=YrzlxMDwlzYsakBzz3CM4Wp4Lancn/MqKQcuMTkAg+e/TErLVyh158YbAhIo8RjPB0r+lkEFQF1eDMTo2L/DmO+ZmUxNGbok+jzGf2y/80oBxCruyyhxcAHbtfjWKTKF//2RUitBG46UXOWKJvghzl72B1UrHOt1L2g83UizfHU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028801; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=b3bnf/d7EYfagDOr5UpwDoE5L1tCx8rcLqyVOHlEUCE=; b=R8VqsNhOipWrqVMf9ORlUEqBnDHQ88L9b67WQ92euvZvsmltoGUKj58d1NVxEtdXH7mfQ35BOYjg/vc6APpyOhrU2CWPdi8cZxXPqUJxRDqdK95IhfGR6Cg6wbChIG3vR0ktYmrtTz4EUD7Ws2ccHJPxkxBNNe04V61uv+YZkIA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028801818432.0094254910391; Tue, 19 Nov 2024 07:06:41 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPns-00063I-MU; Tue, 19 Nov 2024 10:06:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnn-00061h-RN for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:03 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnm-0003lQ-5D for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:03 -0500 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-359-C2X3rZU-Pn2Ox5gADyN5lg-1; Tue, 19 Nov 2024 10:05:57 -0500 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 AAFDA1956048; Tue, 19 Nov 2024 15:05:56 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6DB1919560A3; Tue, 19 Nov 2024 15:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028761; 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=b3bnf/d7EYfagDOr5UpwDoE5L1tCx8rcLqyVOHlEUCE=; b=KkWk4yIsUQLA/A+4xqE8izRh1IdIGDV1uJ0I2Uykfbkcg6onNUrPws8lNjlVsFYPFHozjp 2Kk5EB/+one+fOKntNgfqprnIydBc/zopwyeUU6DoHkIBrEyqEPvro/Tiu3UXpPLWHHo7P Lhpr6WB8Dwc/HzAtZqtV3FeUT8mAc2s= X-MC-Unique: C2X3rZU-Pn2Ox5gADyN5lg-1 X-Mimecast-MFC-AGG-ID: C2X3rZU-Pn2Ox5gADyN5lg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 11/15] tests/functional: enable debug logging for QEMUMachine Date: Tue, 19 Nov 2024 15:05:15 +0000 Message-ID: <20241119150519.1123365-12-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028802676116600 Set the 'qemu.machine' logger to 'DEBUG' level, to ensure we see log messages related to the QEMUMachine class. Most importantly this ensures we capture the full QEMU command line args for instances we spawn. Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater Tested-by: Thomas Huth --- tests/functional/qemu_test/testcase.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index f9c9de1166..e2a329c3e5 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -57,9 +57,15 @@ def setUp(self, bin_prefix): self._log_fh.setFormatter(fileFormatter) self.log.addHandler(self._log_fh) =20 + # Capture QEMUMachine logging + self.machinelog =3D logging.getLogger('qemu.machine') + self.machinelog.setLevel(logging.DEBUG) + self.machinelog.addHandler(self._log_fh) + def tearDown(self): if "QEMU_TEST_KEEP_SCRATCH" not in os.environ: shutil.rmtree(self.workdir) + self.machinelog.removeHandler(self._log_fh) self.log.removeHandler(self._log_fh) =20 def main(): --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028797; cv=none; d=zohomail.com; s=zohoarc; b=ivKxQ0YQE7+waDNPk1SFNVMlFOn4BZhwKTklhW/6WVJGwKgxDPc8w4PFiuJSGLELfshk7hdH5liHzhzTihoMNnB7Kec9E2jac4RDgfx7HPRVgiozSxcxHRtwY4T2nIxEDSWXJatjAiwEwH4rorADsjn9eLX6ahmBMYqjwMmSy1o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028797; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NJUqyymzZQUJt6kRsoTQv97AbYNENtIL2gFOiQGCZbw=; b=inGHmMfJ94D8kXq02fv4IfnScy9H8CKukx1qjwWh6k/JrPcZEKvu0vsoyVzqp1UHPa9pmsVN+DqiGQdlmlf3pMqNRfv/glSkKwaZx0+2i8rE1KLXObjdamnr95R2SITQTxV/3eAzqByu3yej1vJ9okaFfoEvQ73QqTyZEdnjgSE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028797788894.9634629744255; Tue, 19 Nov 2024 07:06:37 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPnv-00063b-Ux; Tue, 19 Nov 2024 10:06:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPns-000638-BJ for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnq-0003lv-Vk for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:08 -0500 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-691-SHbFSzlrMXWw5YzrzFkoWw-1; Tue, 19 Nov 2024 10:06:00 -0500 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 A459519560AD; Tue, 19 Nov 2024 15:05:59 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2A5E719560A3; Tue, 19 Nov 2024 15:05:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028766; 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=NJUqyymzZQUJt6kRsoTQv97AbYNENtIL2gFOiQGCZbw=; b=e/ijgcz3dOQDqmXksNo3IgOe1oEPpbu9jskHd4rmVEzNLKCaASu9m8+9cJB6rvL6uqIOQL zS4wWCNqSW0h7wcI0Fe1NINwt0JM55XiMl2OiYBRJF39XnnyeNhjt8JQJxvKls5SCPdoU9 z96gXXh/oMP0vDCFVhSpkozZCFMdOnc= X-MC-Unique: SHbFSzlrMXWw5YzrzFkoWw-1 X-Mimecast-MFC-AGG-ID: SHbFSzlrMXWw5YzrzFkoWw From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 12/15] tests/functional: logs details of console interaction operations Date: Tue, 19 Nov 2024 15:05:16 +0000 Message-ID: <20241119150519.1123365-13-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028798722116600 When functional tests go wrong, it will often be related to the console interaction wait state. By logging the messages that we're looking for, and data we're about to be sending, it'll be easier to diagnose where tests are getting stuck. Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/cmd.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index cbabb1ceed..76a48064cd 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -85,6 +85,8 @@ def _console_interaction(test, success_message, failure_m= essage, vm =3D test.vm console =3D vm.console_file console_logger =3D logging.getLogger('console') + test.log.debug(f"Console interaction success:'{success_message}' " + + f"failure:'{failure_message}' send:'{send_string}'") while True: if send_string: vm.console_socket.sendall(send_string.encode()) --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028951; cv=none; d=zohomail.com; s=zohoarc; b=kY4Ct2mxomH+xTEufJey3YX82Eg34BHzeVG9RNhgyXHvSi5kRQFuVYrr4Pzl6Yl+Wui6ow/BJqVrjLnWVZW6PhkZd8dtK+n1oct34tqsg2PbCqoFrR4/9wM0vhcPAAW6gaRYCJHNNn9UAGNIbROJJO/1FRahzB1HlTSisPDJRJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028951; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aqtmXPrHCd5t584qGNMT8PaUQPkcPG7TWxttjVlkJI0=; b=HEEm1A7k50HfbcIu0fTiVuYtAVzV9/uehragA1vQgXOhP0jGsR6ryDDmwYlrjhgfUtRsGOIZoZv4TJzIcTfxCpEGTUpg2/uT4QfXKZ+gIpKOif2ewxoyK4HxBmCIBy/w6IaIP+DcpN+loO9SMIIiUhC3ODqXNjCkt3AOOTyk+UU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028951090943.6045872459168; Tue, 19 Nov 2024 07:09:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPo5-0006Bu-Mp; Tue, 19 Nov 2024 10:06:22 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnu-00063d-1F for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:11 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPns-0003m8-9p for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:09 -0500 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-14-t34iqQQtMB2ye5UH5gVCzA-1; Tue, 19 Nov 2024 10:06:04 -0500 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 723EC1953942; Tue, 19 Nov 2024 15:06:03 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 35ACE195DF81; Tue, 19 Nov 2024 15:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028767; 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=aqtmXPrHCd5t584qGNMT8PaUQPkcPG7TWxttjVlkJI0=; b=iYSThqGhjsZPuTqcCLYht0ckSDD9u2kNhZxpTJnjfTzf1F0rvxbzYF3tD2RRHVsruJlBh4 6sN8eVYvvMyvIIQgEWfIs/7m1ZOSKrXg4yez9qkKkHhQhuWWvXe+qIi+h1+aLoRkJJq0j3 F1EPRHFFfCkHuTY8xOhe6ayjHetu8es= X-MC-Unique: t34iqQQtMB2ye5UH5gVCzA-1 X-Mimecast-MFC-AGG-ID: t34iqQQtMB2ye5UH5gVCzA From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH 13/15] tests/functional: rewrite console handling to be bytewise Date: Tue, 19 Nov 2024 15:05:17 +0000 Message-ID: <20241119150519.1123365-14-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028955629116600 The console interaction that waits for predicted strings uses readline(), and thus is only capable of waiting for strings that are followed by a newline. This is inconvenient when needing to match on some things, particularly login prompts, or shell prompts, causing tests to use time.sleep(...) instead, which is unreliable. Switch to reading the console 1 byte at a time, comparing against the success/failure messages until we see a match, regardless of whether a newline is encountered. The success/failure comparisons are done with the python bytes type, rather than strings, to avoid the problem of needing to decode partially received multibyte utf8 characters. Heavily inspired by a patch proposed by C=C3=A9dric, but written again to work in bytes, rather than strings. Co-developed-by: C=C3=A9dric Le Goater Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/cmd.py | 63 +++++++++++++++++++++++-------- 1 file changed, 48 insertions(+), 15 deletions(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index 76a48064cd..91267a087f 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -78,15 +78,58 @@ def run_cmd(args): def is_readable_executable_file(path): return os.path.isfile(path) and os.access(path, os.R_OK | os.X_OK) =20 +def _console_readline(test, vm, success, failure): + msg =3D bytes([]) + done =3D False + while True: + c =3D vm.console_socket.recv(1) + if c is None: + done =3D True + test.fail( + f"EOF in console, expected '{success}'") + break + msg +=3D c + + if success is None or success in msg: + done =3D True + break + if failure and failure in msg: + done =3D True + vm.console_socket.close() + test.fail( + f"'{failure}' found in console, expected '{success}'") + + if c =3D=3D b'\n': + break + + console_logger =3D logging.getLogger('console') + try: + console_logger.debug(msg.decode().strip()) + except: + console_logger.debug(msg) + + return done + def _console_interaction(test, success_message, failure_message, send_string, keep_sending=3DFalse, vm=3DNone): assert not keep_sending or send_string if vm is None: vm =3D test.vm - console =3D vm.console_file - console_logger =3D logging.getLogger('console') + test.log.debug(f"Console interaction success:'{success_message}' " + f"failure:'{failure_message}' send:'{send_string}'") + + # We'll process console in bytes, to avoid having to + # deal with unicode decode errors from receiving + # partial utf8 byte sequences + success_message_b =3D None + if success_message is not None: + success_message_b =3D success_message.encode() + + failure_message_b =3D None + if failure_message is not None: + failure_message_b =3D failure_message.encode() + while True: if send_string: vm.console_socket.sendall(send_string.encode()) @@ -99,20 +142,10 @@ def _console_interaction(test, success_message, failur= e_message, break continue =20 - try: - msg =3D console.readline().decode().strip() - except UnicodeDecodeError: - msg =3D None - if not msg: - continue - console_logger.debug(msg) - if success_message is None or success_message in msg: + if _console_readline(test, vm, + success_message_b, + failure_message_b): break - if failure_message and failure_message in msg: - console.close() - fail =3D 'Failure message found in console: "%s". Expected: "%= s"' % \ - (failure_message, success_message) - test.fail(fail) =20 def interrupt_interactive_console_until_pattern(test, success_message, failure_message=3DNone, --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028832; cv=none; d=zohomail.com; s=zohoarc; b=ModMrlc9VTwS7Sbdc2K4q6Il/3us1U2u0zhqUw6Kc7NY+qkVaomosffwUo/1LwnxtvO2y0WUYdZMdBkzz2TEocaNAT2X26YLADJhuTHsQlc3kmT/Hy0tMdBvnl8BOxevMYLrBfxOQQ2+WM4Xa4+h9KdVXHkQtuPJmT1V1BtmejA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028832; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=yyFkxmEDProtwTBUvdEdXCOHx7kjYPBJU+JzezPkC9M=; b=ZjCtCMNxq+Jcp+4sZ21kU5SjHjZ99vu+mMAyXvAlvmy4bGfDp7WYITRPBmXCeYrReOfmYBhmEDBPrsf6DeWJhVCQg7PuAguKTQDx055ZNj3L+yoAUfc3trov74pS7V3Spn/Bu/LuGA46Y8SJahHq3/DXL+3z/mjiGk5mt53YsOs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028832528866.3645343108274; Tue, 19 Nov 2024 07:07:12 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPo7-0006EL-HT; Tue, 19 Nov 2024 10:06:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPny-00066V-40 for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:16 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnw-0003mw-Ej for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:13 -0500 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-398-JM6bOA0jOVWuTMJoPZ4jjg-1; Tue, 19 Nov 2024 10:06:07 -0500 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 917531955E87; Tue, 19 Nov 2024 15:06:06 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id DD1D619560A3; Tue, 19 Nov 2024 15:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028771; 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=yyFkxmEDProtwTBUvdEdXCOHx7kjYPBJU+JzezPkC9M=; b=KdV0KjOP96kv5OjZ8+8feLNxcToxu3N9SBtpejXzPsI/OHN8AyaiPJ83brD/hh5ph63ZOx ckEoclskA06zyR6u9lxqhyg8bZzkqtas11dt2mLJMKhYo2eqCiRPKt7Gc2aP68aTT5nd56 7icDNiOEEbNQ0AYn3kckxGYfYjTNnn0= X-MC-Unique: JM6bOA0jOVWuTMJoPZ4jjg-1 X-Mimecast-MFC-AGG-ID: JM6bOA0jOVWuTMJoPZ4jjg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 14/15] tests/functional: remove time.sleep usage from tuxrun tests Date: Tue, 19 Nov 2024 15:05:18 +0000 Message-ID: <20241119150519.1123365-15-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028832918116600 The tuxrun tests send a series of strings to the guest to login and then run commands. Since we have been unable to match on console output that isn't followed by a newline, the test used many time.sleep() statements to pretend to synchronize with the guest. This has proved to be unreliable for the aarch64be instance of the tuxrun tests, with the test often hanging. The hang is a very subtle timing problem, and it is suspected that some (otherwise apparently harmless) I/O error messages could be resulting in full FIFO buffers, stalling interaction with the guest. With the newly rewritten console interaction able to match strings that don't have a following newline, the tux run tests can now match directly on the login prompt, and/or shell PS1 prompt. Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2689 Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater --- tests/functional/qemu_test/tuxruntest.py | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/tests/functional/qemu_test/tuxruntest.py b/tests/functional/qe= mu_test/tuxruntest.py index ed2b238c92..ab3b27da43 100644 --- a/tests/functional/qemu_test/tuxruntest.py +++ b/tests/functional/qemu_test/tuxruntest.py @@ -124,16 +124,12 @@ def run_tuxtest_tests(self, haltmsg): then do a few things on the console. Trigger a shutdown and wait to exit cleanly. """ - self.wait_for_console_pattern("Welcome to TuxTest") - time.sleep(0.2) - exec_command(self, 'root') - time.sleep(0.2) - exec_command(self, 'cat /proc/interrupts') - time.sleep(0.1) - exec_command(self, 'cat /proc/self/maps') - time.sleep(0.1) - exec_command(self, 'uname -a') - time.sleep(0.1) + ps1=3D'root@tuxtest:~#' + self.wait_for_console_pattern('tuxtest login:') + exec_command_and_wait_for_pattern(self, 'root', ps1) + exec_command_and_wait_for_pattern(self, 'cat /proc/interrupts', ps= 1) + exec_command_and_wait_for_pattern(self, 'cat /proc/self/maps', ps1) + exec_command_and_wait_for_pattern(self, 'uname -a', ps1) exec_command_and_wait_for_pattern(self, 'halt', haltmsg) =20 # Wait for VM to shut down gracefully if it can --=20 2.46.0 From nobody Sat Nov 23 17:47:55 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1732028799; cv=none; d=zohomail.com; s=zohoarc; b=j1aEirqxnobCTvHMT82eelSzAyIss8x622+BOmJeD1yZfnEHZUyQfys7imRUaGl6Vfmv/I5QULYB8FI5r5ty+1m4046UMhYlhCvtMwG5/oRbmBTikob6ncZ1k3ch+9Gqs8tOJipLro8j7q0SfZDL1DrXZ9dpAl4ZDTxK2GJDyoA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732028799; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=Eyu0cn5FzdzceEuW+fkqD+07mIuDQMfs25zDJjNsjtg=; b=CwweywUYJeNt9PEC1mVfvN29xizcOxKMWBxeXGfsqYdCHk+XyUCWafv8Nwf+Ly/foh8U/+OITRvAOmZFGxEDbHdfiJk/rmMFiW1rK1CT0Es7BKSMqD70mvIq9PLIVSgEViyveZ6j1l9t/AsFhn8WIYcLsc+ELZcg5lcie/Opu4g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1732028799771556.4648605416327; Tue, 19 Nov 2024 07:06:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tDPo9-0006HH-Fr; Tue, 19 Nov 2024 10:06:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnz-00066a-GL for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:20 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tDPnw-0003n5-PB for qemu-devel@nongnu.org; Tue, 19 Nov 2024 10:06:14 -0500 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-516-McuGO2pfP7CL0FB3QUOxcg-1; Tue, 19 Nov 2024 10:06:10 -0500 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-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AA9651955F3E; Tue, 19 Nov 2024 15:06:09 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.110]) by mx-prod-int-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2C6D719560A3; Tue, 19 Nov 2024 15:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732028772; 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=Eyu0cn5FzdzceEuW+fkqD+07mIuDQMfs25zDJjNsjtg=; b=A3C0mllupf4f/IY4IUiiBUINh87AGUezcO4/PZBOM5/xE5wsWU95dLEQM7SxtPiGPKqqoQ 7F43yOcsdsU3wmC0hCPBTkPWbTFPr1wzGCuXveD0baU9tXWBYU/bvdxuwPV1NMiSwbovav 0xKDpe1XXnX6x9EYGRuKIFXMKuZlBcU= X-MC-Unique: McuGO2pfP7CL0FB3QUOxcg-1 X-Mimecast-MFC-AGG-ID: McuGO2pfP7CL0FB3QUOxcg From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , Ani Sinha , =?UTF-8?q?Alex=20Benn=C3=A9e?= , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Peter Maydell , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH 15/15] tests/functional: add a QMP backdoor for debugging stalled tests Date: Tue, 19 Nov 2024 15:05:19 +0000 Message-ID: <20241119150519.1123365-16-berrange@redhat.com> In-Reply-To: <20241119150519.1123365-1-berrange@redhat.com> References: <20241119150519.1123365-1-berrange@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.0 on 10.30.177.12 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=berrange@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.14, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1732028800753116600 Support the QEMU_TEST_QMP_BACKDOOR=3Dbackdoor.sock env variable as a way to get a QMP backdoor for debugging a stalled QEMU test. Most typically this would be used if running the tests directly: $ QEMU_TEST_QMP_BACKDOOR=3Dbackdoor.sock \ QEMU_TEST_QEMU_BINARY=3D./build/qemu-system-arm \ PYTHONPATH=3D./python \ ./tests/functional/test_arm_tuxrun.py And then, when the test stalls, in a second shell run: $ ./scripts/qmp/qmp-shell backdoor.sock Signed-off-by: Daniel P. Berrang=C3=A9 Tested-by: C=C3=A9dric Le Goater --- docs/devel/testing/functional.rst | 10 ++++++++++ tests/functional/qemu_test/testcase.py | 7 +++++++ 2 files changed, 17 insertions(+) diff --git a/docs/devel/testing/functional.rst b/docs/devel/testing/functio= nal.rst index 6b5d0c5b98..b8ad7b0bf7 100644 --- a/docs/devel/testing/functional.rst +++ b/docs/devel/testing/functional.rst @@ -176,6 +176,16 @@ primarily depend on the value of the ``qemu_bin`` clas= s attribute. If it is not explicitly set by the test code, its default value will be the result the QEMU_TEST_QEMU_BINARY environment variable. =20 +Debugging hung QEMU +^^^^^^^^^^^^^^^^^^^ + +When test cases go wrong it may be helpful to debug a stalled QEMU +process. While the QEMUMachine class owns the primary QMP monitor +socket, it is possible to request a second QMP monitor be created +by setting the ``QEMU_TEST_QMP_BACKDOOR`` env variable to refer +to a UNIX socket name. The ``qmp-shell`` command can then be +attached to the stalled QEMU to examine its live state. + Attribute reference ------------------- =20 diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index e2a329c3e5..eb889a5bae 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -175,6 +175,13 @@ def _new_vm(self, name, *args): log_dir=3Dself.logdir) self.log.debug('QEMUMachine "%s" created', name) self.log.debug('QEMUMachine "%s" temp_dir: %s', name, vm.temp_dir) + + if "QEMU_TEST_QMP_BACKDOOR" in os.environ: + path =3D os.environ["QEMU_TEST_QMP_BACKDOOR"] + vm.add_args("-chardev", + f"socket,id=3Dbackdoor,path=3D{path},server=3Don,w= ait=3Doff", + "-mon", "chardev=3Dbackdoor,mode=3Dcontrol") + if args: vm.add_args(*args) return vm --=20 2.46.0