From nobody Mon Feb 9 01:22:03 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 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=1587634839; cv=none; d=zohomail.com; s=zohoarc; b=DL/iIBU7sbbH86/XpQ0/5DoFmjpZ7oh8F1oy7AeynLham+bmpYjlXVQe9YdeIJHO3oOI75EzO8yxXeKCj2Ow1zBCHtAPoOP2Uh9ouZBfOphoAgvEI/iRe563Kd2/nBLIaqWSkBQ7KagOW1JZqf+/73tGpWJAV5npdV83M2d3+98= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587634839; 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=QVH9i8Tm7dVYp5dSF9qGrACWBQJkae8hJFhqPVc466k=; b=BUey0Gw3ZguMA06Ff5JsS13eUpa/NIBNSiBrvoOg98O4A6nVcfj98tRGc7K8y2xcRLXeIi+PHTmvWfyVbEIm2ZGoDBFmsMPfxphAqBtpIGsIu1+cmaYTE/0r9KsjNN0+8c36wN5WukqtkTIKw0Os8kXfT3/bQGHy6zZ+B3UgxcQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1587634839797578.7528579290049; Thu, 23 Apr 2020 02:40:39 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-475-GtB1_-JzPGqllEqvQ7vr-w-1; Thu, 23 Apr 2020 05:40:35 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CE731B18BC0; Thu, 23 Apr 2020 09:40:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 26CC65C1D2; Thu, 23 Apr 2020 09:40:30 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id B008C4CAAD; Thu, 23 Apr 2020 09:40:29 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 03N9eDCb015613 for ; Thu, 23 Apr 2020 05:40:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 6F6F619156; Thu, 23 Apr 2020 09:40:13 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id E0B56600F5 for ; Thu, 23 Apr 2020 09:40:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587634838; 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=QVH9i8Tm7dVYp5dSF9qGrACWBQJkae8hJFhqPVc466k=; b=HmQgYq3ZSUOsgSV4x9EZ4ccAyblB6/xYh2VmpHQePqJA8+RJL68mC5pnetQDdYaep7KJ67 WzueN6zECFMVlfIHBaDiYH558pO6i2bS++CovVyzJnrr1XY+jy1l08L1AfaEq4xwsxRcJD AYSsHTX8K5xsSZW8V7cZ4xTKWdDOZ9o= X-MC-Unique: GtB1_-JzPGqllEqvQ7vr-w-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/4] qemuhotplugtest: detach: Remove commands which are not issued Date: Thu, 23 Apr 2020 11:40:04 +0200 Message-Id: <5ebb52b98edefc66b2296df4f666a82bca3a885b.1587634711.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" The 'human-monitor-command' equates to the 'drive-del' command issued by the hotplug code on successful detach of a device. This means that it's not issued for failed attempts and thus should not be added to the expected list. Unfortunately our test monitor doesn't ensure that all expected commands were consumed. Signed-off-by: Peter Krempa --- tests/qemuhotplugtest.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index d9244dca44..9a787f9d11 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -715,8 +715,7 @@ mymain(void) "human-monitor-command", HMP("OK\\r\\n"), "device_add", QMP_OK); DO_TEST_DETACH("base-live", "disk-virtio", true, true, - "device_del", QMP_OK, - "human-monitor-command", HMP("")); + "device_del", QMP_OK); DO_TEST_DETACH("base-live", "disk-virtio", false, false, "device_del", QMP_DEVICE_DELETED("virtio-disk4") QMP_OK, "human-monitor-command", HMP("")); @@ -725,8 +724,7 @@ mymain(void) "human-monitor-command", HMP("OK\\r\\n"), "device_add", QMP_OK); DO_TEST_DETACH("base-live", "disk-usb", true, true, - "device_del", QMP_OK, - "human-monitor-command", HMP("")); + "device_del", QMP_OK); DO_TEST_DETACH("base-live", "disk-usb", false, false, "device_del", QMP_DEVICE_DELETED("usb-disk16") QMP_OK, "human-monitor-command", HMP("")); @@ -735,8 +733,7 @@ mymain(void) "human-monitor-command", HMP("OK\\r\\n"), "device_add", QMP_OK); DO_TEST_DETACH("base-live", "disk-scsi", true, true, - "device_del", QMP_OK, - "human-monitor-command", HMP("")); + "device_del", QMP_OK); DO_TEST_DETACH("base-live", "disk-scsi", false, false, "device_del", QMP_DEVICE_DELETED("scsi0-0-0-5") QMP_OK, "human-monitor-command", HMP("")); --=20 2.26.0