diff options
author | Dimitri John Ledkov <dimitri.j.ledkov@intel.com> | 2015-06-01 12:46:52 +0100 |
---|---|---|
committer | Dimitri John Ledkov <dimitri.j.ledkov@intel.com> | 2015-06-02 11:25:52 +0100 |
commit | 185a08745957cbd32e8293daf8c51ab9c995a71e (patch) | |
tree | 182b8fe7d51a34fbbc34870f1312c7f2eb136784 /src/test | |
parent | 80979f1ce4dadf797a42e85a97dc10960c1f6509 (diff) |
shared: Drop 'name=' prefix from SYSTEMD_CGROUP_CONTROLLER define.
In cgtop,mount-setup,nspawn the name= prefix is hard-coded in the
mount options, and the define is not used.
Everywhere else, we explicitly white-list allow 'name=' prefix to be
used with all controllers, and strip it out to 'normalise' the
controller name. That work is mostly inflicted on us due to 'name='
prefix in the define. Dropping this prefix makes everything more sane
overall.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/test-cgroup-util.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c index 4a89f64518..ecc9d70bf4 100644 --- a/src/test/test-cgroup-util.c +++ b/src/test/test-cgroup-util.c @@ -244,16 +244,16 @@ static void test_escape(void) { } static void test_controller_is_valid(void) { - assert_se(cg_controller_is_valid("foobar", false)); - assert_se(cg_controller_is_valid("foo_bar", false)); - assert_se(cg_controller_is_valid("name=foo", true)); - assert_se(!cg_controller_is_valid("", false)); - assert_se(!cg_controller_is_valid("name=", true)); - assert_se(!cg_controller_is_valid("=", false)); - assert_se(!cg_controller_is_valid("cpu,cpuacct", false)); - assert_se(!cg_controller_is_valid("_", false)); - assert_se(!cg_controller_is_valid("_foobar", false)); - assert_se(!cg_controller_is_valid("tatü", false)); + assert_se(cg_controller_is_valid("foobar")); + assert_se(cg_controller_is_valid("foo_bar")); + assert_se(cg_controller_is_valid("name=foo")); + assert_se(!cg_controller_is_valid("")); + assert_se(!cg_controller_is_valid("name=")); + assert_se(!cg_controller_is_valid("=")); + assert_se(!cg_controller_is_valid("cpu,cpuacct")); + assert_se(!cg_controller_is_valid("_")); + assert_se(!cg_controller_is_valid("_foobar")); + assert_se(!cg_controller_is_valid("tatü")); } static void test_slice_to_path_one(const char *unit, const char *path, int error) { |