From nobody Tue May 7 21:50:02 2024 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 ARC-Seal: i=1; a=rsa-sha256; t=1554903120; cv=none; d=zoho.com; s=zohoarc; b=F/pFQXac4EVV9bxmG1goz+A6GVde7E2E8ey2d8jkXbQe02Qdh5nFmip+HYGI3X/NJvllp/3MCUET3ZrnXg8U6Pv1Lfbf9dWj5Ct++WuuwzqXRiQd5TxjTgQzeDMtGboF+TceNeF/eXzkg5qUp/BP9BaFO+M+MZePAEDp1Q1SunM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1554903120; h=Content-Type:Content-Transfer-Encoding:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=cbEORCn5JYs6Qmcgc9Oy5MNbGmsG2/Wz38y4wvnAImU=; b=OCULmahRwNRRFZTunLG/jT44DqAW4n0nk/ETwqlIUFcOd1ZkFRkdkru0zb0jNnI2qK2HDfYKdwlohknwCWDgbtuWy5Jh6QEj2oTLSwpc2iTLwkebSbGN/m1pZn4zJ4Vz5ZzkLpjOLpYPP1FCuKpUs80248un5ptdZGxNth9S26Y= ARC-Authentication-Results: i=1; mx.zoho.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 header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1554903120293762.0749257837314; Wed, 10 Apr 2019 06:32:00 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D05069B313; Wed, 10 Apr 2019 13:31:57 +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 5FD755D961; Wed, 10 Apr 2019 13:31:57 +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 0222CADA88; Wed, 10 Apr 2019 13:31:56 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x3ADVt81007170 for ; Wed, 10 Apr 2019 09:31:55 -0400 Received: by smtp.corp.redhat.com (Postfix) id 01DD616901; Wed, 10 Apr 2019 13:31:55 +0000 (UTC) Received: from kinshicho.brq.redhat.com (unknown [10.43.2.212]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7E7B517BB6 for ; Wed, 10 Apr 2019 13:31:52 +0000 (UTC) From: Andrea Bolognani To: libvir-list@redhat.com Date: Wed, 10 Apr 2019 15:31:50 +0200 Message-Id: <20190410133150.11403-1-abologna@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] tests: Fix MinGW build for domaincapstest 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Wed, 10 Apr 2019 13:31:58 +0000 (UTC) Content-Type: text/plain; charset="utf-8" Commit 5b9819eedc71 started using the virFileWrapper APIs in the test program, and correctly called them only in the section of code guarded by WITH_QEMU; however, a single call to the virFileWrapperClearPrefixes() function ended up in the hypervisor-agnostic section, causing a build failure on MinGW. Move the call to the QEMU-only section; while at it, also drop the virFileWrapperRemovePrefix() calls, which are entirely redundant since we'd drop all prefixes immediately afterwards anyway. Signed-off-by: Andrea Bolognani --- Another approach would be to simply drop the call to virFileWrapperClearPrefixes(), but there really is no point in removing prefixes one by one when we can just clear all of them in one fell swoop. tests/domaincapstest.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/domaincapstest.c b/tests/domaincapstest.c index 3ee95a4b58..a9922e1edb 100644 --- a/tests/domaincapstest.c +++ b/tests/domaincapstest.c @@ -451,9 +451,7 @@ mymain(void) "x86_64", VIR_DOMAIN_VIRT_KVM); virObjectUnref(cfg); =20 - virFileWrapperRemovePrefix(SYSCONFDIR "/qemu/firmware"); - virFileWrapperRemovePrefix(PREFIX "/share/qemu/firmware"); - virFileWrapperRemovePrefix("/home/user/.config/qemu/firmware"); + virFileWrapperClearPrefixes(); =20 #endif /* WITH_QEMU */ =20 @@ -476,8 +474,6 @@ mymain(void) DO_TEST_BHYVE("fbuf", "/usr/sbin/bhyve", &bhyve_caps, VIR_DOMAIN_VIRT_= BHYVE); #endif /* WITH_BHYVE */ =20 - virFileWrapperClearPrefixes(); - return ret; } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list