summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorKay Sievers <kay@vrfy.org>2013-12-08 06:36:39 +0100
committerKay Sievers <kay@vrfy.org>2013-12-08 06:36:39 +0100
commite13bb5d2b133f9ae51c0a2d20aa51071c780e9ae (patch)
tree857f4bf94a5df2b31d93f14c099859b95d7b0bdf /src/test
parent4c49ab0e7a7f9f14f4308476257cd3548d0b4694 (diff)
test: cgroup-util - do not fail if cpu controller is not available
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-cgroup-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 16bf968340..4d802d483a 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -193,8 +193,9 @@ static void test_escape(void) {
test_escape_one(".foobar", "_.foobar");
test_escape_one("foobar.service", "foobar.service");
test_escape_one("cgroup.service", "_cgroup.service");
- test_escape_one("cpu.service", "_cpu.service");
test_escape_one("tasks", "_tasks");
+ if (access("/sys/fs/cgroup/cpu", F_OK) == 0)
+ test_escape_one("cpu.service", "_cpu.service");
test_escape_one("_foobar", "__foobar");
test_escape_one("", "_");
test_escape_one("_", "__");