From nobody Thu May 16 16:45:18 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=1672866382; cv=none; d=zohomail.com; s=zohoarc; b=b2xQWT0sxXvEqwnVHmWz8TkTzISiEEWw0sfaxJNeDNYVdctwLzN3Guse05NBv0cda9AjEVxOIkO7qTPNa5Uue8/zQlKsoAgjyU0lugbCje+fohXvnyrhTovvkTykvx2qYHNf444c+B3ttFgJHlyRuPjIy7m1IJlaQvbie3YoKAA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672866382; 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=JVwcMgAU0Ai8S1janYtHFXg9vCkw1PnOecPUY3Z/KSI=; b=WZ2izSMB5qpfRFjcjdKYaO/B5cgPRyri9sOMGAvoqgdVADpj/+3ox/OS6R7QbDdkUDm67XkhS4YAA6D/RzGbn23RZNdOSr2mopSft1j9Ie3jLfjLgFUV8kXN7fWRwj2gt5BC8aXFnz5crNXQsk7OrI+o8+P8ZCAv8GvX7g+UrPs= 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 1672866382458733.5606184200942; Wed, 4 Jan 2023 13:06:22 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDAwj-0006aL-De; Wed, 04 Jan 2023 16:05: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 1pDAwh-0006Z6-65 for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:11 -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 1pDAwf-0006rO-Ff for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:10 -0500 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-441-hYZaXkB9O0CsxxPjOzW32w-1; Wed, 04 Jan 2023 16:04:57 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D3A6B101A521; Wed, 4 Jan 2023 21:04:56 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.34.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6FB392026D4B; Wed, 4 Jan 2023 21:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672866300; 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=JVwcMgAU0Ai8S1janYtHFXg9vCkw1PnOecPUY3Z/KSI=; b=UBLW67JfsM3adT8izzpCQE/kGRWjYzfj3yX3l8TcIx3xClir4sHkWMDwr/7OcaKt1jeKJm fmFL7fR86AbUmXsz5I6yVDjBDUtvraVcCwF/pRRyASKrr2c9BZHuj5buqpRNPVRXGAaBXC cc429k+71p7p/F7DXRgsSosG0ISRD/c= X-MC-Unique: hYZaXkB9O0CsxxPjOzW32w-1 From: John Snow To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Hanna Reitz , Eduardo Habkost , Markus Armbruster , Vladimir Sementsov-Ogievskiy , John Snow , Peter Maydell , Kevin Wolf , qemu-block@nongnu.org Subject: [PULL 1/5] python/machine: Add debug logging to key state changes Date: Wed, 4 Jan 2023 16:04:51 -0500 Message-Id: <20230104210455.571473-2-jsnow@redhat.com> In-Reply-To: <20230104210455.571473-1-jsnow@redhat.com> References: <20230104210455.571473-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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: 1672866383015100005 Content-Type: text/plain; charset="utf-8" When key decisions are made about the lifetime of the VM process being managed, there's no log entry. Juxtaposed with the very verbose runstate change logging of the QMP module, machine seems a bit too introverted now. Season the machine.py module with logging statements to taste to help make a tastier soup. Signed-off-by: John Snow --- python/qemu/machine/machine.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index 37191f433b2..6f1374a7550 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -373,6 +373,7 @@ def _post_shutdown(self) -> None: Called to cleanup the VM instance after the process has exited. May also be called after a failed launch. """ + LOG.debug("Cleaning up after VM process") try: self._close_qmp_connection() except Exception as err: # pylint: disable=3Dbroad-except @@ -497,6 +498,7 @@ def _early_cleanup(self) -> None: # for QEMU to exit, while QEMU is waiting for the socket to # become writable. if self._console_socket is not None: + LOG.debug("Closing console socket") self._console_socket.close() self._console_socket =3D None =20 @@ -507,6 +509,7 @@ def _hard_shutdown(self) -> None: :raise subprocess.Timeout: When timeout is exceeds 60 seconds waiting for the QEMU process to terminate. """ + LOG.debug("Performing hard shutdown") self._early_cleanup() self._subp.kill() self._subp.wait(timeout=3D60) @@ -523,8 +526,18 @@ def _soft_shutdown(self, timeout: Optional[int]) -> No= ne: :raise subprocess.TimeoutExpired: When timeout is exceeded waiting= for the QEMU process to terminate. """ + LOG.debug("Attempting graceful termination") + self._early_cleanup() =20 + if self._quit_issued: + LOG.debug( + "Anticipating QEMU termination due to prior 'quit' command= , " + "or explicit call to wait()" + ) + else: + LOG.debug("Politely asking QEMU to terminate") + if self._qmp_connection: try: if not self._quit_issued: @@ -536,6 +549,10 @@ def _soft_shutdown(self, timeout: Optional[int]) -> No= ne: self._close_qmp_connection() =20 # May raise subprocess.TimeoutExpired + LOG.debug( + "Waiting (timeout=3D%s) for QEMU process (pid=3D%s) to termina= te", + timeout, self._subp.pid + ) self._subp.wait(timeout=3Dtimeout) =20 def _do_shutdown(self, timeout: Optional[int]) -> None: @@ -553,6 +570,10 @@ def _do_shutdown(self, timeout: Optional[int]) -> None: try: self._soft_shutdown(timeout) except Exception as exc: + if isinstance(exc, subprocess.TimeoutExpired): + LOG.debug("Timed out waiting for QEMU process to exit") + LOG.debug("Graceful shutdown failed", exc_info=3DTrue) + LOG.debug("Falling back to hard shutdown") self._hard_shutdown() raise AbnormalShutdown("Could not perform graceful shutdown") \ from exc @@ -575,6 +596,10 @@ def shutdown(self, if not self._launched: return =20 + LOG.debug("Shutting down VM appliance; timeout=3D%s", timeout) + if hard: + LOG.debug("Caller requests immediate termination of QEMU proce= ss.") + try: if hard: self._user_killed =3D True --=20 2.39.0 From nobody Thu May 16 16:45:18 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=1672866433; cv=none; d=zohomail.com; s=zohoarc; b=TNTkIPS+YobPz8yCCwdKm6CJf4yxigybprsjoQXJ1IojMkdhBfDgycF3ElxnhfOaSVtvvFYJn3ft/bv/T+8pO9rGEkrqcGlOOxlJ9Z+ZkZlHO4AKOpme2tkKGTx8UQ4nORsnjsF9EcpwI2KwMXi10G2WmdJMSeEPHDhgQgs2sRI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672866433; 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=mTGbStfrdBXQmoQ58BKhfyAQyf1QHa4HSteui2Lm+kY=; b=cS6jBSojgj0XjGP72+L4bEeVbU0YEbfu8S7ZtAJUIbbS3QxyFt2n4t6Bj0WqJL4SLXjTn19xU8KWSfFYGu4yg+vIU8j+db11V5ceXCHpRnsqvjSHm0+HQEw0psdRZ6fS1jQ9/7lSq9h+icDrspHu3ID/zR3ffbDeDcDUoK5+rqQ= 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 1672866433533273.7520313642825; Wed, 4 Jan 2023 13:07:13 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDAwl-0006cF-4b; Wed, 04 Jan 2023 16:05:15 -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 1pDAwj-0006az-NZ for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:13 -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 1pDAwf-0006sn-H1 for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:13 -0500 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-58-8LDTRlLsMOq74CLYoOW3ew-1; Wed, 04 Jan 2023 16:04:58 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 92FA2101A5B4; Wed, 4 Jan 2023 21:04:57 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.34.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 27E432026D4B; Wed, 4 Jan 2023 21:04:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672866301; 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=mTGbStfrdBXQmoQ58BKhfyAQyf1QHa4HSteui2Lm+kY=; b=YKOMB+cKacvm8LHNQdA5q6mE5o4FYTJDujqMkWc20sAY0CIuS4n57uzm7JdByQYbdvXKbb iNI1A3XmfY4oX0imghjAzHiReAfyaFG99m056S4RSUtqsQX7J5YgmIFb5j6c00dVCw6Ife Uqx0CsAkLLE9UEmIl1/VNayEX2D7Apo= X-MC-Unique: 8LDTRlLsMOq74CLYoOW3ew-1 From: John Snow To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Hanna Reitz , Eduardo Habkost , Markus Armbruster , Vladimir Sementsov-Ogievskiy , John Snow , Peter Maydell , Kevin Wolf , qemu-block@nongnu.org Subject: [PULL 2/5] python/machine: Handle termination cases without QMP Date: Wed, 4 Jan 2023 16:04:52 -0500 Message-Id: <20230104210455.571473-3-jsnow@redhat.com> In-Reply-To: <20230104210455.571473-1-jsnow@redhat.com> References: <20230104210455.571473-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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: 1672866435194100007 Content-Type: text/plain; charset="utf-8" If we request a shutdown of a VM without a QMP console, we'll just hang waiting. Not ideal. Add in code that attempts graceful termination in these cases. Tested lightly; it appears to work and I doubt we rely on this case anywhere, but it's a corner you're allowed to wedge yourself in, so it should be handled. Signed-off-by: John Snow --- python/qemu/machine/machine.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/python/qemu/machine/machine.py b/python/qemu/machine/machine.py index 6f1374a7550..748a0d807c9 100644 --- a/python/qemu/machine/machine.py +++ b/python/qemu/machine/machine.py @@ -547,6 +547,12 @@ def _soft_shutdown(self, timeout: Optional[int]) -> No= ne: finally: # Regardless, we want to quiesce the connection. self._close_qmp_connection() + elif not self._quit_issued: + LOG.debug( + "Not anticipating QEMU quit and no QMP connection present,= " + "issuing SIGTERM" + ) + self._subp.terminate() =20 # May raise subprocess.TimeoutExpired LOG.debug( --=20 2.39.0 From nobody Thu May 16 16:45:18 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=1672866405; cv=none; d=zohomail.com; s=zohoarc; b=A8ycrN8UFPjg+hCo/PkaZrCnrU+MfyeE2cKrTBNqmjLkywmOPUVJhLHK+hxm4e59XS0VrJ31ZZ3YQFaCE/T2xMAwha00ETITOkJ9XoX5TG1A8OXdJ5kUkjxFeInJmvikFNBALzrgWMhk2LBlvWsbiib+0ISHob04uXDdHdMvTgA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672866405; 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=wxLFXI3d+CsCjwiMFNSRcCvAznjv574M8FZOwtR4Dhg=; b=Bw3GJMoVkSWBUYKTi2s1YLOHiVje1rYwo0z2sQWMvhjO19MyPZR3vLsqBFnRBB0FKf1+NVukwWq002UfwjJ8F+ZV+QFrijaS431uF3uQ0X8HEB5oOmPe61Hn5c/NTD797NixhmkLMC510wS9levJzj9QaDBMF0Oq8ydOIyRkWuw= 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 1672866405449532.2534815469027; Wed, 4 Jan 2023 13:06:45 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDAwj-0006b3-TH; Wed, 04 Jan 2023 16:05: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 1pDAwi-0006ZM-AJ for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:12 -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 1pDAwf-0006rC-G1 for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:12 -0500 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-580-qLHIxjnmPK-MHRcyNQvrRw-1; Wed, 04 Jan 2023 16:04:58 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 28D6287B2A1; Wed, 4 Jan 2023 21:04:58 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.34.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id A0DD02026D4B; Wed, 4 Jan 2023 21:04:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672866299; 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=wxLFXI3d+CsCjwiMFNSRcCvAznjv574M8FZOwtR4Dhg=; b=QjxwMi+vXSjfrJw35xBLu7SMD6uURKouhHbZonZcoNyeavrW7LlE3MXfzB3ovYorjAuB07 6SmrH4jUAcHqbHizWmHfWJciVv1LozReyFfl0HXLs3WoFZCErkaI+11cSVL73lRQoWoS5b Q8TKFlYKqP7nVrTe/plGIgHApuF03Do= X-MC-Unique: qLHIxjnmPK-MHRcyNQvrRw-1 From: John Snow To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Hanna Reitz , Eduardo Habkost , Markus Armbruster , Vladimir Sementsov-Ogievskiy , John Snow , Peter Maydell , Kevin Wolf , qemu-block@nongnu.org, Wilfred Mallawa Subject: [PULL 3/5] Python: fix flake8 config Date: Wed, 4 Jan 2023 16:04:53 -0500 Message-Id: <20230104210455.571473-4-jsnow@redhat.com> In-Reply-To: <20230104210455.571473-1-jsnow@redhat.com> References: <20230104210455.571473-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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: 1672866407055100003 Content-Type: text/plain; charset="utf-8" Newer flake8 versions are a bit pickier about the config file, and my in-line comment confuses the parser. Fix it. Signed-off-by: John Snow Reviewed-by: Wilfred Mallawa Message-id: 20221203005234.620788-2-jsnow@redhat.com Signed-off-by: John Snow --- python/setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/setup.cfg b/python/setup.cfg index c2c61c75190..c0d7bab168e 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -71,7 +71,8 @@ console_scripts =3D qmp-tui =3D qemu.qmp.qmp_tui:main [tui] =20 [flake8] -extend-ignore =3D E722 # Prefer pylint's bare-except checks to flake8's +# Prefer pylint's bare-except checks to flake8's +extend-ignore =3D E722 exclude =3D __pycache__, =20 [mypy] --=20 2.39.0 From nobody Thu May 16 16:45:18 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=1672866339; cv=none; d=zohomail.com; s=zohoarc; b=KDIcRtWQyMfiM3neJkpcxsCGq73GzaWp7aqE62XyQF1wwM86cv5lufY85xomhrvfDxnA2aNuHB+QJd4Vb1Kp20S97M9nUsiyQLtDoSy/b20kACX+ozE+IixiOR6/m6nixhUhzSuzNvBPoLnf4QIKnOs7sdPZgUeRIh5tIHRqk8g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672866339; 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=jpu//CFUdEaSiPooboIjQBzSe0HHMG9mh5sUO6JXxqc=; b=cQRwomB1h2m1+pycQ2GeaDc0+lf0BM6MslicNsqqEnjneWPY5FJV6PolOop5F9NyuJRFqmHlLMDBeDCBJERQMNdJ0rAexZ1Wb2QbgX1uGX9OEwQmM042CI4hpkjTu/nPHwJD/SGtN7oSwmCMLaVthObRzZjogl9uepUAEwiL+no= 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 1672866339285854.1386825661932; Wed, 4 Jan 2023 13:05:39 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDAwk-0006bv-Vv; Wed, 04 Jan 2023 16:05:15 -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 1pDAwj-0006aG-0V for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:13 -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 1pDAwf-0006tK-Fl for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:12 -0500 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-596-uyDtbLezMSGcrGIkpICEOQ-1; Wed, 04 Jan 2023 16:04:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A5A758028B0; Wed, 4 Jan 2023 21:04:58 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.34.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id 365132026D4B; Wed, 4 Jan 2023 21:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672866302; 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=jpu//CFUdEaSiPooboIjQBzSe0HHMG9mh5sUO6JXxqc=; b=c1sdsOz+sABxVoUmhmpadnXr2v++FG6CXSg442X8AgM4/Jgj7urlSXx17WJN0/g0RyxAvW gJmV3+hE4jzqFn6FdPN85BwcNPhg2GRfMlScfUb8R88YQSczwETOoNNyzlQ+MBxJKBuXy1 XI9wUc5Y+BV5pYk6+wahnIIk+9Mk0hQ= X-MC-Unique: uyDtbLezMSGcrGIkpICEOQ-1 From: John Snow To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Hanna Reitz , Eduardo Habkost , Markus Armbruster , Vladimir Sementsov-Ogievskiy , John Snow , Peter Maydell , Kevin Wolf , qemu-block@nongnu.org, Wilfred Mallawa Subject: [PULL 4/5] iotests/check: Fix typing for sys.exit() value Date: Wed, 4 Jan 2023 16:04:54 -0500 Message-Id: <20230104210455.571473-5-jsnow@redhat.com> In-Reply-To: <20230104210455.571473-1-jsnow@redhat.com> References: <20230104210455.571473-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: 1672866340918100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Wilfred Mallawa Message-id: 20221203005234.620788-3-jsnow@redhat.com Signed-off-by: John Snow --- tests/qemu-iotests/check | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemu-iotests/check b/tests/qemu-iotests/check index 75de1b4691e..9bdda1394e7 100755 --- a/tests/qemu-iotests/check +++ b/tests/qemu-iotests/check @@ -159,7 +159,7 @@ if __name__ =3D=3D '__main__': if not tests: raise ValueError('No tests selected') except ValueError as e: - sys.exit(e) + sys.exit(str(e)) =20 if args.dry_run: print('\n'.join(tests)) --=20 2.39.0 From nobody Thu May 16 16:45:18 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=1672866430; cv=none; d=zohomail.com; s=zohoarc; b=E7AGY4DTaj2Qmr/ITd5PXKzgXWzLoGnIM9LoNeOQIbGY6R1HTXPz9i2VtgUdk64DYqbid+DYHCeXQpW84mnvT1L7tt2EtXPwBVXgcD4dV2ykvrJY6qCaeI4km14cZ+eB6u15pvfuyz9cX0uwZQhzYgs/3ayY74WbCHRwm3lSqtc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672866430; 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=klytQWwAkZatvOH43fFpkDuTR2A2DWD/h5cHUlqoke8=; b=cO7dsYkzKsjZiu967qVfSk9xiWetkZ1AgijSAoYbh9PG3QwWfusDP/+mTAXJws3oHG8N6WAQAVvZdbjFSBdviPjY5bsav6kGBI4DnQHOIz6aBFzp22E6OD3VuWMtgqY8mjrcEACkO8SAK8stsHW3SC4C/jM5P36q7TFmI3vmZYU= 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 1672866430991444.86032086761907; Wed, 4 Jan 2023 13:07:10 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDAwj-0006b1-Se; Wed, 04 Jan 2023 16:05: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 1pDAwi-0006Zh-J2 for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:12 -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 1pDAwf-0006rt-Gq for qemu-devel@nongnu.org; Wed, 04 Jan 2023 16:05:12 -0500 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-86-_4blh_4xN6qpFq-muN0f3w-1; Wed, 04 Jan 2023 16:04:59 -0500 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 6D3653C10149; Wed, 4 Jan 2023 21:04:59 +0000 (UTC) Received: from scv.redhat.com (unknown [10.22.34.167]) by smtp.corp.redhat.com (Postfix) with ESMTP id B67312026D2A; Wed, 4 Jan 2023 21:04:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672866301; 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=klytQWwAkZatvOH43fFpkDuTR2A2DWD/h5cHUlqoke8=; b=NqrHKRtUruLYIAAtzj7GJ0Kuc3shDK6qx7UNYfbsBVJd68T+B6TDYzMS/h7evpfjDvWlTq o2z3mSctNCqlcfQziYEnKP4LBxSJGQf5wyauT2zDtYiUSrgPkrp4pPysxsVBHPWJQqOMUP 2nwwfwvrjhjCucsXbF1D/WMnoFx07F8= X-MC-Unique: _4blh_4xN6qpFq-muN0f3w-1 From: John Snow To: qemu-devel@nongnu.org Cc: Cleber Rosa , Beraldo Leal , Hanna Reitz , Eduardo Habkost , Markus Armbruster , Vladimir Sementsov-Ogievskiy , John Snow , Peter Maydell , Kevin Wolf , qemu-block@nongnu.org, Wilfred Mallawa Subject: [PULL 5/5] python: add 3.11 to supported list Date: Wed, 4 Jan 2023 16:04:55 -0500 Message-Id: <20230104210455.571473-6-jsnow@redhat.com> In-Reply-To: <20230104210455.571473-1-jsnow@redhat.com> References: <20230104210455.571473-1-jsnow@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.1 on 10.11.54.4 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: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, 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, 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: 1672866433174100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: John Snow Reviewed-by: Wilfred Mallawa Message-id: 20221203005234.620788-4-jsnow@redhat.com Signed-off-by: John Snow --- python/setup.cfg | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/setup.cfg b/python/setup.cfg index c0d7bab168e..56418157065 100644 --- a/python/setup.cfg +++ b/python/setup.cfg @@ -19,6 +19,7 @@ classifiers =3D Programming Language :: Python :: 3.8 Programming Language :: Python :: 3.9 Programming Language :: Python :: 3.10 + Programming Language :: Python :: 3.11 Typing :: Typed =20 [options] @@ -159,7 +160,7 @@ multi_line_output=3D3 # of python available on your system to run this test. =20 [tox:tox] -envlist =3D py36, py37, py38, py39, py310 +envlist =3D py36, py37, py38, py39, py310, py311 skip_missing_interpreters =3D true =20 [testenv] --=20 2.39.0