diff options
author | Lennart Poettering <lennart@poettering.net> | 2013-05-03 19:02:24 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2013-05-03 19:06:06 +0200 |
commit | a0ab566574303be1ca12cdb334f284cfd407caa5 (patch) | |
tree | 3d3d2abf68e2d8472a3511971021715dfc294f90 /src/test/test-cgroup-util.c | |
parent | update TODO (diff) | |
download | systemd-a0ab566574303be1ca12cdb334f284cfd407caa5.tar.xz systemd-a0ab566574303be1ca12cdb334f284cfd407caa5.zip |
cgroup: when escaping a cgroup object name, also escape names that start with a dot
Diffstat (limited to '')
-rw-r--r-- | src/test/test-cgroup-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index cc1a6fd723..c9634d42b0 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -146,11 +146,15 @@ static void test_escape_one(const char *s, const char *r) { static void test_escape(void) { test_escape_one("foobar", "foobar"); + 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"); test_escape_one("_foobar", "__foobar"); + test_escape_one("", "_"); + test_escape_one("_", "__"); + test_escape_one(".", "_."); } static void test_controller_is_valid(void) { |