From nobody Sun Feb 8 19:20:20 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1682065570; cv=none; d=zohomail.com; s=zohoarc; b=Ts477iqnpjUGNo+HQTnRXzlY7K8tzyjMfEyJNpazcnqtjDG3xxNRLkFB19Rmuufsl9oByO/oQRYL1AYBDtbKip/p+R0NKI739RqLyxvy/Q0tAMXjsmp4MiGNbwx/vsmK1YLTKPYkc0Z7RrbS57zwEifJOc5kU5MCJkutgiCeF7U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1682065570; h=Content-Type:Content-Transfer-Encoding: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=43zo+7ToIlGVFnmG1Fay8tOPHLHREeNEUsQ8tV6Cmn4=; b=QfGFXjXaorLdx/VV79+aezoPmUZSN1ozO1wdgoP4K04LLdfwFISvRn3J5JqKHJMhng3lO4WYUaGIZfsU0f86PfX5848/zIeVRvBKuqLLf/lyQa8i5QfYHrr8PF1hLOCJSmvwxH2NSs1Fy8s7F9LwG0ezDDoQ8dOsGcpdlLzapko= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1682065570413958.3342904395892; Fri, 21 Apr 2023 01:26:10 -0700 (PDT) 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-633-kegQ7VFkMUyRu9-HNY5HSg-1; Fri, 21 Apr 2023 04:25:22 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5264D10146E7; Fri, 21 Apr 2023 08:25:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id 38B6240C2027; Fri, 21 Apr 2023 08:25:18 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id C08B01946A52; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2B8071946A50 for ; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1137B18EC7; Fri, 21 Apr 2023 08:25:17 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id AC4705AB7A for ; Fri, 21 Apr 2023 08:25:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682065569; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=43zo+7ToIlGVFnmG1Fay8tOPHLHREeNEUsQ8tV6Cmn4=; b=NQ0g+AS2cngCSdz2KBgNSI9Y3ygoOhUtpiHKnur1croC0hAHuNbqR72h7nLa6gPAffpQ6b a0KmqPOgIJGMT8UPvC6qaFMEsFuvUFXKwkOXVPhane4EJCVUNvh3ZClcaRJC5I1FwxZUj2 40r4V9yJnmyS1aq2ehfcOWipTUbU5VM= X-MC-Unique: kegQ7VFkMUyRu9-HNY5HSg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH 08/11] qemuhotplugtest: Fix misleading comment on monitor unlock Date: Fri, 21 Apr 2023 10:25:07 +0200 Message-Id: <3ac33b0d82d6f1ec44e3d08c098b7ce427c0dba3.1682065352.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1682065571956100003 Content-Type: text/plain; charset="utf-8"; x-default="true" There's a comment in testQemuHotplug() trying to explain why we need to unlock the monitor object. Well, while it might have been correct when being introduced, it's no long factually correct as just any function (attach/detach/update) might talk to the monitor and it expects the monitor to be unlocked (as it calls qemuDomainObjEnterMonitor() + qemuDomainObjExitMonitor()). Signed-off-by: Michal Privoznik --- tests/qemuhotplugtest.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index b4c03d5374..9a1cf8ab2f 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -223,9 +223,8 @@ testQemuHotplug(const void *data) priv =3D vm->privateData; priv->mon =3D qemuMonitorTestGetMonitor(test_mon); =20 - /* XXX We need to unlock the monitor here, as - * qemuDomainObjEnterMonitorInternal (called from qemuDomainChangeGrap= hics) - * tries to lock it again */ + /* We need to unlock the monitor here, as any function below talks + * (transitively) on the monitor. */ virObjectUnlock(priv->mon); =20 switch (test->action) { --=20 2.39.2