mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
We need this for all tests that use virHostdevManager, because during creation of this object for unprivileged connections like those used in the test suite we would end up writing inside the user's home directory. That's bad manners in general, but when running the test suite inside a purposefully constrained environment such as the one exposed by pbuilder, it turns into an outright test failure: Could not initialize HostdevManager - operation failed: Failed to create state dir '/nonexistent/.cache/libvirt/hostdevmgr' Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
16 lines
301 B
C
16 lines
301 B
C
/*
|
|
* Copyright (C) 2020 Red Hat, Inc.
|
|
* SPDX-License-Identifier: LGPL-2.1-or-later
|
|
*/
|
|
|
|
#include <config.h>
|
|
|
|
#include "virutil.h"
|
|
|
|
char *
|
|
virGetUserRuntimeDirectory(void)
|
|
{
|
|
return g_build_filename(g_getenv("LIBVIRT_FAKE_ROOT_DIR"),
|
|
"user-runtime-directory", NULL);
|
|
}
|