From nobody Tue May 7 10:11:31 2024 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=1587634824; cv=none; d=zohomail.com; s=zohoarc; b=CsDLXzTZg5nNTVyUTwA668lnFxsT9xVqjhAzhPqXlnZUi2LXfLfq9SGRNfGau49uIZ3YXbyppm9eUirCThSnTvwSIs/ikjPmB32/Q0G6oL3TqhEdzVQvq9NshacrwM17n8woJKZV9WOkqSysLjoZzH0A0DxUo+OhxWiQXshO6/A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587634824; 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=Bc7BiDYqCdNJ2vGuzDVdls8XMC9bqbdpp15L/A5bxoU=; b=eUXtjTUXTGsyZ3ZfD5Gv+HXwNigEtXBXTVZ2VviWyRmiFjAM6pE5/wtXGE56lfHo4JgJVymimaEisEA/geg9Ry4W+iAyTXM+Ntg134Uu/o+5OvtDBXHbj6DOoP/kgLP/0018NaIUhoN23y94Tg+Z/bdUnLgK8oD0l8jGf15wAI0= 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 1587634824420451.87224504614665; Thu, 23 Apr 2020 02:40:24 -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-453-Z9vF8koDM8iM7bfyB_aR-Q-1; Thu, 23 Apr 2020 05:40:20 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5AEAE835B40; Thu, 23 Apr 2020 09:40:15 +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 1F9041001281; Thu, 23 Apr 2020 09:40:15 +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 CA57F4CA95; Thu, 23 Apr 2020 09:40:13 +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 03N9eAs5015590 for ; Thu, 23 Apr 2020 05:40:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id 9CBD6600F5; Thu, 23 Apr 2020 09:40:10 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 10BD9605CB for ; Thu, 23 Apr 2020 09:40:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587634823; 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=Bc7BiDYqCdNJ2vGuzDVdls8XMC9bqbdpp15L/A5bxoU=; b=OOzqhP1ghQiq4rx/hKaOnl9F1h8KWZ0CNhLDYKgc8wUp86rHR0YrU4rWytv/Uq327j4COJ SvvJ8WMX4jOFQ4Ev5Hb8oh1PqqD/zY8dklCQWuWtfasZ8q2MnzVQ3eGzFIjn+usu2nVx8f dwQkLNBlwEKlFOO0jOQsdtm9NTuEulM= X-MC-Unique: Z9vF8koDM8iM7bfyB_aR-Q-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/4] qemuDomainGetUnplugTimeout: Add G_GNUC_NO_INLINE Date: Thu, 23 Apr 2020 11:40:01 +0200 Message-Id: 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.84 on 10.5.11.22 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 function is mocked in qemuhotplugmock.so. Recent clang versions decided to inline it so the mock stopped working resulting in qemuhotplugtest wasting 15 seconds waiting for timeouts. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- src/qemu/qemu_hotplug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c index 14654a17d7..60d0729f1e 100644 --- a/src/qemu/qemu_hotplug.c +++ b/src/qemu/qemu_hotplug.c @@ -5122,7 +5122,7 @@ qemuDomainResetDeviceRemoval(virDomainObjPtr vm) } -unsigned long long +unsigned long long G_GNUC_NO_INLINE qemuDomainGetUnplugTimeout(virDomainObjPtr vm) { if (qemuDomainIsPSeries(vm->def)) --=20 2.26.0 From nobody Tue May 7 10:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.120 as permitted sender) client-ip=205.139.110.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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=1587634832; cv=none; d=zohomail.com; s=zohoarc; b=IrBiSapzv+SN/sChrDczxYCQCn3NjfPTXWsA+0B/11pCdhz+/zvWFM9WK1TLCAEHBxP4j1Us/1Olj+RCAqD4tU1dMJ5wXCOpc+NxmVwkcpBtd2IHQhj3SzLkDma38tGMLZGX7EsDN4b2erLFizOSUzLkLA6nRbvt3KUVXNMgW9o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587634832; 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=OUHgVaq1Hvd/HvbLuFyRlMTiYzp2qrBTf+LHtCeoa+M=; b=chyQs6Sn5UJflAH/WY0I23nfjLpfMfVO8Np475BDslsZiBjAai53IaRmzU/t5wz7XckoJaz/zJ6PECzcyQMmpxvoRil5GuXY1RA4eZR4qVMmbfSNB0+MR9Cqq4qqZ0YGlAz2ltiolXhqTH565bqpH4qbWJ6TwWACxtgSOfdi/gc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.120 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-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by mx.zohomail.com with SMTPS id 1587634832284354.1448950661205; Thu, 23 Apr 2020 02:40:32 -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-432-4Z0BxQYZPnOPVXJbVovfOg-1; Thu, 23 Apr 2020 05:40:28 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B9719A2E48; Thu, 23 Apr 2020 09:40:22 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 90B4B1001281; Thu, 23 Apr 2020 09:40:22 +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 31C1D1809554; Thu, 23 Apr 2020 09:40:22 +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 03N9eBcP015599 for ; Thu, 23 Apr 2020 05:40:11 -0400 Received: by smtp.corp.redhat.com (Postfix) id 8A4F518B5C; Thu, 23 Apr 2020 09:40:11 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 07F82600F5 for ; Thu, 23 Apr 2020 09:40:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587634830; 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=OUHgVaq1Hvd/HvbLuFyRlMTiYzp2qrBTf+LHtCeoa+M=; b=POsWmNOWNgc7MtbEcVZRMceBNWJtprB8nZdlhwrHanIOQPDSK5XDb0DlsbeTmF2bpCBTbr nPJhfPPRsWKCc6KGPj9EwISN9lsGFwgCCHzFFsN0ELuxbWmEhyyabdrhg6wWcwJNwfWfAh QvaL9iRsOKaLpJAM4Tk0aBLzMDjfH9o= X-MC-Unique: 4Z0BxQYZPnOPVXJbVovfOg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/4] mock:qemuDomainGetUnplugTimeout: Remove unused attribute for '@vm' Date: Thu, 23 Apr 2020 11:40:02 +0200 Message-Id: <8c242776e51e5d81e4442400a4e48570eee3839e.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.84 on 10.5.11.22 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" '@vm' is used to use a different timeout for ppc64 guests. Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tests/qemuhotplugmock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemuhotplugmock.c b/tests/qemuhotplugmock.c index 8e5b07788d..8fe7fe7448 100644 --- a/tests/qemuhotplugmock.c +++ b/tests/qemuhotplugmock.c @@ -39,7 +39,7 @@ init_syms(void) } unsigned long long -qemuDomainGetUnplugTimeout(virDomainObjPtr vm G_GNUC_UNUSED) +qemuDomainGetUnplugTimeout(virDomainObjPtr vm) { /* Wait only 100ms for DEVICE_DELETED event. Give a greater * timeout in case of PSeries guest to be consistent with the --=20 2.26.0 From nobody Tue May 7 10:11:31 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; 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 205.139.110.61 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=1587634865; cv=none; d=zohomail.com; s=zohoarc; b=EKtrR+wP031un6BQifWZiSjjglg3cXq07X8UaO3aqNSSG6mxSRvWrFRTtYbMKL4Z54sPhLt141/VDOgGvt5rV7/hpRofSaetpkbsuHcAvVpDLgKWbfOBrYaQvEYtSkO8plId5v/jx6aeMxQeOs+DUE6ZHj2dWUExBstfTWC9mSw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587634865; 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=LYW0debNagmMpEkMSmwQ0nv0hPTjdN1kKNP3Z8FkpTw=; b=MWkjHJlZjwedQcT6RSRDykepLAtPj+ZVncPFWQv7CIWQYWMtyAYTDQbnwVp01drIXHM519f1DRdc8ah01T43hEpQPwRFg6NbH6xQ6Ug95LTzi1tanPQz4OrZe2zxGtXv2u6LjZBuEjqsN/PAZDjXdsEOITTXxJ8d4xxBMuhVD+I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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 [205.139.110.61]) by mx.zohomail.com with SMTPS id 1587634865681920.2810840908393; Thu, 23 Apr 2020 02:41:05 -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-45-KipeLC1IM52rvSLEWp0ynA-1; Thu, 23 Apr 2020 05:40:32 -0400 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 96BA28014D8; Thu, 23 Apr 2020 09:40:26 +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 6610819D9E; Thu, 23 Apr 2020 09:40:26 +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 225A14CAA0; Thu, 23 Apr 2020 09:40:26 +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 03N9eCO9015607 for ; Thu, 23 Apr 2020 05:40:12 -0400 Received: by smtp.corp.redhat.com (Postfix) id 81E4A18B5C; Thu, 23 Apr 2020 09:40:12 +0000 (UTC) Received: from localhost.localdomain.com (unknown [10.40.208.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id EA0F1600F5 for ; Thu, 23 Apr 2020 09:40:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587634864; 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=LYW0debNagmMpEkMSmwQ0nv0hPTjdN1kKNP3Z8FkpTw=; b=FAAcg8usCPD+IH9UCIZM11MQ1ORecEm4nfodeZiXYAjHCKf08yJY66psMdletm/+uVPbjU YtHKxXGuez+cC5YKO/VIwI9GB3y9qhEqyfYoJpY+Dy0j8TFKU01E4FAcci1HadArstZ+NW mp4lf+a1kUOhWE9h8McaF403PSX94S0= X-MC-Unique: KipeLC1IM52rvSLEWp0ynA-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/4] mock: qemuDomainGetUnplugTimeout: Decrease timeout Date: Thu, 23 Apr 2020 11:40:03 +0200 Message-Id: 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.84 on 10.5.11.23 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" We always queue the DEVICE_DELETED events before successful return from the command so that tests are reliable. This means we can decrease the unplug timeout as it's guaranteed to be executed in correct order. According to my testing it shaves off ~450ms of test run: real 0m0.721s vs. real 0m0.259s Signed-off-by: Peter Krempa Reviewed-by: Michal Privoznik --- tests/qemuhotplugmock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemuhotplugmock.c b/tests/qemuhotplugmock.c index 8fe7fe7448..d2324913cf 100644 --- a/tests/qemuhotplugmock.c +++ b/tests/qemuhotplugmock.c @@ -45,8 +45,8 @@ qemuDomainGetUnplugTimeout(virDomainObjPtr vm) * timeout in case of PSeries guest to be consistent with the * original logic. */ if (qemuDomainIsPSeries(vm->def)) - return 200; - return 100; + return 20; + return 10; } --=20 2.26.0 From nobody Tue May 7 10:11:31 2024 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 Reviewed-by: Michal Privoznik --- 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