From nobody Mon Feb 9 03:17:39 2026 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=1653523952; cv=none; d=zohomail.com; s=zohoarc; b=A2bsYpKA9/iVKMVOW4EzB5ExkmyEED5ZWmOhcxziGuzcEgG0fXKdKoneSWvGHBcC1H3zFu6HuwtzxfNF+GDJ6NIGwY+jOiidbSC0HQPSPRt2DmlZVre6Z+3d299OjeioYj4HHs6ahOrNWcdrPu6Nezs5Myw5buVF4hJs+17bOKg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653523952; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kDuOKtE6+qQIoSPWbC1zPXw42HvD7oDf0nRn4pZehNE=; b=Rdg6rarByJJUOCgncHiqQo2VdoQq6GJJQgPy46jpt6HbjiruhFQL45e7hLdTzHYSGD8gdlHjsn2QPwq2/hP8dgOEk4ven0sxHl9CkAklk3RbcFl9At/H93ECw4RbD9R/Sbjm/yDxjiQQS2qmZAU8x8scY6kpDKZBMM5ZNs3uYnc= 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 1653523952798614.3083589393623; Wed, 25 May 2022 17:12:32 -0700 (PDT) Received: from localhost ([::1]:40502 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu179-0006bH-4Y for importer@patchew.org; Wed, 25 May 2022 20:12:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59290) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14N-0003o1-Jr for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:39 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:42127) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14K-0002ix-IJ for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:38 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-663-XkdzROHVP6S8VrXbd5Veog-1; Wed, 25 May 2022 20:09:30 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 432CD3C10140; Thu, 26 May 2022 00:09:30 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 583352166B26; Thu, 26 May 2022 00:09:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523771; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kDuOKtE6+qQIoSPWbC1zPXw42HvD7oDf0nRn4pZehNE=; b=edt7ZMrp0kF7YV2WLbbOHo/fUPuG1UtnBiXW79QE//X1gB2vvYkQP0Ej++5Ba9XeYiYX6o rpSgE0DrVPRRH55WlSmpc/q932lapo8RwKlL6ZiHJXI5rJZ4Jdh9BDqQgMF9akNW8eFXWq nNI3p4/BsNeMM2UKxBX8vHMiFdntr1M= X-MC-Unique: XkdzROHVP6S8VrXbd5Veog-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 1/9] python: update for mypy 0.950 Date: Wed, 25 May 2022 20:09:13 -0400 Message-Id: <20220526000921.1581503-2-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653523953529100001 Content-Type: text/plain; charset="utf-8" typeshed (included in mypy) recently updated to improve the typing for WriteTransport objects. I was working around this, but now there's a version where I shouldn't work around it. Unfortunately this creates some minor ugliness if I want to support both pre- and post-0.950 versions. For now, for my sanity, just disable the unused-ignores warning. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- python/qemu/qmp/util.py | 4 +++- python/setup.cfg | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/python/qemu/qmp/util.py b/python/qemu/qmp/util.py index eaa5fc7d5f9..ca6225e9cda 100644 --- a/python/qemu/qmp/util.py +++ b/python/qemu/qmp/util.py @@ -40,7 +40,9 @@ async def flush(writer: asyncio.StreamWriter) -> None: drain. The flow control limits are restored after the call is completed. """ - transport =3D cast(asyncio.WriteTransport, writer.transport) + transport =3D cast( # type: ignore[redundant-cast] + asyncio.WriteTransport, writer.transport + ) =20 # https://github.com/python/typeshed/issues/5779 low, high =3D transport.get_write_buffer_limits() # type: ignore diff --git a/python/setup.cfg b/python/setup.cfg index e877ea56475..c2c61c75190 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -79,6 +79,7 @@ strict =3D True python_version =3D 3.6 warn_unused_configs =3D True namespace_packages =3D True +warn_unused_ignores =3D False =20 [mypy-qemu.utils.qom_fuse] # fusepy has no type stubs: --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653523958; cv=none; d=zohomail.com; s=zohoarc; b=KU8SMeSDlV5oevcrZeLCc3Id5xdajp2hvC2kXvFkhcYgkskOUlSEToqNAHVxjeM1dW2rzT8PEoDzM2nHbtDRQfH50QOOssPoxNFp9ZGwgW8eB9ZW798/f3447twZ+8xxr3kxbf2vwzON2pRt+rBjOLfyIfT2I8yFfixs018fhSs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653523958; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sxFlhcWr88+2F/P4eqvu+xkMWXjv19qulamy6vzPyZM=; b=nOuEPrpvJso5JbvYBBs97bFjjcNtj7yzI4t/gAEiYJRYA9H/lKpfSrUsCcG40+YJZiuMMUDNeON02vSXkUWp12moN/9tjRYe5C0Kizkgz7Y8YjSCjSaJ0oYeXFIJIUG16uJqU/3Okx2mbAiSv6HHI8YJ6ziavXduq8fbevvLVC8= 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 1653523958466980.641884391173; Wed, 25 May 2022 17:12:38 -0700 (PDT) Received: from localhost ([::1]:40560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu17F-0006dC-0l for importer@patchew.org; Wed, 25 May 2022 20:12:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59310) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14O-0003oB-5i for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:40 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:28975) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14M-0002jS-Ko for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:39 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-605-1fdtMam4N6e7HyygcL0ghg-1; Wed, 25 May 2022 20:09:34 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6DBD81C06ECC; Thu, 26 May 2022 00:09:34 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 70AE92166B26; Thu, 26 May 2022 00:09:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523778; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sxFlhcWr88+2F/P4eqvu+xkMWXjv19qulamy6vzPyZM=; b=BDpqih19n1bMWz4TKYfyExKPS8zD3eIEoL7ML8+1kdGWClVFrNrLtRv45HmyqtxhnH8wEu acJX6RTclm71FxwTvNek6GUIWXXv07BEGaODcKBBt0qR5Y3I+5TD9VVf+T/KqTAQ1/RoU3 7nbxP1w4TcZZMLNoZPcojSIjfp1DnEI= X-MC-Unique: 1fdtMam4N6e7HyygcL0ghg-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 2/9] tests: add "TESTS_PYTHON" variable to Makefile Date: Wed, 25 May 2022 20:09:14 -0400 Message-Id: <20220526000921.1581503-3-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653523959350100001 Content-Type: text/plain; charset="utf-8" This is a convenience feature: $(PYTHON) points to the Python executable we were instructed to use by the configure script. We use that Python to create a virtual environment with the "check-venv" target in tests/Makefile.include. $(TESTS_PYTHON) points to the Python executable belonging to the virtual environment tied to the build. This Python executable is a symlink to the binary used to create the venv, which will be the version provided at configure time. Using $(TESTS_PYTHON) therefore uses the $(PYTHON) executable, but with paths modified to use packages installed to the venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index ec84b2ebc04..146aaa96a00 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,6 +89,7 @@ TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.= fa, $(ninja-targets))) TESTS_VENV_DIR=3D$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=3D$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results +TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python ifndef AVOCADO_TESTS AVOCADO_TESTS=3Dtests/avocado endif @@ -108,7 +109,7 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(PYTHON) -m venv $@, \ VENV, $@) $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m pip -q install -r $(TESTS_VENV= _REQ), \ + $(TESTS_PYTHON) -m pip -q install -r $(TESTS_VENV_REQ), \ PIP, $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 @@ -126,7 +127,7 @@ FEDORA_31_DOWNLOAD=3D$(filter $(FEDORA_31_ARCHES),$(FED= ORA_31_ARCHES_CANDIDATES)) # download one specific Fedora 31 image get-vm-image-fedora-31-%: check-venv $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado vmimage get \ + $(TESTS_PYTHON) -m avocado vmimage get \ --distro=3Dfedora --distro-version=3D31 --arch=3D$*, \ "AVOCADO", "Downloading avocado tests VM image for $*") =20 @@ -135,7 +136,7 @@ get-vm-images: check-venv $(patsubst %,get-vm-image-fed= ora-31-%, $(FEDORA_31_DOW =20 check-avocado: check-venv $(TESTS_RESULTS_DIR) get-vm-images $(call quiet-command, \ - $(TESTS_VENV_DIR)/bin/python -m avocado \ + $(TESTS_PYTHON) -m avocado \ --show=3D$(AVOCADO_SHOW) run --job-results-dir=3D$(TESTS_RESUL= TS_DIR) \ $(if $(AVOCADO_TAGS),, --filter-by-tags-include-empty \ --filter-by-tags-include-empty-key) \ --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524197; cv=none; d=zohomail.com; s=zohoarc; b=bUDnUhe0zqUBV+NcpbnIjd8MEArJUJeX/HrjSS0enOxb9wq/S3wEwmsmlXMXLPcUQ32GqNsg0uo3ykEyGBHKVJD2MHzrihx21Z1DETEMf5xBtOoQiHidQtARERfK2BWcYPvdz/kL2eHDr1LGBbaE2Jz/PcTMGewPP5we0OO7TYw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524197; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=sckdO4X0++O9JpOUfPVVoZ175BD4ZxFmtzBBdGsyXiY=; b=aNs6zZPi7p5JPm/K38vQTuwdZ5AA06B/eAcnc2FeH1DW4mZ7UJmCyUISNmPqTNwFBeKQBRoWaB+QM/Erc+3ADEbVrKnuIEumY/dyM8E46ezGulqCtSFF57661u4ORhup8P471ICp6tuEHJ3T3S02RS0km4BCwwDRB/Z2TR710s0= 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 1653524197446498.96615908648266; Wed, 25 May 2022 17:16:37 -0700 (PDT) Received: from localhost ([::1]:48362 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1B6-0003we-FH for importer@patchew.org; Wed, 25 May 2022 20:16:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59326) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14Q-0003pq-8S for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:42 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:31983) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14O-0002jw-Ke for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:41 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-617--fxwEmj_P2Cjeod7UC4mBg-1; Wed, 25 May 2022 20:09:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6B0EB85A5BC; Thu, 26 May 2022 00:09:36 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7B97F2166B26; Thu, 26 May 2022 00:09:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523780; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=sckdO4X0++O9JpOUfPVVoZ175BD4ZxFmtzBBdGsyXiY=; b=PBluUTAUGInzvWKGjVTL+kdolBAu4vGNJ4CiVJ7f6NVUHo4nFCbH6Vt63LG1Ve8dHnTGTd eYXhhpiEypL0WVXz3HdhM7wF6D07vTD0bnn0sQVhApA/LkR+JcEhDlGGQyt8dnwl/4RYd5 ujsU441YgTOuZMfhGeIAtT5w2X0t06M= X-MC-Unique: -fxwEmj_P2Cjeod7UC4mBg-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 3/9] tests: use python3 as the python executable name Date: Wed, 25 May 2022 20:09:15 -0400 Message-Id: <20220526000921.1581503-4-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524198302100003 Content-Type: text/plain; charset="utf-8" Use "python3" instead of "python" as per PEP0394: https://peps.python.org/pep-0394/ This should always be defined (in a venv, at least!), matching the preferred python shebang of "#!/usr/bin/env python3". Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 146aaa96a00..f68adda0650 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -89,7 +89,7 @@ TARGETS=3D$(patsubst libqemu-%.fa, %, $(filter libqemu-%.= fa, $(ninja-targets))) TESTS_VENV_DIR=3D$(BUILD_DIR)/tests/venv TESTS_VENV_REQ=3D$(SRC_PATH)/tests/requirements.txt TESTS_RESULTS_DIR=3D$(BUILD_DIR)/tests/results -TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python +TESTS_PYTHON=3D$(TESTS_VENV_DIR)/bin/python3 ifndef AVOCADO_TESTS AVOCADO_TESTS=3Dtests/avocado endif --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524203; cv=none; d=zohomail.com; s=zohoarc; b=BweqOyMKQuXvF6cCudTXpnNxkHc82ti/n1FqnBUPbQekJMU9JRMYSMkNcetFrmKJ89TlM2Csk3e43FhmiEw+i56EBrtumxTaRHhPQjPC16rmuNeDiAAWuOvY9bbEUYoyZsvGMFc5tMF8TaliQ4Bqm6mn7Zc1gYzInLMtqz8U054= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524203; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=FpKyKyy1++CYoyet0S+CmrLnGlSAzJs39FlCCySxBEY=; b=PekdqCz7bvdizVV0OD/1IrQUunFC8nfaKIjTfW2mv16xSQSix4qQT9eCuTZ1Xa66lC0Vokh/Exnyy5nzMa4aTroXZZDCRoGkcSJd8QWaBZEuNJRac46a2/S/s3bUSPk110PAfQ3hSIkv3hAxKTYn62mOiW79Oo+x6+/T+he4dk8= 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 1653524203969422.8137965614419; Wed, 25 May 2022 17:16:43 -0700 (PDT) Received: from localhost ([::1]:48576 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1BC-00045J-VA for importer@patchew.org; Wed, 25 May 2022 20:16:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59344) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14V-0003wp-KX for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:47 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59573) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14U-0002kc-53 for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:47 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-400-Hx4uENh8ONKSytMbo1YWjw-1; Wed, 25 May 2022 20:09:40 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 84286185A7A4; Thu, 26 May 2022 00:09:40 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id E6CB22166B26; Thu, 26 May 2022 00:09:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523785; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FpKyKyy1++CYoyet0S+CmrLnGlSAzJs39FlCCySxBEY=; b=VUHImtYVGBPupY2F1jq0Ik7TP0N+LwItoOFmuW8v0QrDVvvfS4Ro7W7RJ1lWAdAMAMrdSm soV1bn9XuBOhHIyriKx3SWXlIrtrQ6CpDgcUoXEl7FPHF/plw/e6cSU0X31D1t0lp1MP7L 5olE85GdQDpJMQ1KWjxacqL2CndeKhI= X-MC-Unique: Hx4uENh8ONKSytMbo1YWjw-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 4/9] tests: silence pip upgrade warnings during venv creation Date: Wed, 25 May 2022 20:09:16 -0400 Message-Id: <20220526000921.1581503-5-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@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.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524204358100001 Content-Type: text/plain; charset="utf-8" Turn off the nag warning coaxing us to upgrade pip. It's not really that interesting to see in CI logs, and as long as nothing is broken -- nothing is broken. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index f68adda0650..839ffde876a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -109,8 +109,8 @@ $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(PYTHON) -m venv $@, \ VENV, $@) $(call quiet-command, \ - $(TESTS_PYTHON) -m pip -q install -r $(TESTS_VENV_REQ), \ - PIP, $(TESTS_VENV_REQ)) + $(TESTS_PYTHON) -m pip -q --disable-pip-version-check install \ + -r $(TESTS_VENV_REQ), PIP, $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 $(TESTS_RESULTS_DIR): --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653523966; cv=none; d=zohomail.com; s=zohoarc; b=VXt2cdlPbCf430hHgbfUYGTeNNYS0BP99DccD1m7/etv/7u46jHjoYU1ZKB8FUmEOCUzKBJAnvd/dg2RP2DDNcsaAHmsInT0Y6zI3CbFRjsxebrsomD6CO0ZfaeALLN7MfkJovoeYosJ18Abx+Nq5ryoWvtLbXZ93JsISl1BJuw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653523966; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=8RCADafxOL9O4NGYW4u2gnWUWodYX0xwc7Wc9//3bmM=; b=VB8HHmr9VFHJkFlF1h04B9CuX3p1bLMybZwRVVDRDamkK7b31OP1XOzLjB/H/76yokiW519WFNOtO793t7mJz1kv2qbvP3WeyGXQUw4ihkzQ8h1oPMsKd/thHIe4Uyj2k58MNHIE1XIrpAL6PzL8CcExr6jKQWIIOVKvZZFvbVA= 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 1653523966036324.7023150019709; Wed, 25 May 2022 17:12:46 -0700 (PDT) Received: from localhost ([::1]:41020 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu17M-0006xa-Fl for importer@patchew.org; Wed, 25 May 2022 20:12:44 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59360) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14Y-00041k-Dn for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60649) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14V-0002m3-TJ for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:50 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-100-SXi2yjN7P3uLB60dISTrDg-1; Wed, 25 May 2022 20:09:44 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 954983C10140; Thu, 26 May 2022 00:09:43 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id D34292166B26; Thu, 26 May 2022 00:09:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8RCADafxOL9O4NGYW4u2gnWUWodYX0xwc7Wc9//3bmM=; b=hjZWZ5up2ukEGFXabGcUfwblXhC4ZCFYrSvpDzWQG+oyktyxasHJJUYtJDiWJLp02cCM/z fI3ZLkbhZWy5RtNlWqROGEpuqVspYpVgv9RpfQatvbB8efKSToM4NUpmudEN7JuJM7g0AH OzEjCapvHi8hcHB8mLj142LlAozEwvI= X-MC-Unique: SXi2yjN7P3uLB60dISTrDg-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 5/9] tests: add quiet-venv-pip macro Date: Wed, 25 May 2022 20:09:17 -0400 Message-Id: <20220526000921.1581503-6-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@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.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653523967369100001 Content-Type: text/plain; charset="utf-8" Factor out the "test venv pip" macro; rewrite the "check-venv" rule to be a little more compact. Replace the "PIP" pseudo-command output with "VENVPIP" to make it 1% more clear that we are talking about using pip to install something into a venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 839ffde876a..052d7f56e9a 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -104,13 +104,13 @@ else AVOCADO_CMDLINE_TAGS=3D$(addprefix -t , $(AVOCADO_TAGS)) endif =20 +quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run, \ + $(TESTS_PYTHON) -m pip -q --disable-pip-version-check $1, \ + "VENVPIP","$1") + $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) - $(call quiet-command, \ - $(PYTHON) -m venv $@, \ - VENV, $@) - $(call quiet-command, \ - $(TESTS_PYTHON) -m pip -q --disable-pip-version-check install \ - -r $(TESTS_VENV_REQ), PIP, $(TESTS_VENV_REQ)) + $(call quiet-command, $(PYTHON) -m venv $@, VENV, $@) + $(call quiet-venv-pip,install -r $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 $(TESTS_RESULTS_DIR): --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524373; cv=none; d=zohomail.com; s=zohoarc; b=a/NgwdEbtXDxTLZpWAEtWerSDDfDcKo7AhQi8apmNUdt1lYBHMqEHJqBFzbq7Su8BSnXjLDIsv98k3LG3r1+cr0/VufdtEWCy6HpU1HxGbgX4wn2BIJww70+dlc0EALS8HJ5C6DkCNSSaMUvOJbHu+HgcNGbUMxle4BfbWXidEE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524373; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hTN//+wThdomjVilZtFXvDCc4y4DuGuwH/Kg776uXR0=; b=Mum9eWgSFQfDa+h/jfr0vozO578/rrZXs+5qGvp7Ielw1P8pIT002NgETzoc5e6QWoRF3BtWW8wJQprc+cZi5hd5LCCcaOXFd4kx84Or4uqHxn8k3kZZCwFxazElSxbtrjb483KaPPT/XQUIcYHjw07DyhtfeDyOIusMa+is97E= 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 165352437363819.24485165608644; Wed, 25 May 2022 17:19:33 -0700 (PDT) Received: from localhost ([::1]:53892 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1Dw-0007ij-6V for importer@patchew.org; Wed, 25 May 2022 20:19:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59384) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14d-0004BE-08 for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:55 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:34625) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14b-0002ms-4v for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:54 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-499-DJY5fEKQP3aka6TxJ7TaXA-1; Wed, 25 May 2022 20:09:49 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E5E77804191; Thu, 26 May 2022 00:09:48 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 510AC2166B29; Thu, 26 May 2022 00:09:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523792; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hTN//+wThdomjVilZtFXvDCc4y4DuGuwH/Kg776uXR0=; b=MBfQJCpD1fiF/bnV+CsPz8s2wgwtsMhh2P0edEEVLZZdSd9O5/Kg0sYrnYTP+GA2utcQxa kGLoQn0RyMpKT7DM4n3TUv1ioryVYTHcEGXLi92fYq2Xw/Dz8siO11N3Yypu+p9UGGCLmo jHO8/z/GOl91XKSZcYwzvDEzt7ISZBk= X-MC-Unique: DJY5fEKQP3aka6TxJ7TaXA-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 6/9] tests: install "qemu" namespace package into venv Date: Wed, 25 May 2022 20:09:18 -0400 Message-Id: <20220526000921.1581503-7-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524375502100001 Content-Type: text/plain; charset="utf-8" This patch adds the "qemu" namespace package to the $build/tests/venv directory. It does so in "editable" mode, which means that changes to the source python directory will actively be reflected by the venv. This patch also then removes any sys.path hacking from the avocado test scripts directly. By doing this, the environment of where to find these packages is managed entirely by the virtual environment and not by the scripts themselves. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/Makefile.include | 1 + tests/avocado/avocado_qemu/__init__.py | 11 +++++------ tests/avocado/virtio_check_params.py | 1 - tests/avocado/virtio_version.py | 1 - tests/requirements.txt | 1 + 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/Makefile.include b/tests/Makefile.include index 052d7f56e9a..d13a3403e9f 100644 --- a/tests/Makefile.include +++ b/tests/Makefile.include @@ -110,6 +110,7 @@ quiet-venv-pip =3D $(quiet-@)$(call quiet-command-run, \ =20 $(TESTS_VENV_DIR): $(TESTS_VENV_REQ) $(call quiet-command, $(PYTHON) -m venv $@, VENV, $@) + $(call quiet-venv-pip,install -e "$(SRC_PATH)/python/") $(call quiet-venv-pip,install -r $(TESTS_VENV_REQ)) $(call quiet-command, touch $@) =20 diff --git a/tests/avocado/avocado_qemu/__init__.py b/tests/avocado/avocado= _qemu/__init__.py index 39f15c1d518..b656a70c55b 100644 --- a/tests/avocado/avocado_qemu/__init__.py +++ b/tests/avocado/avocado_qemu/__init__.py @@ -21,6 +21,11 @@ from avocado.utils import cloudinit, datadrainer, process, ssh, vmimage from avocado.utils.path import find_command =20 +from qemu.machine import QEMUMachine +from qemu.utils import (get_info_usernet_hostfwd_port, kvm_available, + tcg_available) + + #: The QEMU build root directory. It may also be the source directory #: if building from the source dir, but it's safer to use BUILD_DIR for #: that purpose. Be aware that if this code is moved outside of a source @@ -35,12 +40,6 @@ else: SOURCE_DIR =3D BUILD_DIR =20 -sys.path.append(os.path.join(SOURCE_DIR, 'python')) - -from qemu.machine import QEMUMachine -from qemu.utils import (get_info_usernet_hostfwd_port, kvm_available, - tcg_available) - =20 def has_cmd(name, args=3DNone): """ diff --git a/tests/avocado/virtio_check_params.py b/tests/avocado/virtio_ch= eck_params.py index e869690473a..4093da8a674 100644 --- a/tests/avocado/virtio_check_params.py +++ b/tests/avocado/virtio_check_params.py @@ -22,7 +22,6 @@ import re import logging =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) from qemu.machine import QEMUMachine from avocado_qemu import QemuSystemTest from avocado import skip diff --git a/tests/avocado/virtio_version.py b/tests/avocado/virtio_version= .py index 208910bb844..c84e48813a1 100644 --- a/tests/avocado/virtio_version.py +++ b/tests/avocado/virtio_version.py @@ -11,7 +11,6 @@ import sys import os =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) from qemu.machine import QEMUMachine from avocado_qemu import QemuSystemTest =20 diff --git a/tests/requirements.txt b/tests/requirements.txt index a21b59b4439..0ba561b6bdf 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,5 +1,6 @@ # Add Python module requirements, one per line, to be installed # in the tests/venv Python virtual environment. For more info, # refer to: https://pip.pypa.io/en/stable/user_guide/#id1 +# Note that qemu.git/python/ is always implicitly installed. avocado-framework=3D=3D88.1 pycdlib=3D=3D1.11.0 --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524195; cv=none; d=zohomail.com; s=zohoarc; b=ZoQP4+wkonN/xwoTo16xinJNcDrsyLukZ8KjK34qPiol1qFUgVCy0bogBGbMSnakg9ofBylGkioUMSZynsha8xVY8R7JrO1K0dhQExc/BCClCJucMu5ZYkINJzaapb2qsCHoegH9DXKEtkKghcbqrYQNz2we/uvAYWRx3DAw2zc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524195; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=/Q+vpNPXyD/ja1n84ll0U/iteW3gWbU5rSV97kLzbnc=; b=KA/m+5KpxB1LZVEH5PmAOK23bkC2QTLjMkK2rh4qugYYxOKAEyAmoqr+L7Zdj6KZDAstPWQ7xEJCG5zfBPkILzKbSqeQKvFCPA3llK0wp5sQreXPG76n3C0d8i9nanUmUzHCHtJjZ+VZjQJ1pUELZTVdSJ95yMEbI0BolNJ2Td8= 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 1653524195419572.4000529386965; Wed, 25 May 2022 17:16:35 -0700 (PDT) Received: from localhost ([::1]:48304 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1B3-0003uW-Ve for importer@patchew.org; Wed, 25 May 2022 20:16:34 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59398) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14f-0004Gr-BC for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:57 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31920) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14c-0002n8-P2 for qemu-devel@nongnu.org; Wed, 25 May 2022 20:09:57 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-148-ms8EyKNjNAazZcd1cvluLA-1; Wed, 25 May 2022 20:09:53 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AB225101A54E; Thu, 26 May 2022 00:09:52 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C7FD2166B26; Thu, 26 May 2022 00:09:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523794; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/Q+vpNPXyD/ja1n84ll0U/iteW3gWbU5rSV97kLzbnc=; b=TRp7q4xMhmXykNtBxErzfiX2oJe5e5dPP7hdqQKWnD22SwnB/v+KXT30njzgz6mHpZ7gws ojB1Jp+VcE0rIM2hjuYnTUUZ82+v3a0QRFDwEXoxR3M4kbZxxWZehvczZIUaJbU+eZXIuv 6on99MTs+QT5RIdH8ToyCQ9HoagfHVw= X-MC-Unique: ms8EyKNjNAazZcd1cvluLA-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 7/9] tests: use tests/venv to run basevm.py-based scripts Date: Wed, 25 May 2022 20:09:19 -0400 Message-Id: <20220526000921.1581503-8-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@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.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524196342100001 Content-Type: text/plain; charset="utf-8" This patch co-opts the virtual environment being used by avocado tests to also run the basevm.py tests. This is being done in preparation for for the qemu.qmp package being removed from qemu.git. As part of the change, remove any sys.path() hacks and treat "qemu" as a normal third-party import. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/vm/Makefile.include | 13 +++++++------ tests/vm/basevm.py | 6 +++--- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index ae91f5043e5..588bc999cc9 100644 --- a/tests/vm/Makefile.include +++ b/tests/vm/Makefile.include @@ -84,10 +84,11 @@ vm-clean-all: =20 $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ $(SRC_PATH)/tests/vm/basevm.py \ - $(SRC_PATH)/tests/vm/Makefile.include + $(SRC_PATH)/tests/vm/Makefile.include \ + check-venv @mkdir -p $(IMAGES_DIR) $(call quiet-command, \ - $(PYTHON) $< \ + $(TESTS_PYTHON) $< \ $(if $(V)$(DEBUG), --debug) \ $(if $(GENISOIMAGE),--genisoimage $(GENISOIMAGE)) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ @@ -101,9 +102,9 @@ $(IMAGES_DIR)/%.img: $(SRC_PATH)/tests/vm/% \ =20 =20 # Build in VM $(IMAGE) -vm-build-%: $(IMAGES_DIR)/%.img +vm-build-%: $(IMAGES_DIR)/%.img check-venv $(call quiet-command, \ - $(PYTHON) $(SRC_PATH)/tests/vm/$* \ + $(TESTS_PYTHON) $(SRC_PATH)/tests/vm/$* \ $(if $(V)$(DEBUG), --debug) \ $(if $(DEBUG), --interactive) \ $(if $(J),--jobs $(J)) \ @@ -127,9 +128,9 @@ vm-boot-serial-%: $(IMAGES_DIR)/%.img -device virtio-net-pci,netdev=3Dvnet \ || true =20 -vm-boot-ssh-%: $(IMAGES_DIR)/%.img +vm-boot-ssh-%: $(IMAGES_DIR)/%.img check-venv $(call quiet-command, \ - $(PYTHON) $(SRC_PATH)/tests/vm/$* \ + $(TESTS_PYTHON) $(SRC_PATH)/tests/vm/$* \ $(if $(J),--jobs $(J)) \ $(if $(V)$(DEBUG), --debug) \ $(if $(QEMU_LOCAL),--build-path $(BUILD_DIR)) \ diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 254e11c932b..d7d0413df35 100644 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -18,9 +18,6 @@ import logging import time import datetime -sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', 'pytho= n')) -from qemu.machine import QEMUMachine -from qemu.utils import get_info_usernet_hostfwd_port, kvm_available import subprocess import hashlib import argparse @@ -31,6 +28,9 @@ import traceback import shlex =20 +from qemu.machine import QEMUMachine +from qemu.utils import get_info_usernet_hostfwd_port, kvm_available + SSH_KEY_FILE =3D os.path.join(os.path.dirname(__file__), "..", "keys", "id_rsa") SSH_PUB_KEY_FILE =3D os.path.join(os.path.dirname(__file__), --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524571; cv=none; d=zohomail.com; s=zohoarc; b=HCJGDejMRaMjgiEk7MU/oU1k/0b0Un/xSAfXzURsudWuje/5jwpH+0RO0vqt+px3Bf5y4ugMoLO5ir75MfacGP/kdhLv6PV9yiHi8bYkufbYMtSrsMP8nW45h1/jjLQMLxm/ggW+Wk36qG+t4iE9tCMhj2In/lH4mE7hV9KvMXQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524571; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=pu3L2Xs6JpLOfbtjSmWSAbei9Q1pqINHSalLJ6h7UYo=; b=cVz0HOVKVPT3Zf/gcnZ3wxEseoGsx4ul1NZoxa9ArkASZAB5AhyxcVRFReQWNjdb6t+tCw8+MfHIROn1fdj3/DB2Ugzipamjkv8Yb7rY3NTTprIAOCwAwN2fKhOYND063cYNUwfyr/crs1srgyVNT353Oa2tg2EXvJc2DKIEMVY= 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 1653524571332114.44004485967707; Wed, 25 May 2022 17:22:51 -0700 (PDT) Received: from localhost ([::1]:58380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1H7-0002YD-VM for importer@patchew.org; Wed, 25 May 2022 20:22:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59436) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14l-0004L9-DP for qemu-devel@nongnu.org; Wed, 25 May 2022 20:10:05 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54068) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14j-0002nu-4I for qemu-devel@nongnu.org; Wed, 25 May 2022 20:10:02 -0400 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-481-TqaxrFmAMtSvhB_CbFsVQA-1; Wed, 25 May 2022 20:09:56 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2B3A829AB3FC; Thu, 26 May 2022 00:09:56 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1B49B2166B26; Thu, 26 May 2022 00:09:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523799; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=pu3L2Xs6JpLOfbtjSmWSAbei9Q1pqINHSalLJ6h7UYo=; b=BfdokEY2odpK1Xu/jj4kJUfmdE+1upEDlp9OPftfCujeUvCS2DQARTE5p5Tw9LtPEct7eu S/j0tJtgEn6tfLLHpVplZxxbMl9zOMgvXxCzRa9m4505joaIR5TzmrRnLpOSadOh/p1N04 S0/RyAxsHSef609XxS+wdHLVf86Nb8A= X-MC-Unique: TqaxrFmAMtSvhB_CbFsVQA-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 8/9] tests: add python3-venv to debian10.docker Date: Wed, 25 May 2022 20:09:20 -0400 Message-Id: <20220526000921.1581503-9-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524572000100001 Content-Type: text/plain; charset="utf-8" This is needed to be able to add a venv-building step to 'make check'; the clang-user job in particular needs this to be able to run check-unit. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- tests/docker/dockerfiles/debian10.docker | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/docker/dockerfiles/debian10.docker b/tests/docker/docker= files/debian10.docker index b414af1b9f7..03be9230664 100644 --- a/tests/docker/dockerfiles/debian10.docker +++ b/tests/docker/dockerfiles/debian10.docker @@ -34,4 +34,5 @@ RUN apt update && \ python3 \ python3-sphinx \ python3-sphinx-rtd-theme \ + python3-venv \ $(apt-get -s build-dep --arch-only qemu | egrep ^Inst | fgrep '[al= l]' | cut -d\ -f2) --=20 2.34.1 From nobody Mon Feb 9 03:17:39 2026 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=1653524378; cv=none; d=zohomail.com; s=zohoarc; b=RY+BkmHVrukgzovgdnjNJuyYzJSYkow9RUGsUKobj+q2577dE/c5E2GpSdcpvqjKaXR83C9fLAvFZdMgZygC3bmlnodYk/ClFqGsMneYjHJBcHOtOfFlry6EIhj568jdg+JreE43EavAsglvbOAzIGcu9qsqwI2nwm8NoSyg43U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1653524378; h=Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=wsN402XJZAoBatZg2kQedJ4YAU8Sr4zCzNOUnTdZ2fo=; b=fFCFXe6ucWLyd6Hdol6YABOHJN5SJ5aXZjcdKK8v652tgM4tGbWb0xnvXs6tjdD9SUV/9h+LIviqcxCYE7lfN/A0/4lGbOI3sWqWUeaeBDWmHmcPIfctoqrRiQZ+GjeP7VD2p9Ke6AKDPO6U5PFkNulDr/o5zt3g7L6J3uuJYN4= 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 1653524378605463.1848756562488; Wed, 25 May 2022 17:19:38 -0700 (PDT) Received: from localhost ([::1]:53926 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nu1E0-0007lW-KA for importer@patchew.org; Wed, 25 May 2022 20:19:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14p-0004M1-8Z for qemu-devel@nongnu.org; Wed, 25 May 2022 20:10:11 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59351) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nu14l-0002xe-PQ for qemu-devel@nongnu.org; Wed, 25 May 2022 20:10:06 -0400 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-556-n-ONPIoHNIi3v7W-mP00aA-1; Wed, 25 May 2022 20:09:59 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 76803811E76; Thu, 26 May 2022 00:09:59 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.16.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73B162166B26; Thu, 26 May 2022 00:09:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1653523803; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wsN402XJZAoBatZg2kQedJ4YAU8Sr4zCzNOUnTdZ2fo=; b=OoXtYlrZab35pL+PptZQqd82jffP3uOYy+EgIr1OAog+wlgnIjbLEEe+leKSXvrRhKwCR/ uiG8VjH/bZkvUr98fF9kYaqgH6M4ZhWuCJjYAmR8DOXF474t+dCbn/K7vxY6pUtTXBegAl RcZ17bmbySBEV17xQG8SwFGpJHHgk9g= X-MC-Unique: n-ONPIoHNIi3v7W-mP00aA-1 From: John Snow To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Alex=20Benn=C3=A9e?= , Cleber Rosa , Paolo Bonzini , Thomas Huth , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Wainer dos Santos Moschetta , Daniel Berrange , Beraldo Leal , John Snow Subject: [PATCH 9/9] tests: run 'device-crash-test' from tests/venv Date: Wed, 25 May 2022 20:09:21 -0400 Message-Id: <20220526000921.1581503-10-jsnow@redhat.com> In-Reply-To: <20220526000921.1581503-1-jsnow@redhat.com> References: <20220526000921.1581503-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 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=jsnow@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.082, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1653524379445100001 Content-Type: text/plain; charset="utf-8" Remove the sys.path hacking from device-crash-test, and add in a little user-friendly message for anyone who was used to running this script directly from the source tree. Modify the GitLab job recipes to create the tests/venv first, then run device-crash-test from that venv. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini --- .gitlab-ci.d/buildtest.yml | 8 +++++--- scripts/device-crash-test | 14 +++++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/.gitlab-ci.d/buildtest.yml b/.gitlab-ci.d/buildtest.yml index e9620c30748..fde29c35aa3 100644 --- a/.gitlab-ci.d/buildtest.yml +++ b/.gitlab-ci.d/buildtest.yml @@ -110,7 +110,8 @@ crash-test-debian: IMAGE: debian-amd64 script: - cd build - - scripts/device-crash-test -q ./qemu-system-i386 + - make check-venv + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-i3= 86 =20 build-system-fedora: extends: .native_build_job_template @@ -155,8 +156,9 @@ crash-test-fedora: IMAGE: fedora script: - cd build - - scripts/device-crash-test -q ./qemu-system-ppc - - scripts/device-crash-test -q ./qemu-system-riscv32 + - make check-venv + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ppc + - tests/venv/bin/python3 scripts/device-crash-test -q ./qemu-system-ri= scv32 =20 build-system-centos: extends: .native_build_job_template diff --git a/scripts/device-crash-test b/scripts/device-crash-test index a203b3fdea2..73bcb986937 100755 --- a/scripts/device-crash-test +++ b/scripts/device-crash-test @@ -33,10 +33,18 @@ import re import random import argparse from itertools import chain +from pathlib import Path =20 -sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'python')) -from qemu.machine import QEMUMachine -from qemu.qmp import ConnectError +try: + from qemu.machine import QEMUMachine + from qemu.qmp import ConnectError +except ModuleNotFoundError as exc: + path =3D Path(__file__).resolve() + print(f"Module '{exc.name}' not found.") + print(" Try 'make check-venv' from your build directory,") + print(" and then one way to run this script is like so:") + print(f' > $builddir/tests/venv/bin/python3 "{path}"') + sys.exit(1) =20 logger =3D logging.getLogger('device-crash-test') dbg =3D logger.debug --=20 2.34.1