From nobody Sat Nov 23 14:42:52 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=1732203936; cv=none; d=zohomail.com; s=zohoarc; b=eYcw6RltyiBL0+razZpyW06uvrHaoAp29GVPRsZGHri2ORlW9gfptswA310xQSdq/fgN+OJE86/p0Ajlm/73sihQWB3JyFB6pk/5hvMQO0seNrH7j5ycvMFhqgGph0nbVUXO+y2nRAWkDJGqr5cnh8S3ZkAYp9cgN6M6h0uXTH8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203936; 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=5xgyc8w+JuKI1Dh7R5B+dBPegomsshnsxgpzcX/gHWo=; b=Ruc2TlM85/t62Skt5bh6uDJiCKl5GaZkRDBfxQh4abl5Ae8yxskuWuP2RBKxIf6jrxNMa5WPsm58jtQBfz1WdttztYf23lkBBhP2Lt1pxXenI18OGgPftV2FZilseiQF2093j1RxRnViAXztZsaJdDmo75yPJXHV/C3FujNMpu8= 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 1732203936452695.6546473686982; Thu, 21 Nov 2024 07:45:36 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9KO-0008LS-GE; Thu, 21 Nov 2024 10:42:44 -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 1tE9KK-0008Ks-D4 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:41 -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 1tE9KI-0000hT-SE for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:40 -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-251-nFal34ryMIqNkRlNwnQ5_Q-1; Thu, 21 Nov 2024 10:42:35 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 62A541955F42; Thu, 21 Nov 2024 15:42:34 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E175195607C; Thu, 21 Nov 2024 15:42:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203756; 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=5xgyc8w+JuKI1Dh7R5B+dBPegomsshnsxgpzcX/gHWo=; b=Sj6NtEVE3mFkt7VkGHp6Ws/mgw5mHvgKLiTF7tJYeyXnUHVbDn36xhPOUKqkBhUICokKv9 JkHFpTxXY2cRtN/NOo4Xnn8M6D+X+ClbgHlGIBYqT1Yu+GuldsxRmqP1C4xwd9zzs2Pt3U 3Rcy1/nGUOe9ztaOWaom1/wup+V7pac= X-MC-Unique: nFal34ryMIqNkRlNwnQ5_Q-1 X-Mimecast-MFC-AGG-ID: nFal34ryMIqNkRlNwnQ5_Q 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 01/18] tests/functional: fix mips64el test to honour workdir Date: Thu, 21 Nov 2024 15:42:01 +0000 Message-ID: <20241121154218.1423005-2-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203937573116600 The missing directory separator resulted in the kernel file being created 1 level higher than expected. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203843; cv=none; d=zohomail.com; s=zohoarc; b=bGPzFjVH/0dvgBYA50y6mN8DOXf3SWKQqKIpqQmYkMOi79h2nWEKV2iP6KrmJop7vJZHXI09qFmoWaZqNtad7lIe8OasuYyib/w1IugKA9QKzWwG88OlGsM4HGSQ8R2PGRHCojZv5PwZe75gHb6Pew3e4etu7Z6/K8JSL1dVjBU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203843; 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=jMkCy4MQl2qLOgRMp/s9Ejjza/xczcztT7nl6dT9KCs=; b=n30B91WLuzZESnsnM6c1dI59KQG7irwBc3UsqWI8eYkS0vFsvNvBQxfx8jSzpOJOc5F87QdSq5wKvK7P87zplyt82usmQMZDGjyyQ55y/QrJ1MbzHDzQnMcBb1zauIaGgm6FXwtU/eX3J+gm0qGGKpzhgBI7s+4yPdFMA1zycE8= 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 1732203843801191.20018288873337; Thu, 21 Nov 2024 07:44:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9KT-0008MA-LS; Thu, 21 Nov 2024 10:42:49 -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 1tE9KS-0008M0-Kc for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:48 -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 1tE9KR-0000iI-2a for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:48 -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-88-lDdkqxyIOxuPxpOaUDDWcA-1; Thu, 21 Nov 2024 10:42:44 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6CECD19540F2; Thu, 21 Nov 2024 15:42:43 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 8970D195607C; Thu, 21 Nov 2024 15:42:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203766; 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=jMkCy4MQl2qLOgRMp/s9Ejjza/xczcztT7nl6dT9KCs=; b=Ce3tmH53909xHc9vSkadAXccSrD8293/60RpN3ucaK5Nhy1lxYwADoNhS6e4otw49F/vQM 15Tz0MoUhDZ+4q5K75HbCt4N6DErwjyE9yboQoQt2F6tCQSlnB/bnMTgOC46IQByYnLp1n E3Ulp2ntf4Bl+IY9aNRXvLuFGuBZl9I= X-MC-Unique: lDdkqxyIOxuPxpOaUDDWcA-1 X-Mimecast-MFC-AGG-ID: lDdkqxyIOxuPxpOaUDDWcA 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 02/18] tests/functional: automatically clean up scratch files after tests Date: Thu, 21 Nov 2024 15:42:02 +0000 Message-ID: <20241121154218.1423005-3-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203845452116600 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. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203858; cv=none; d=zohomail.com; s=zohoarc; b=G8vwruw3sf49Q8szLT8IjLUAHFo1oatrOi5M3YXP1M4k5ilIFTWEE6pCpBen5fk6s2dy0TOtOBrIivrlrUhJ0ckQgVJOrGj2gmeCCk0CHjF8vkmgIBcJjG6mSX2C13glRSnvnVWR75JfXHkc0PsS7lm4DwCcTnNoPuz+7Bpa8/0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203858; 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=ZDwzpubNeX/qNKmGspxHAL/q+ogQKTglNRA4riqdpPU=; b=Q0DWn+7XkZUJVeQPkUkE20uc0EbN1lnTqPdgOTm3p0xlHAt8f2As0LzPo99234Xo3n6BpuWVLnMQYWTeAA0NpmL3JXey3+0CKeiyo+kGdqMAZn9YE55e7nR/onNJOjH9sSqiudtHubhhC9dEYORTlwuCM+0aGdoJ2XlQIeJyKEk= 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 1732203858479111.82640880454073; Thu, 21 Nov 2024 07:44:18 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Ke-0008Rf-AA; Thu, 21 Nov 2024 10:43: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 1tE9Kd-0008QF-Cj for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:59 -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 1tE9Kb-0000jB-Vb for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:59 -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-537-qVwBDbvAM_CyKddU-mIZVA-1; Thu, 21 Nov 2024 10:42:51 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 8CBA019560B4; Thu, 21 Nov 2024 15:42:49 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3827D1956086; Thu, 21 Nov 2024 15:42:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203776; 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=ZDwzpubNeX/qNKmGspxHAL/q+ogQKTglNRA4riqdpPU=; b=TjnzWa1RjNRR02MCo2UVsfCPK+IWC2UsWCuqlZfvxE1WvyReWyiSq9PRgulLqtZvthP+4x DHmRkHn/o65JeSiFxrwQ+q/yKX+6WaSn+ippND/ABa9+olbADDEvYjIF71zug1GZW03Ydi r4qy76xu0VTKM4TuEuLTtEEMeYyL7ec= X-MC-Unique: qVwBDbvAM_CyKddU-mIZVA-1 X-Mimecast-MFC-AGG-ID: qVwBDbvAM_CyKddU-mIZVA 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 03/18] tests/functional: remove "AVOCADO" from env variable name Date: Thu, 21 Nov 2024 15:42:03 +0000 Message-ID: <20241121154218.1423005-4-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203859356116600 This env variable is a debugging flag to save screendumps in the mips64el malta tests. Reviewed-by: Alex Benn=C3=A9e Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732204048; cv=none; d=zohomail.com; s=zohoarc; b=Kj0h357BhHy9NGX4wONZU69pScqCEPC3AeKk5mFrz2dXRw9owCwOqhAlxUiA1b04OZhli8tv7lwzGF+sq5gV0jR+hsUMNk0I/zHTBnq8xj++Me6mUumHjVm2qkqfn+vQiLLr00k+ROBnA/BJSZGoYCPbbqRg/oXJWPS1isf0t+M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204048; 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=zEdXuVGS/fhAhcPsMssD2Qky9xdh2cF1WGJ6DF3GmRQ=; b=O3GWHwbaH+jNJ0NtzWAzj0J6uOXlmQkacXaee9VTqJxbgzmx8EL8ToTccilEpBx3osISKNJy++EEgsBi+lPbPRlVv4as1VtSujDESAvzjw6M9gKU/xceXB1wvpqLWiq3nAGrQ3pkvisM+Wv2OOSezQv6rXDRe7N2WlriKT6EIQg= 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 1732204047994454.6492619879192; Thu, 21 Nov 2024 07:47:27 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Kf-0008SH-89; Thu, 21 Nov 2024 10:43:01 -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 1tE9Kd-0008RL-Ot for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42: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 1tE9Kc-0000jM-By for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:42:59 -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-374-xB_u2AOKNdijHNXV-JzssA-1; Thu, 21 Nov 2024 10:42:54 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A966D1954128; Thu, 21 Nov 2024 15:42:53 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E23041956086; Thu, 21 Nov 2024 15:42:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203777; 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=zEdXuVGS/fhAhcPsMssD2Qky9xdh2cF1WGJ6DF3GmRQ=; b=WBgTuHxM6RO6yG117BP0Qw5CKu+JU8238cbRj4uCKYXIJrbjomEqAIS1drZcvofGBrBPrj NyJhMGMTkWq8TbsJFZT36gr77paEkk+LzDryhXvFjhqqXeWkUsG19fwP5m5ihgR3vAUdm2 oadaQPcz14BqacFB77ZNGfIAdoDT57o= X-MC-Unique: xB_u2AOKNdijHNXV-JzssA-1 X-Mimecast-MFC-AGG-ID: xB_u2AOKNdijHNXV-JzssA 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 04/18] tests/functional: remove todo wrt avocado.utils.wait_for Date: Thu, 21 Nov 2024 15:42:04 +0000 Message-ID: <20241121154218.1423005-5-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204050207116600 We're not using avocado anymore, so while the TODO item is still relevant, suggesting use of avocado.utils is not. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203808; cv=none; d=zohomail.com; s=zohoarc; b=a+I8uci7G4EshbxItXcF7W9M7qf+s3LndLxNDd4Qo5JtPghWhDjxPANZCV8LywrfrHexwCvp5INaRHBxANSaziSLqxGtsuweYPyG+TSt9Aam1mdwDMxsLhQXXJzdCnHCHktrcinuzikXMsAURRk4b48P3j+9xsRFgGo5zv/rD7s= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203808; 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=Yj5+vx0K0OlA1WTlyKTZ9b/IpvJBZdLUFFn25VVcPtE=; b=gqKkqMGOtQhEVqMdHy3+mvRm+WtaMMhQVg9ogWc6ukr5YLXuOS9iUy3AbJG4qrOk1rkYKGtUWQfMGFyKUT/deTN4CBX9FhtKVzhfbvweEtZhAGwfsHyB7x20RehYmemHnVgysKRtDtP8DQ4QX2/ltnT08wVMQqLXpheXnTdpMzc= 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 1732203808550596.5601326215129; Thu, 21 Nov 2024 07:43:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Kk-0008TJ-9b; Thu, 21 Nov 2024 10:43:06 -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 1tE9Kh-0008Sp-PR for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:03 -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 1tE9Kg-0000jz-90 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:03 -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-312-4EqBEcFjN0imH1vHQ11iwQ-1; Thu, 21 Nov 2024 10:42:58 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E00991954128; Thu, 21 Nov 2024 15:42:56 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 16E4E1956086; Thu, 21 Nov 2024 15:42:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203781; 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=Yj5+vx0K0OlA1WTlyKTZ9b/IpvJBZdLUFFn25VVcPtE=; b=RwMzZ9BqTtjquco7IRv3rIuX1Ur243cemNPOPpj9FUPHddvgC2dqbdjV8ApAg12MtRLQBZ TJiVjFoyMepImeHKPIVlNqGDg0h87a0M29f/ZfkHBjvGUV5D6bQcKfO0Lp0cR2wdQtg7nA yD0NEHYmVXiubXQixgojkYMi3AUinXU= X-MC-Unique: 4EqBEcFjN0imH1vHQ11iwQ-1 X-Mimecast-MFC-AGG-ID: 4EqBEcFjN0imH1vHQ11iwQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 05/18] tests/functional: remove leftover :avocado: tags Date: Thu, 21 Nov 2024 15:42:05 +0000 Message-ID: <20241121154218.1423005-6-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203809461116600 These tags are not honoured under the new functional test harness. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203956; cv=none; d=zohomail.com; s=zohoarc; b=dMQhFjePeW7tNHXGTK3dIU7sWuCd5fUoG5LaFtU5scRjwz428tjjuMOXLLr55wmFD74Ui1GA9BpAV4kRkI3jRM6r24z77WFyYjQqc8MzEubrAhhdBwQwUTy+YCvWoMz6mvkVVFTfgNopR9riErqT3Q5K2yx5yQg6iJ7Ald6iXVE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203956; 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=1FsH3qFtGsm9QX04vq8KLHX874OpFGJsQao19NSbZGE=; b=XZc76TUaGDMZRfbW2DdXfSaC1Pl+CkxIvFFPQpcY6H5l4nXImf7v96Hl8GC81PGKIOdxOiJ5lTYjvc/L23YdpPiiYqQBFeDlanoY5glEFoi/OxqS5Key/klhGo369PF7zrGPvcZAVKgJDr9z1ZomST/9VE5ok1joUQWCdtanjFM= 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 1732203956111180.9678821880617; Thu, 21 Nov 2024 07:45:56 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9LO-0000dh-2r; Thu, 21 Nov 2024 10:43:48 -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 1tE9L6-0000TV-EA for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:32 -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 1tE9Ky-0000lM-GH for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:27 -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-248-ftgM3IWIPneJhA0T9xjKTQ-1; Thu, 21 Nov 2024 10:43:04 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BE97319540F2; Thu, 21 Nov 2024 15:43:03 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A856B1956086; Thu, 21 Nov 2024 15:42:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203790; 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=1FsH3qFtGsm9QX04vq8KLHX874OpFGJsQao19NSbZGE=; b=OPK5ZusC3lQkucgZzPNTNuDIvtPyR2MqnzK1ynDYtx+3x5P8pcTZnRGfJ74f1N8T0YkOhh Reh01KuXwfgrxYQYHl/JigD8yyHPwRItIi3G2jBZd0LmUTp1c/jhuJsyNWz5IquLW/RT6V UEisuiRlBC5A4LQLvZ1tvdiS+O4cW30= X-MC-Unique: ftgM3IWIPneJhA0T9xjKTQ-1 X-Mimecast-MFC-AGG-ID: ftgM3IWIPneJhA0T9xjKTQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 06/18] tests/functional: remove obsolete reference to avocado bug Date: Thu, 21 Nov 2024 15:42:06 +0000 Message-ID: <20241121154218.1423005-7-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203957757116600 Historical bugs in avocado related to zstd support are not relevant to the code now that it uses QEMU's native test harness. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203916; cv=none; d=zohomail.com; s=zohoarc; b=GnM2v2pptyuTLXoFw8B148R4DtLrI/tME0AHx53hW9usfrWhhwykYjXtV1iNFxooj6fEi7eWikiyhDNNtDJyoXIMVCuZkxVv971E5Ue4qA7ukqFk1em8Mb2o3n55r8ZcRpa/h/hn9/8J/qizNaJbTPywmLxzE1W70S6JXMIAAuM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203916; 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=9yZ5S8cQcszBn1MnoteKcv76OOdM8fiGdKcnqIzzBlQ=; b=K5P6xEfB6M1l4SjAq1vJPwF4yd0/WjguU4pMNEx7C0JJXOmjovkW89Ugj/DTvz4Dl17a2O1uAdNjZSP8uHUOFkD5IPB9YnQzHpPUfvyuB7+Vh83yzaDdklhGPBf4sUWR1/m2ldUdBrupsv1eVxuHao6JmT/R6wTm9m1YSLx31l8= 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 173220391625781.81067991202633; Thu, 21 Nov 2024 07:45:16 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9LX-0000qb-H2; Thu, 21 Nov 2024 10:43:55 -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 1tE9L8-0000Tg-8l for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:33 -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 1tE9L2-0000lm-Rp for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:28 -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-534-mpfy6-J5NCG-o9yNSRDnhQ-1; Thu, 21 Nov 2024 10:43:09 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E22D819560B4; Thu, 21 Nov 2024 15:43:07 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 6E3221956086; Thu, 21 Nov 2024 15:43:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203794; 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=9yZ5S8cQcszBn1MnoteKcv76OOdM8fiGdKcnqIzzBlQ=; b=FWclCDyjJaxLK4x46VbIAEz6/LGbUdqN1jCmIx+z7Yqzaw6zdzVW87xwIqxrE8m36bTtsV Z0K++3Cav2qcQYWAL6/HJvqQMt2e63UX1DRBMQiSl9ivsT5nEwr9jU997WznXbQmb5j9OA FONqsJLTlQEP5ZAr4zdf6FOkCCTKWII= X-MC-Unique: mpfy6-J5NCG-o9yNSRDnhQ-1 X-Mimecast-MFC-AGG-ID: mpfy6-J5NCG-o9yNSRDnhQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 07/18] tests/functional: remove comments talking about avocado Date: Thu, 21 Nov 2024 15:42:07 +0000 Message-ID: <20241121154218.1423005-8-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203917887116600 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 --- tests/functional/test_acpi_bits.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/functional/test_acpi_bits.py b/tests/functional/test_acp= i_bits.py index ee40647d5b..4c192d95cc 100755 --- a/tests/functional/test_acpi_bits.py +++ b/tests/functional/test_acpi_bits.py @@ -196,11 +196,12 @@ 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 + # they are not run by accident. + # + # These scripts are intended to run inside the test VM + # and are written for python 2.7 not python 3, hence + # would cause syntax errors if loaded ouside the VM. 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 +400,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 14:42:52 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=1732203903; cv=none; d=zohomail.com; s=zohoarc; b=QkVkD3mezoHwOkebE2Iudlh2XZDJbzvFoJMg+nMbnO25bDEIPuEvZ6O/tAX9GZirL2RJcgcTqVSxvzULnOq/y1c8QkbMGEClGB0/CW1NG3Tc2bDIIJqEG26JoWJDMOt0DwXVqbVGORAIVieLMI+Yffs1r+a1iBEKLFBUjshu9WQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203903; 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=q500sd/R/a7Oc6lEDFtNG88UxgBcWgktEG6Muqv7R+8=; b=bUp8yVRnvYbpsz6adJV0yXRHKqO43Vu5lB6BrEbpSTR1F7lYyM4zDXEYYhr4hrkOrEY+DZdpJqImwF6vTIwfTSkg0+ZSCU3M41asxTa4/FCZKOfUZvR6bMu31zaivTlL5j9MRPHFmDGNR8Dlu2THMJEd7xifhlAHaY/ILuytJ20= 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 1732203903558253.9868755994812; Thu, 21 Nov 2024 07:45:03 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Lp-0001qD-LE; Thu, 21 Nov 2024 10:44: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 1tE9L8-0000Te-8l for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:33 -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 1tE9L4-0000m3-3v for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:29 -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-591-QfD08tKLP9S1FhzFUitHIg-1; Thu, 21 Nov 2024 10:43:14 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 7C31219560B0; Thu, 21 Nov 2024 15:43:13 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2F2171956086; Thu, 21 Nov 2024 15:43:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203797; 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=q500sd/R/a7Oc6lEDFtNG88UxgBcWgktEG6Muqv7R+8=; b=NryQPFsVPJ3lMFeUNqcsFTg3h6/gumPaQvAnnezb8hZ3q7/R0N3sctrI75Y/KGcSnGBxyj Hc7m9gyXGTrBObZzdvY1vWjl5B8KUx6z0Pxuuvhet6olkDyVpljkBe7/A1cA89+5scllRH K5NIwtm89IVPlbvL+N8XLChSweXY6XA= X-MC-Unique: QfD08tKLP9S1FhzFUitHIg-1 X-Mimecast-MFC-AGG-ID: QfD08tKLP9S1FhzFUitHIg 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 08/18] tests/functional: honour self.workdir in ACPI bits tests Date: Thu, 21 Nov 2024 15:42:08 +0000 Message-ID: <20241121154218.1423005-9-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203905588116600 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. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 4c192d95cc..3498b96787 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 @@ -225,8 +224,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)) @@ -247,11 +246,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 @@ -290,17 +289,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 @@ -321,10 +310,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() @@ -334,7 +323,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() @@ -360,25 +349,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 14:42:52 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=1732203860; cv=none; d=zohomail.com; s=zohoarc; b=MTJ2kVgIqnn8oa9AJJGwj+vtZxbRQeXzMR7tL3xYGY5dSgFPLUqRp1TO/72hk7ICowTBzn9TM14DeX7bNpCna3NPl2tDblxiMVxtLmVP3xaDI47vDb/LkUZBM7J4oxSdo5MBOgq62R8sahWa260/El3DuEk5i6T3fqNKXTkKT90= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203860; 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=nMvcOztfLXHUpbwvz/8L1h5YFMWeNJ73YUWalXKVu2A=; b=QLchNfZicNGcf5nsicchDZmXsyES6hLevQBjsuFt9XlCLZVZFMIOVAciMcJnkMjtmfvhv5Zt/2FObr6//2WHkTqGLyQevE8jJk3wOtymBVqOoaF+/4y3rzdAAtCzpAu55VRi7zCA9OWWX6SnZxPnlE02VBmlOu3ViEKQFSL++oI= 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 1732203860234792.9718502579028; Thu, 21 Nov 2024 07:44:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9LN-0000cZ-B4; Thu, 21 Nov 2024 10:43:45 -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 1tE9L8-0000Th-9E for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:33 -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 1tE9L4-0000mN-MP for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:29 -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-21-K0tr_tqxMIKDnzzptLyGRg-1; Thu, 21 Nov 2024 10:43:21 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0192D19560A3; Thu, 21 Nov 2024 15:43:20 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3BC6F1956086; Thu, 21 Nov 2024 15:43:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203802; 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=nMvcOztfLXHUpbwvz/8L1h5YFMWeNJ73YUWalXKVu2A=; b=I0MFvGoEEiGQfgEgxil2ukNyOwauMFW+yWq2hlZzF+45M45Ci6H/4gHlOoAr6y31WtIaFI l7rUb0i1DlQyIEswIathl1cvD4kyEBgdGeC4fkm41BTBwhqzjDrp2UYFyodcCWFPKkrGrF 4T6IXEkLirxdF5RLn3lcVb3CMHu7tc4= X-MC-Unique: K0tr_tqxMIKDnzzptLyGRg-1 X-Mimecast-MFC-AGG-ID: K0tr_tqxMIKDnzzptLyGRg 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 09/18] tests/functional: put QEMUMachine logs in testcase log directory Date: Thu, 21 Nov 2024 15:42:09 +0000 Message-ID: <20241121154218.1423005-10-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203861243116600 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. Reviewed-by: Alex Benn=C3=A9e Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203859; cv=none; d=zohomail.com; s=zohoarc; b=BdToKbDeZOhaIX//6XycxBz6HQzFP/h/QYbhbQE98bQiFgi+AOKBRHzUuKd+XcW/EFe7CEr/czxPbUfgkmVhQexSUTOUSYU9hnpE0df13IP2+zEZLqvnayrmJwM3ErEhqyHk9eREy1ooxDTesbsbw44Ku71ubhub2XN8kUUQTKs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203859; 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=hrx9BvI+NNWG9+XJR+wW0ZqsIv1fcwAeMg2/NpbCYCs=; b=ITJpndjUzmySKDsJBl1SPwloImjTMkvFLgB3+0aLc8B8HaP85ggnyg1c4z7ybCJWvomxQMrncN0Tc/gVqHuz0rGoqt4BC0oZjN/8UitH8NsQTsDlvPLLrL+JNUtpbN5CMoMi7Y1qD815ipkW84B3u5ew92L85hW3dpoVIYEUHKs= 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 1732203859378658.5615295033485; Thu, 21 Nov 2024 07:44:19 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9LX-0000qF-0o; Thu, 21 Nov 2024 10:43:55 -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 1tE9LH-0000Y3-O1 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:41 -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 1tE9LF-0000pI-Ha for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:39 -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-68-2XgVj_HsPRaA5ZfI-MCD_Q-1; Thu, 21 Nov 2024 10:43:28 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 60631195608A; Thu, 21 Nov 2024 15:43:27 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9B7C71955F43; Thu, 21 Nov 2024 15:43:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203812; 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=hrx9BvI+NNWG9+XJR+wW0ZqsIv1fcwAeMg2/NpbCYCs=; b=gCZ4+XZAP2fJaA/wpJp6dgASohKIgzx0BenUsf7jBgKx3twazqtUZ3N3gtpzSh39GkYXjV IT6LDRy+FxAQGut3Dn/oO9LGtygpl1lJdpA3KMkgo+1wJ1RUNQuUh+0xnItMpRpIyvYINI aBcjwZUxiYI48GShQQK4NsEoT77UcaQ= X-MC-Unique: 2XgVj_HsPRaA5ZfI-MCD_Q-1 X-Mimecast-MFC-AGG-ID: 2XgVj_HsPRaA5ZfI-MCD_Q 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 10/18] tests/functional: honour requested test VM name in QEMUMachine Date: Thu, 21 Nov 2024 15:42:10 +0000 Message-ID: <20241121154218.1423005-11-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203861189116600 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. Reviewed-by: Thomas Huth Signed-off-by: Daniel P. Berrang=C3=A9 --- 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 14:42:52 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=1732203887; cv=none; d=zohomail.com; s=zohoarc; b=QXUOxlqQsFeq9OCNIGXXLvqCm444TGhrHtdxQTSwLW3OnV1kkieLonHxLb6+NKcyW1oBR8ktinKt6mXVBJ3haawPshCSINFEEMG7nVLseakx/I/b1E63n7JtoTblDtZTvKShkaHpGK8InCQKXF+LyO3xa1UFjExdpd6gmu1EygY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203887; 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=Z0Ea4U2a7Hs2Xn3Yj2YoxF4p/49fklAf6Ao3wtxr4jWkeAr0IA4LXFbF752YTYoYO21CK5kJM3yOYDcjcfvfzKZ/nihPSvYka/RqbuysISB9f06axQ0esFSiBaFpbM2GX3xYi3FhCFXeshOAywyHAc1LfnTZpqqFk9AQDYYmoQk= 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 173220388726284.82444738555239; Thu, 21 Nov 2024 07:44:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Lg-0001Bv-77; Thu, 21 Nov 2024 10:44:04 -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 1tE9LK-0000Yb-P5 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:44 -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 1tE9LJ-0000qe-FI for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:42 -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-529-OkLaCyhuPuCCgEKuYW5AGQ-1; Thu, 21 Nov 2024 10:43:35 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id E6F401955EE7; Thu, 21 Nov 2024 15:43:33 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id ED29E1956086; Thu, 21 Nov 2024 15:43:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203819; 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=L1iof0/Jk/v/NOq4uXoC5VcP7k3VH1QEMQGZHsZcTwd5OALT2wk9xn+PAi6Bf18y/ln4K0 BQiJ0x3m0ENFUcYnoH+0ggAw/oKSjr2yifTkPd2YR5SwjdjkW3hblhK+wUNkOIOa8Pvd62 m6rqPlJLbtuxtm/jjFSvnaWlb6+AnJs= X-MC-Unique: OkLaCyhuPuCCgEKuYW5AGQ-1 X-Mimecast-MFC-AGG-ID: OkLaCyhuPuCCgEKuYW5AGQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 11/18] tests/functional: enable debug logging for QEMUMachine Date: Thu, 21 Nov 2024 15:42:11 +0000 Message-ID: <20241121154218.1423005-12-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203889392116600 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 Reviewed-by: Thomas Huth 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 14:42:52 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=1732204048; cv=none; d=zohomail.com; s=zohoarc; b=oLxszG7PAT2q/bj1wGSl748Pmp2+Wl+7dh2XAqwvvN23cRjZCxZ2AOG1Cfzlc//OLUSMafzHkO2PZQnhSSxtJCliEpywIm2lCxkvj/q6AbnYlwCN5uErS6tMCzr9WRyDiVGNdfIh8c048krIE+VlAuhFJvI3EbDWy+qd4l3udUo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204048; 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=k/LLjnsKJmJVW4delgyHvD19u7Hy2s6YSXmQHQ+bTHg=; b=FCi9SmhqF9T8d94sYJvyVBwkztdRnkT36YqszyGtcdUhPrMiXvo4/MPiGNXJQRxuOF7RLe6EkSbEypCz0+7LMgFIdxPjPFjywpjRyXrLLjaZXWTJ0HYFK/Ejfmupl78eUrvun2+GpaUDkDfQRVmLJqExn0uZ7b1AoPNirGHsDJs= 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 1732204048415593.7507021975364; Thu, 21 Nov 2024 07:47:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Lm-0001bJ-18; Thu, 21 Nov 2024 10:44:10 -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 1tE9LT-0000pD-7j for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:52 -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 1tE9LR-0000xF-V6 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:43:50 -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-388-g8Gm1fCJMSCrfurT9cwXBg-1; Thu, 21 Nov 2024 10:43:46 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0C19E1954B23; Thu, 21 Nov 2024 15:43:45 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E4DB01956086; Thu, 21 Nov 2024 15:43:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203829; 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=k/LLjnsKJmJVW4delgyHvD19u7Hy2s6YSXmQHQ+bTHg=; b=iTDA0dcmicUewP1ioF6mr+PRcIlNhmGYtFTtHnslkw/idSOo565nJRJWuAv950/OXoP68K kZ8XtNEAeG/DX1t/6NRPxNqNcf98bEZejUyPV+cXfP2nnYxe9bCJbLpsgoYzM/IVPOuakE uCvmKrfXybyuzMdJJtuGpIcgYRIDe00= X-MC-Unique: g8Gm1fCJMSCrfurT9cwXBg-1 X-Mimecast-MFC-AGG-ID: g8Gm1fCJMSCrfurT9cwXBg 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 12/18] tests/functional: logs details of console interaction operations Date: Thu, 21 Nov 2024 15:42:12 +0000 Message-ID: <20241121154218.1423005-13-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204050205116600 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 --- tests/functional/qemu_test/cmd.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index cbabb1ceed..98722a9cf6 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -85,6 +85,9 @@ 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_msg=3D'{success_message}' " + + f"failure_msg=3D'{failure_message}' send_string=3D'{send_string}'") while True: if send_string: vm.console_socket.sendall(send_string.encode()) --=20 2.46.0 From nobody Sat Nov 23 14:42:52 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=1732204063; cv=none; d=zohomail.com; s=zohoarc; b=EY9zz8FIC1WI5T30VImLWfYMCbewsiLpdmKpq9KjVGsC00cmb6YQIbkm4C6oSiE+yGAWlL1tYrsgiCsfEdNYglgdDRxkXEqMTbTctw6VCGTPHff/ZhAPOGmBlPtr5h7rKN2UUpStzAuSqSCLum/oieWgTVbi5onZPrwapoQ+Kkk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204063; 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=nRElw9e8XaCDiIFlzzdm2Hwr6QKYVXjGgkb7QpLJMaY=; b=TW+i2fb32qxYaW08yF4Rt2HBa7mL+CD+Bb8SDfglgtPtMl6XDt/LhtNzZUCAWa6Ly1svVVtZ56nbeKxfXrTLTzkx8uDSWOg4SatEVfgXSbiHoeCmQkZosLTRYNSwrN5CXFvHmNPE8lShIoPTSQIXw1ChZXFi5aGvR8m6NWj/sAc= 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 1732204063654602.513608683428; Thu, 21 Nov 2024 07:47:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Ll-0001ZJ-QF; Thu, 21 Nov 2024 10:44:09 -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 1tE9Le-00017r-PP for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:02 -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 1tE9Lc-00012G-DN for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:01 -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-256-RkkrQL8PPOC9hCqkd7VFWA-1; Thu, 21 Nov 2024 10:43:55 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id B098C1955F3D; Thu, 21 Nov 2024 15:43:54 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 9D84D1956086; Thu, 21 Nov 2024 15:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203838; 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=nRElw9e8XaCDiIFlzzdm2Hwr6QKYVXjGgkb7QpLJMaY=; b=TsYNTbjZ1vT16k0LHX8VmIJh1R2O5oY0SCrrr7CZAlfoY6RGMtExkbC+0coBDW8PKOkQrl tXzFc0mpveLnzqAp3CSp4riDtlqnCO79fvCs+XhqUFGZwLBDMpDBe47IGs5QGMDbptPEB5 SDELj315tiQhchCb2Kes1vZObekqzwA= X-MC-Unique: RkkrQL8PPOC9hCqkd7VFWA-1 X-Mimecast-MFC-AGG-ID: RkkrQL8PPOC9hCqkd7VFWA 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 13/18] tests/functional: don't try to wait for the empty string Date: Thu, 21 Nov 2024 15:42:13 +0000 Message-ID: <20241121154218.1423005-14-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204064231116600 Telling exec_command_wand_wait_for_pattern to wait for the empty string does not make any conceptual sense, as a check for empty string will always succeed. It makes even less sense when followed by a call to wait_for_console_pattern() with a real match. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/functional/test_virtio_gpu.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/functional/test_virtio_gpu.py b/tests/functional/test_vi= rtio_gpu.py index 441cbdcf2d..d5027487ac 100755 --- a/tests/functional/test_virtio_gpu.py +++ b/tests/functional/test_virtio_gpu.py @@ -80,9 +80,8 @@ def test_virtio_vga_virgl(self): =20 self.wait_for_console_pattern("as init process") exec_command_and_wait_for_pattern( - self, "/usr/sbin/modprobe virtio_gpu", "" + self, "/usr/sbin/modprobe virtio_gpu", "features: +virgl +edid" ) - self.wait_for_console_pattern("features: +virgl +edid") =20 def test_vhost_user_vga_virgl(self): # FIXME: should check presence of vhost-user-gpu, virgl, memfd etc --=20 2.46.0 From nobody Sat Nov 23 14:42:52 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=1732204101; cv=none; d=zohomail.com; s=zohoarc; b=b0SHT1DTvZPl6Um0pS4cU1+ZhuUx3wHzXnirBfLFWxZtA1aZ4CGo5UnZ6qKwXsp916/XqqNQ2CRtGNKt4uiqYkNz7p57ofK0mZWJA/CUlkCKJFUvXIFWBa4NwuOlnjUFgjCvmSaXBg2vkO3vCRbN7hwlWAGWfOHLpocNnaO8X78= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204101; 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=ShPcAkYpFIhe0//CqodvG2ShpbJoQ+YDIDMHBDSOIG0=; b=XjCf6RIXlfGFme8Akznam1wuV0/U6eazklINLt8P5JvmTzHhkiJWOcJ3+kMhG1qdRfBIhDc3lQwejWuOIEvfgPVzsl9okc3mCQxvT2sZBfOyiDetcvZxbvvnVnNngTADPeP32nsUqALjRl+Isbr6+Q1NUcU6cXlcd2B6JDtwrDY= 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 1732204100989715.3778274436171; Thu, 21 Nov 2024 07:48:20 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Ls-00028B-Gr; Thu, 21 Nov 2024 10:44:16 -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 1tE9Lg-0001FR-8F for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:04 -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 1tE9Le-00012c-HS for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:03 -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-6-dGVVZri8M3GeIJjEf8DOWQ-1; Thu, 21 Nov 2024 10:43:58 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6B7E21954226; Thu, 21 Nov 2024 15:43:57 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 364071956086; Thu, 21 Nov 2024 15:43:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203840; 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=ShPcAkYpFIhe0//CqodvG2ShpbJoQ+YDIDMHBDSOIG0=; b=VhvPX5RnrQoTKrw0B+htCx48gqof/CAdeN5kIUWZ3w4XtFB7O+toEGbJS5X22X78tpHcZ4 MVpZl06QMjdQ4CEOyf9wfobE9TFB9Foi1Ecnj7+RC7qZiVpwRgr6zFDvAJ276pI6VvZOFY /UWHo0BcNzV9kigD7AvO5xzr0wNDq1g= X-MC-Unique: dGVVZri8M3GeIJjEf8DOWQ-1 X-Mimecast-MFC-AGG-ID: dGVVZri8M3GeIJjEf8DOWQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 14/18] tests/functional: require non-NULL success_message for console wait Date: Thu, 21 Nov 2024 15:42:14 +0000 Message-ID: <20241121154218.1423005-15-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204102497116600 When waiting for expected output, the 'success_message' is a mandatory parameter, with 'failure_message' defaulting to None. The code has logic which indicates it was trying to cope with 'success_message' being None and 'failure_message' being non-None but it does not appear able to actually do anything useful. The check for 'success_message is None' will break out of the loop before any check for 'failure_message' has been performed. IOW, for practcal purposes 'success_message' must be non-None unless 'send_string' is set. Assert this expectation and simplify the loop logic. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/functional/qemu_test/cmd.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index 98722a9cf6..f6c4e4dda1 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -81,6 +81,8 @@ def is_readable_executable_file(path): def _console_interaction(test, success_message, failure_message, send_string, keep_sending=3DFalse, vm=3DNone): assert not keep_sending or send_string + assert success_message or send_string + if vm is None: vm =3D test.vm console =3D vm.console_file @@ -95,7 +97,7 @@ def _console_interaction(test, success_message, failure_m= essage, send_string =3D None # send only once =20 # Only consume console output if waiting for something - if success_message is None and failure_message is None: + if success_message is None: if send_string is None: break continue @@ -107,7 +109,7 @@ def _console_interaction(test, success_message, failure= _message, if not msg: continue console_logger.debug(msg) - if success_message is None or success_message in msg: + if success_message in msg: break if failure_message and failure_message in msg: console.close() @@ -138,6 +140,7 @@ def interrupt_interactive_console_until_pattern(test, s= uccess_message, :param interrupt_string: a string to send to the console before trying to read a new line """ + assert success_message _console_interaction(test, success_message, failure_message, interrupt_string, True) =20 @@ -152,6 +155,7 @@ def wait_for_console_pattern(test, success_message, fai= lure_message=3DNone, :param success_message: if this message appears, test succeeds :param failure_message: if this message appears, test fails """ + assert success_message _console_interaction(test, success_message, failure_message, None, vm= =3Dvm) =20 def exec_command(test, command): @@ -180,6 +184,7 @@ def exec_command_and_wait_for_pattern(test, command, :param success_message: if this message appears, test succeeds :param failure_message: if this message appears, test fails """ + assert success_message _console_interaction(test, success_message, failure_message, command += '\r') =20 def get_qemu_img(test): --=20 2.46.0 From nobody Sat Nov 23 14:42:52 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=1732203911; cv=none; d=zohomail.com; s=zohoarc; b=mrNawDFN9h7+gk2y3nZDJsE/JZvs3UFiJ251MFFZwxf8LTJwieYMGA9+GwoqKstBA0PbcLP3FMQwC3Xs4RNCTOkQ4/NFK0MqvZ37o3vf8ywN6gPE4x9eZhOj0zYKKku+uO27P+NUTkRxIXz8w7hwpZ52dp9Dz5KdFcWiC6eYaT4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203911; 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=/9q1CNlKLymBgniZFYob84WFjVbexMweRa9IPrPskeE=; b=Y/MaPKtqL7lWRfwj7qXIEAMShdjhyQoKfrqIc+19LDPBbY/1NMcxKyW7Zwzf6qC9lDn4O7lpAxMqe25jZwLu78blXdA3P9N2h9mPtHmSbiiJCUCosDcFiePtuMzwZ28g/Y97RWwI8VaSOF/Vb8djJsZk609TWF0CIqRs+2DdRg0= 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 1732203911418520.148117048785; Thu, 21 Nov 2024 07:45:11 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Lo-0001mS-Vq; Thu, 21 Nov 2024 10:44: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 1tE9Lm-0001f1-Gb for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:10 -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 1tE9Lk-00014F-QC for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:10 -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-663-T5rf3vgaPIiNYp2diMcpWw-1; Thu, 21 Nov 2024 10:44:04 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-04.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BBED3197731D; Thu, 21 Nov 2024 15:44:03 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id F32AB1956086; Thu, 21 Nov 2024 15:43:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203848; 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=/9q1CNlKLymBgniZFYob84WFjVbexMweRa9IPrPskeE=; b=PGymHdRGbFBuNlHnlWSHlzyMtaFCHWXcwKe8xhTefkvqlVA42KqihSg1phnw5JNo1K6i9Q OlcuN9/RnFUi50b0t1k1LHp580nYHUr/TJqKP7efWyPH6PVyTY30EsT+m9rELWTgJ6pEmR 2Errp7QGLqfmVqESYhS14ktOi9/AkHI= X-MC-Unique: T5rf3vgaPIiNYp2diMcpWw-1 X-Mimecast-MFC-AGG-ID: T5rf3vgaPIiNYp2diMcpWw 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= , =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Subject: [PATCH v2 15/18] tests/functional: rewrite console handling to be bytewise Date: Thu, 21 Nov 2024 15:42:15 +0000 Message-ID: <20241121154218.1423005-16-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203913543116600 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 --- tests/functional/qemu_test/cmd.py | 79 +++++++++++++++++++++++++------ 1 file changed, 64 insertions(+), 15 deletions(-) diff --git a/tests/functional/qemu_test/cmd.py b/tests/functional/qemu_test= /cmd.py index f6c4e4dda1..11c8334a7c 100644 --- a/tests/functional/qemu_test/cmd.py +++ b/tests/functional/qemu_test/cmd.py @@ -78,6 +78,54 @@ 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 +# @test: functional test to fail if @failure is seen +# @vm: the VM whose console to process +# @success: a non-None string to look for +# @failure: a string to look for that triggers test failure, or None +# +# Read up to 1 line of text from @vm, looking for @success +# and optionally @failure. +# +# If @success or @failure are seen, immediately return True, +# even if end of line is not yet seen. ie remainder of the +# line is left unread. +# +# If end of line is seen, with neither @success or @failure +# return False +# +# If @failure is seen, then mark @test as failed +def _console_read_line_until_match(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 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 @@ -85,11 +133,22 @@ def _console_interaction(test, success_message, failur= e_message, =20 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_msg=3D'{success_message}' " + f"failure_msg=3D'{failure_message}' send_string=3D'{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()) @@ -102,20 +161,10 @@ def _console_interaction(test, success_message, failu= re_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 in msg: + if _console_read_line_until_match(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 14:42:52 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=1732204101; cv=none; d=zohomail.com; s=zohoarc; b=RAVAYW1hOBgxxAoe68V082KGzR2TthxgWXSXG0tCWsOChffkJHcsKZuAp+IfVpeEW9bP8fZ5cai3wjE22aH7oPm/fYPRKsr+PRk/pquyAGR4kt3IuFaPOSaIdCshphdfSHG7pjX5jIBdFSKSC8/qnPs76hkzICf0Qc52ThcNZQM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204101; 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=K+/orkiRZ1VWi17Al3Nos3ll1SdkVJ2zINDszo7DzLU/jUgTGSf/IbV5pq91AiXWq0KvN2R1cN5drRpHZXcnPloDuGtPL3JOPFUpUCNbSuso0NunZNXe3A0ayF0nkoo/rZ1czw5u1fs735d4tB33kgV0m/BlWKOc7LTnO84eHI0= 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 1732204101796747.3004575281121; Thu, 21 Nov 2024 07:48:21 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9Ls-0002A5-Op; Thu, 21 Nov 2024 10:44:17 -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 1tE9Lq-0001z2-4T for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:14 -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 1tE9Lo-00014p-7d for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44: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-29-Jkmg4TtxPEOiAuzL-TH5tQ-1; Thu, 21 Nov 2024 10:44:08 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 354211956064; Thu, 21 Nov 2024 15:44:07 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 48ABD1956086; Thu, 21 Nov 2024 15:44:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203851; 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=Q20Ffo9bhzIjSUU/TI04gGq/g22LF50bnTlNFPrCNq4EkfpIk7Hqn8vg6L6FGEru2cCMTV vQzWJTvaxh8u1GLHQSf5GYHPEtnga/SpkjKuB1pR7D82ivgO30UciAt/DeFq5nqF/uRr9A ElwYf8RaihqdUt3NhRnckx1GhP9tja4= X-MC-Unique: Jkmg4TtxPEOiAuzL-TH5tQ-1 X-Mimecast-MFC-AGG-ID: Jkmg4TtxPEOiAuzL-TH5tQ 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 16/18] tests/functional: remove time.sleep usage from tuxrun tests Date: Thu, 21 Nov 2024 15:42:16 +0000 Message-ID: <20241121154218.1423005-17-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204102494116600 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 --- 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 14:42:53 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=1732203883; cv=none; d=zohomail.com; s=zohoarc; b=bvb+Kbwx+DcXzMzWgaSzPE2WysHPQvf4wNJNZ/z6VV7KGy4x5t/Zji6qz/hZyFZo2yujAGDLZq66EjPquuYK2TWlEtXEfLPzAkq+NBNDVV7Iw2iM2lAKbQ3YYPwMPGbHGBu+J7eGIH35nJKMPYBQPsp7YlvD2WiYMa5l1jT//7w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732203883; 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=0txKiQWpxyguRebXD1DZVJACnLLYk3HWNLZCDAk2wrg=; b=CVh3ZreFFT4M8UoGEfcTB7/HPzVDiLxdJqaMjvyom1Adrx7YKUGU2XquOBtJ8aL6kZLqnNgURfMf9WUNHvLS8V5gMaUeMDZGVQOjgIDuxRBRXy7jU8e8Mc/Saq3hCLJon4SL1nOOhhtDtdsLqUyMoi41ROrwzIqMQu1w9XmzoNQ= 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 1732203883420202.38047344647475; Thu, 21 Nov 2024 07:44:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9M0-0002fd-2i; Thu, 21 Nov 2024 10:44:24 -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 1tE9Lx-0002bP-5V for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:21 -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 1tE9Lv-00015c-K7 for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:20 -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-584-PTtEFarwO6e5dqT1A9266Q-1; Thu, 21 Nov 2024 10:44:15 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 20B7C1956095; Thu, 21 Nov 2024 15:44:14 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C68191956086; Thu, 21 Nov 2024 15:44:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203858; 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=0txKiQWpxyguRebXD1DZVJACnLLYk3HWNLZCDAk2wrg=; b=XQY6tPxmR8ZFU+UIssbHFCdscqDtdX6lf3jfXVgcmNuPvzgiYTOaSRdByFwIX0Qjhl9fDO RQXAkahULljFMQhTv8ZfiMPRksB9inR5dKVGGWtE+2gG0Ohw/CySAGg+NbnrW/MRaeNavx qwVWh+l4cL/zQIPfGMEJASIKXNGsO0o= X-MC-Unique: PTtEFarwO6e5dqT1A9266Q-1 X-Mimecast-MFC-AGG-ID: PTtEFarwO6e5dqT1A9266Q 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 17/18] tests/functional: add a QMP backdoor for debugging stalled tests Date: Thu, 21 Nov 2024 15:42:17 +0000 Message-ID: <20241121154218.1423005-18-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732203885475116600 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 --- 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..fceafb32b0 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) + + sockpath =3D os.environ.get("QEMU_TEST_QMP_BACKDOOR", None) + if sockpath is not None: + vm.add_args("-chardev", + f"socket,id=3Dbackdoor,path=3D{sockpath},server=3D= on,wait=3Doff", + "-mon", "chardev=3Dbackdoor,mode=3Dcontrol") + if args: vm.add_args(*args) return vm --=20 2.46.0 From nobody Sat Nov 23 14:42:53 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=1732204048; cv=none; d=zohomail.com; s=zohoarc; b=gFA2PPChBdFur6lxOWRNxxvJasMzlWMItF+DX7QUObX8ijrtKA7BUMPUgB5KB0u6XNEw96TAQrrBVGHeD4uCCcXwNPvUhxhW8DOdsVv7QMYl4f+UlJPXwG64+PMJeI/w7MxBVMxhPM1qaPSPwEJlZ9PSodxwP/k693pNiBfj5F8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1732204048; 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=4o2627Pv281jHR5jT1wzLohzuANcHdD2eDSgD0ejj/s=; b=IzDClSyxU+M9/GnXEe+u3iCMh15PGHqZ/Q7mDqTL9P8AG/pvGJlOFWU8h7UjqJoPHfhkhSuhM2yKUItslR3XYQvLdjBbsmH0gThLFJf5xNY06GVC7a0NY3GhsLtWQFhV6sOiYslBj+K1p1QSjd1EaJ7jEwilMAPIPim4C9DcmS4= 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 1732204048387155.86949615790172; Thu, 21 Nov 2024 07:47:28 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tE9ME-00037C-Lz; Thu, 21 Nov 2024 10:44:39 -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 1tE9M5-00030b-Gd for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:30 -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 1tE9M4-00016j-2J for qemu-devel@nongnu.org; Thu, 21 Nov 2024 10:44:29 -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-279-x7PzkhrnOO2Tbd3TVtudsg-1; Thu, 21 Nov 2024 10:44:22 -0500 Received: from mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.15]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2D1A01953940; Thu, 21 Nov 2024 15:44:21 +0000 (UTC) Received: from toolbox.redhat.com (unknown [10.42.28.5]) by mx-prod-int-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id A2E211955F43; Thu, 21 Nov 2024 15:44:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1732203867; 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=4o2627Pv281jHR5jT1wzLohzuANcHdD2eDSgD0ejj/s=; b=IlGL50wrgYa9GzmctzfIMeAeZOHuQTwRj8zvEQ11xwO4orehalpsGtylLqKsfIvmr9UA9R ocvhzJ5zlW4yES3wkpEx16mOyYg3GeBrnzGCh6+MdYVfQOpEVbdn1A0Jfe/y9TNMi5bvYo oOY24q9lXEqXQP4oFFUGEMA05cyFuM8= X-MC-Unique: x7PzkhrnOO2Tbd3TVtudsg-1 X-Mimecast-MFC-AGG-ID: x7PzkhrnOO2Tbd3TVtudsg 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?= , Peter Maydell , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Subject: [PATCH v2 18/18] tests/functional: avoid accessing log_filename on earlier failures Date: Thu, 21 Nov 2024 15:42:18 +0000 Message-ID: <20241121154218.1423005-19-berrange@redhat.com> In-Reply-To: <20241121154218.1423005-1-berrange@redhat.com> References: <20241121154218.1423005-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.15 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.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_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_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: 1732204050220116600 If a failure occurs early in the QemuBaseTest constructor, the 'log_filename' object atttribute may not exist yet. This happens most notably if the QEMU_TEST_QEMU_BINARY is not set. We can't initialize 'log_filename' earlier as we use the binary to identify the architecture which is then used to build the path in which the logs are stored. Signed-off-by: Daniel P. Berrang=C3=A9 --- tests/functional/qemu_test/testcase.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/functional/qemu_test/testcase.py b/tests/functional/qemu= _test/testcase.py index fceafb32b0..90ae59eb54 100644 --- a/tests/functional/qemu_test/testcase.py +++ b/tests/functional/qemu_test/testcase.py @@ -81,10 +81,12 @@ def main(): res =3D unittest.main(module =3D None, testRunner =3D tr, exit =3D= False, argv=3D["__dummy__", path]) for (test, message) in res.result.errors + res.result.failures: - print('More information on ' + test.id() + ' could be found he= re:' - '\n %s' % test.log_filename, file=3Dsys.stderr) - if hasattr(test, 'console_log_name'): - print(' %s' % test.console_log_name, file=3Dsys.stderr) + + if hasattr(test, "log_filename"): + print('More information on ' + test.id() + ' could be foun= d here:' + '\n %s' % test.log_filename, file=3Dsys.stderr) + if hasattr(test, 'console_log_name'): + print(' %s' % test.console_log_name, file=3Dsys.stderr) sys.exit(not res.result.wasSuccessful()) =20 =20 --=20 2.46.0