提交 e19343c3 编写于 作者: J Ján Tomko

libxl: do not mock virFileMakePath

Point the logDir to abs_builddir instead.
Signed-off-by: NJán Tomko <jtomko@redhat.com>
Reviewed-by: NJim Fehlig <jfehlig@suse.com>
上级 54a401af
......@@ -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,
......
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册