summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-02-03 20:07:37 -0500
committerLennart Poettering <lennart@poettering.net>2015-02-04 02:16:33 +0100
commit320814811417146cfa1e416f69f1101eed630c36 (patch)
tree2547bffbd141320cd081a133a128d8b27916b7ac /src/test
parent5e07a79e84ab8b045b9df1a2719f14fc84471a1d (diff)
cg_path_get_user_unit(): Did not correctly parse user-unit templates.
It ran either skip_session() or skip_user_manager(), then ran skip_slices() iff skip_session() ran. It needs to run skip_slices() in either case. Included is a test case demonstrating why.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test-cgroup-util.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c
index 58eb744277..67eeeb56b7 100644
--- a/src/test/test-cgroup-util.c
+++ b/src/test/test-cgroup-util.c
@@ -93,6 +93,7 @@ static void test_path_get_user_unit(void) {
check_p_g_u_u("/meh.service", -ENOENT, NULL);
check_p_g_u_u("/session-3.scope/_cpu.service", 0, "cpu.service");
check_p_g_u_u("/user.slice/user-1000.slice/user@1000.service/server.service", 0, "server.service");
+ check_p_g_u_u("/user.slice/user-1000.slice/user@1000.service/foobar.slice/foobar@pie.service", 0, "foobar@pie.service");
check_p_g_u_u("/user.slice/user-1000.slice/user@.service/server.service", -ENOENT, NULL);
}