libxl: do not mock virFileMakePath

Point the logDir to abs_builddir instead.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Jim Fehlig <jfehlig@suse.com>
This commit is contained in:
Ján Tomko 2020-02-22 13:12:17 +01:00
parent 54a401af47
commit e19343c35d
2 changed files with 3 additions and 11 deletions

View File

@ -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,

View File

@ -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;