From nobody Mon Feb 9 00:56:17 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1770303859; cv=none; d=zohomail.com; s=zohoarc; b=no1Nx2+mIwx0nZSPEtf8woMd4v+DYew6M/WYCydl2jpQi8dLumDMZpxd6tcTVK/uaI+aXKBwM2kvDECSlKMJfEsDrR92u27JxZtNWf/wuk28WCRhbfz0YWqCMnUs3YGIZbXd4awEFAXdnhqBXcl/QilPx5V59kePsEoHyDuAKGY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1770303859; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=1zt18kWJyRNvETIEWKCG8RUBCwUR+RX5+6tpCIYLWJY=; b=H+kEJX6iuxLiLfxa5yi7Pn6QNYyw++Jh7RbiCU65ON877En3XYUBpeKNCGW9ewJisZitCkHS8YWorOA4N+fdsfMPPtf9oK9dzvYo0YXBssr53GeNQYkoDRnZupUQI0ePt+mWyW6SrosiMLKUvG0LOMSm4W2M1Dh7/lPa/DC1Xok= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1770303859699640.9457448077986; Thu, 5 Feb 2026 07:04:19 -0800 (PST) Received: by lists.libvirt.org (Postfix, from userid 993) id 3CCE641BC1; Thu, 5 Feb 2026 10:04:19 -0500 (EST) Received: from [172.19.199.6] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 3AB9043F6C; Thu, 5 Feb 2026 09:57:57 -0500 (EST) Received: by lists.libvirt.org (Postfix, from userid 993) id DD53641C1F; Thu, 5 Feb 2026 09:57:52 -0500 (EST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 2BBBE41C1F for ; Thu, 5 Feb 2026 09:55:43 -0500 (EST) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-664-g2cnkFqaMImP6nALzZg6TA-1; Thu, 05 Feb 2026 09:55:40 -0500 Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id CDC911955F27 for ; Thu, 5 Feb 2026 14:55:39 +0000 (UTC) Received: from speedmetal.lan (unknown [10.45.242.3]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 19DAC1800464 for ; Thu, 5 Feb 2026 14:55:38 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-5.0 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1770303342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1zt18kWJyRNvETIEWKCG8RUBCwUR+RX5+6tpCIYLWJY=; b=OnIhT1dOs2yGH5LdLouY+kilimpzsAFBaTZMlbze0YhPJRkHn6oqe0UcOV5FBhNH8M+ESy RY5X3Hf/xgc3EMp8Ef3SWyAFXFiSYXWw8Gw+snPJ3GkAimE+W4qECL3q7tSqKh3y/mwp2u Z13Jp+U35mc8IiA/A0CxZWhLus0x1Ew= X-MC-Unique: g2cnkFqaMImP6nALzZg6TA-1 X-Mimecast-MFC-AGG-ID: g2cnkFqaMImP6nALzZg6TA_1770303340 To: devel@lists.libvirt.org Subject: [PATCH 08/20] qemuMonitorJSONHandleMigrationStatus: Simplify error case Date: Thu, 5 Feb 2026 15:55:16 +0100 Message-ID: <8b1eb88d705f64a864fd67bbbe602fc6f2c84654.1770303113.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: Nhr--y5K_Zoi27_64zg8EkOxCGVJh1Iz11nN-coAexU_1770303340 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: LOPDA7U7NBAZIWUKMEUSGT7UBAFCYKXO X-Message-ID-Hash: LOPDA7U7NBAZIWUKMEUSGT7UBAFCYKXO X-MailFrom: pkrempa@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Peter Krempa via Devel Reply-To: Peter Krempa X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1770303860853154100 Content-Type: text/plain; charset="utf-8" From: Peter Krempa Report both missing 'status' and invalid value in a single error message. Also use the proper spelling of the event name (all caps). Signed-off-by: Peter Krempa --- src/qemu/qemu_monitor_json.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 1b05c713ea..021995f5cc 100644 --- a/src/qemu/qemu_monitor_json.c +++ b/src/qemu/qemu_monitor_json.c @@ -1268,13 +1268,10 @@ qemuMonitorJSONHandleMigrationStatus(qemuMonitor *m= on, const char *str; int status; - if (!(str =3D virJSONValueObjectGetString(data, "status"))) { - VIR_WARN("missing status in migration event"); - return; - } - - if ((status =3D qemuMonitorMigrationStatusTypeFromString(str)) =3D=3D = -1) { - VIR_WARN("unknown status '%s' in migration event", str); + if (!(str =3D virJSONValueObjectGetString(data, "status")) || + (status =3D qemuMonitorMigrationStatusTypeFromString(str)) =3D=3D = -1) { + VIR_WARN("Missing or unknown value '%s' of 'status' in 'MIGRATION'= event", + NULLSTR(str)); return; } --=20 2.53.0