]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: use absolute path to check for daemons
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 24 May 2021 10:06:23 +0000 (11:06 +0100)
committerDaniel P. Berrangé <berrange@redhat.com>
Thu, 27 May 2021 09:59:41 +0000 (10:59 +0100)
virFileFindResource needs to be given the absolute build path otherwise
its results will vary according to the CWD, leading to spurious failures
in dev testing.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
src/remote/remote_daemon_dispatch.c

index 1b4f5256c3879f15ee763a4a1cbf027818ce7137..13f76cc6858ad674b77d789eb71ed1d929e0f1fc 100644 (file)
@@ -2001,7 +2001,9 @@ remoteDispatchProbeURI(bool readonly,
 
             daemonname = g_strdup_printf("virt%sd", drivers[i]);
 
-            if (!(daemonpath = virFileFindResource(daemonname, "src", SBINDIR)))
+            if (!(daemonpath = virFileFindResource(daemonname,
+                                                   abs_top_builddir "/src",
+                                                   SBINDIR)))
                 return -1;
 
             if (!virFileExists(daemonpath)) {