From nobody Mon Feb 9 11:07:26 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1531130208147246.60929513041526; Mon, 9 Jul 2018 02:56:48 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 865C681DE1; Mon, 9 Jul 2018 09:56:46 +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 4A117177B9; Mon, 9 Jul 2018 09:56:46 +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 EACB91800B6C; Mon, 9 Jul 2018 09:56:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w699uKSG001029 for ; Mon, 9 Jul 2018 05:56:21 -0400 Received: by smtp.corp.redhat.com (Postfix) id DF7B7111E3EB; Mon, 9 Jul 2018 09:56:20 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 84520111E3E8 for ; Mon, 9 Jul 2018 09:56:20 +0000 (UTC) From: Michal Privoznik To: libvir-list@redhat.com Date: Mon, 9 Jul 2018 11:56:10 +0200 Message-Id: In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] qemuxml2argvtest: Don't spawn session daemon 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable 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-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 09 Jul 2018 09:56:47 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" After f14c37ce4c2ccd111 the cleanup path for qemuBuildInterfaceCommandLine() and qemuBuildNetCommandLine() tries to connect to nwfilter driver in order to tear down any NWFilter that was brought up during cmd line construction. Since we also have negative test cases where errors during cmd line build are expected the cleanup paths are executed and NWFilter removal is attempted. Fortunately, there is another bug that by pure luck prevented us from actually spawning the daemon and thus modifying actual user data. See next commit for explanation. Signed-off-by: Michal Privoznik --- src/driver.h | 2 +- tests/qemuxml2argvmock.c | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/driver.h b/src/driver.h index 0b1f7a2269..0a0d8facee 100644 --- a/src/driver.h +++ b/src/driver.h @@ -113,7 +113,7 @@ int virDriverLoadModule(const char *name, =20 virConnectPtr virGetConnectInterface(void); virConnectPtr virGetConnectNetwork(void); -virConnectPtr virGetConnectNWFilter(void); +virConnectPtr virGetConnectNWFilter(void) ATTRIBUTE_NOINLINE; virConnectPtr virGetConnectNodeDev(void); virConnectPtr virGetConnectSecret(void); virConnectPtr virGetConnectStorage(void); diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c index 4df92cf396..13ccfb855d 100644 --- a/tests/qemuxml2argvmock.c +++ b/tests/qemuxml2argvmock.c @@ -233,3 +233,10 @@ qemuOpenChrChardevUNIXSocket(const virDomainChrSourceD= ef *dev ATTRIBUTE_UNUSED) abort(); return 1729; } + + +virConnectPtr +virGetConnectNWFilter(void) +{ + return NULL; +} --=20 2.16.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list