From ca016c56308a97a511e2764dd6e2958e7aba8fea Mon Sep 17 00:00:00 2001 From: Peter Krempa Date: Wed, 24 Apr 2024 10:06:28 +0200 Subject: [PATCH] tests: qemucapsprobe: Fix construction of path to libqemucapsprobemock.so Prior to commit eac646ea490e66 VIR_TEST_MOCK included the path to the build directory, but the code was not fixed after VIR_TEST_MOCK was changed resulting in the following failure when attempting to probe capaibilities: $ ./tests/qemucapsprobe /path/to/qemu/qemu-system-x86_64 > out libqemucapsprobemock.so: No such file or directory Fix the construction of the path to the mock library by concatenating it back with the absolute path to the build directory. Fixes: eac646ea490e66500609585047f0d800e3645d6b Signed-off-by: Peter Krempa Reviewed-by: Pavel Hrdina --- tests/qemucapsprobe.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qemucapsprobe.c b/tests/qemucapsprobe.c index 76c18f0dcd..cd117170ab 100644 --- a/tests/qemucapsprobe.c +++ b/tests/qemucapsprobe.c @@ -48,7 +48,7 @@ main(int argc, char **argv) virQEMUCaps *caps; virArch host; virArch guest; - const char *mock = VIR_TEST_MOCK("qemucapsprobe"); + g_autofree char *mock = g_strdup_printf("%s/%s", abs_builddir, VIR_TEST_MOCK("qemucapsprobe")); if (!virFileIsExecutable(mock)) { perror(mock);