[systemd-devel] [PATCH] tests: add missing XDG_RUNTIME_DIR env variable
Ronny Chevalier
chevalier.ronny at gmail.com
Wed Jun 11 12:20:52 PDT 2014
Otherwise the test fails because specifier_runtime() returns -ENOTSUP
when XDG_RUNTIME_DIR is not set.
---
src/test/test-unit-name.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/test/test-unit-name.c b/src/test/test-unit-name.c
index fff3e16..bff4319 100644
--- a/src/test/test-unit-name.c
+++ b/src/test/test-unit-name.c
@@ -145,6 +145,7 @@ static int test_unit_printf(void) {
assert_se(setenv("USER", "root", 1) == 0);
assert_se(setenv("HOME", "/root", 1) == 0);
+ assert_se(setenv("XDG_RUNTIME_DIR", "/run/user/1/", 1) == 0);
assert_se(u = unit_new(m, sizeof(Service)));
assert_se(unit_add_name(u, "blah.service") == 0);
--
2.0.0
More information about the systemd-devel
mailing list