summaryrefslogtreecommitdiff
path: root/src/test/test-cgroup-mask.c
diff options
context:
space:
mode:
authorMartin Pitt <martin.pitt@ubuntu.com>2016-04-12 18:20:13 +0200
committerMartin Pitt <martin.pitt@ubuntu.com>2016-04-12 18:20:13 +0200
commit025ef1d2264b24e77283d312dede8af01fa050f6 (patch)
tree3dd77d23d19943926f36cb60b1685a4fb657bc89 /src/test/test-cgroup-mask.c
parent1116e14c49ac1291eb5e46fcf5e691ef57267b54 (diff)
parent3c6d8e57e870ed56dbb53ce62f0a3d32de101cd8 (diff)
Merge pull request #2973 from poettering/search-path
Many fixes, in particular to the install logic
Diffstat (limited to 'src/test/test-cgroup-mask.c')
-rw-r--r--src/test/test-cgroup-mask.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/test/test-cgroup-mask.c b/src/test/test-cgroup-mask.c
index ad15075a5b..4eb8fcd773 100644
--- a/src/test/test-cgroup-mask.c
+++ b/src/test/test-cgroup-mask.c
@@ -21,7 +21,9 @@
#include "macro.h"
#include "manager.h"
+#include "rm-rf.h"
#include "test-helper.h"
+#include "tests.h"
#include "unit.h"
static int test_cgroup_mask(void) {
@@ -33,7 +35,7 @@ static int test_cgroup_mask(void) {
/* Prepare the manager. */
assert_se(set_unit_path(TEST_DIR) >= 0);
- r = manager_new(MANAGER_USER, true, &m);
+ r = manager_new(UNIT_FILE_USER, true, &m);
if (r == -EPERM || r == -EACCES) {
puts("manager_new: Permission denied. Skipping test.");
return EXIT_TEST_SKIP;
@@ -107,7 +109,11 @@ static int test_cgroup_mask(void) {
}
int main(int argc, char* argv[]) {
+ _cleanup_(rm_rf_and_freep) char *runtime_dir = NULL;
int rc = 0;
+
+ assert_se(runtime_dir = setup_fake_runtime_dir());
TEST_REQ_RUNNING_SYSTEMD(rc = test_cgroup_mask());
+
return rc;
}