From 185a08745957cbd32e8293daf8c51ab9c995a71e Mon Sep 17 00:00:00 2001 From: Dimitri John Ledkov Date: Mon, 1 Jun 2015 12:46:52 +0100 Subject: 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. --- src/test/test-cgroup-util.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/test/test-cgroup-util.c') 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) { -- cgit v1.2.3-54-g00ecf