From: Andrea Bolognani Date: Wed, 10 Apr 2019 13:08:46 +0000 (+0200) Subject: tests: Fix MinGW build for domaincapstest X-Git-Tag: v5.3.0-rc1~204 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=947ea8665e4e5963a238143a10382f3b84838119;p=thirdparty%2Flibvirt.git tests: Fix MinGW build for domaincapstest 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 Acked-by: Michal Privoznik --- 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); - virFileWrapperRemovePrefix(SYSCONFDIR "/qemu/firmware"); - virFileWrapperRemovePrefix(PREFIX "/share/qemu/firmware"); - virFileWrapperRemovePrefix("/home/user/.config/qemu/firmware"); + virFileWrapperClearPrefixes(); #endif /* WITH_QEMU */ @@ -476,8 +474,6 @@ mymain(void) DO_TEST_BHYVE("fbuf", "/usr/sbin/bhyve", &bhyve_caps, VIR_DOMAIN_VIRT_BHYVE); #endif /* WITH_BHYVE */ - virFileWrapperClearPrefixes(); - return ret; }