From 2db507ece59eb7a12a89fe379d46ec495c3258c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= Date: Mon, 24 May 2021 11:06:23 +0100 Subject: [PATCH] remote: use absolute path to check for daemons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Daniel P. Berrangé --- src/remote/remote_daemon_dispatch.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/remote/remote_daemon_dispatch.c b/src/remote/remote_daemon_dispatch.c index 1b4f5256c3..13f76cc685 100644 --- a/src/remote/remote_daemon_dispatch.c +++ b/src/remote/remote_daemon_dispatch.c @@ -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)) {