From e19343c35deafe14ec090e8673fa5fbe7d9dc0a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Sat, 22 Feb 2020 13:12:17 +0100 Subject: [PATCH] libxl: do not mock virFileMakePath MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Point the logDir to abs_builddir instead. Signed-off-by: Ján Tomko Reviewed-by: Jim Fehlig --- tests/libxlmock.c | 11 ----------- tests/testutilsxen.c | 3 +++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/tests/libxlmock.c b/tests/libxlmock.c index b995b34cc5..60e6b78129 100644 --- a/tests/libxlmock.c +++ b/tests/libxlmock.c @@ -94,17 +94,6 @@ VIR_MOCK_STUB_RET_ARGS(bind, const struct sockaddr *, addr, socklen_t, addrlen) -VIR_MOCK_IMPL_RET_ARGS(virFileMakePath, int, - const char *, path) -{ - /* replace log path with a writable directory */ - if (strstr(path, "/log/")) { - g_snprintf((char*)path, strlen(path), "."); - return 0; - } - return real_virFileMakePath(path); -} - VIR_MOCK_IMPL_RET_ARGS(__xstat, int, int, ver, const char *, path, diff --git a/tests/testutilsxen.c b/tests/testutilsxen.c index b1260dcebf..d50c3003da 100644 --- a/tests/testutilsxen.c +++ b/tests/testutilsxen.c @@ -97,6 +97,9 @@ libxlDriverPrivatePtr testXLInitDriver(void) if (!(driver->config = libxlDriverConfigNew())) return NULL; + g_free(driver->config->logDir); + driver->config->logDir = g_strdup(abs_builddir); + if (libxlDriverConfigInit(driver->config) < 0) return NULL;