diff --git a/tests/libxlmock.c b/tests/libxlmock.c index b995b34cc5b2d5497c240f6ed3cf871d61371418..60e6b78129673ec1daf0ec72fa7fa91dadf73b3d 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 b1260dcebff1620afa1cf22539bbaf20f11c3866..d50c3003da96a4ba6e0045f054988bf8f7cb39d4 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;