mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-18 18:45:16 +00:00
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:
parent
54a401af47
commit
e19343c35d
@ -94,17 +94,6 @@ VIR_MOCK_STUB_RET_ARGS(bind,
|
|||||||
const struct sockaddr *, addr,
|
const struct sockaddr *, addr,
|
||||||
socklen_t, addrlen)
|
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,
|
VIR_MOCK_IMPL_RET_ARGS(__xstat, int,
|
||||||
int, ver,
|
int, ver,
|
||||||
const char *, path,
|
const char *, path,
|
||||||
|
@ -97,6 +97,9 @@ libxlDriverPrivatePtr testXLInitDriver(void)
|
|||||||
if (!(driver->config = libxlDriverConfigNew()))
|
if (!(driver->config = libxlDriverConfigNew()))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
g_free(driver->config->logDir);
|
||||||
|
driver->config->logDir = g_strdup(abs_builddir);
|
||||||
|
|
||||||
if (libxlDriverConfigInit(driver->config) < 0)
|
if (libxlDriverConfigInit(driver->config) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user