3 let conf="#cgconfig test cofiguration file
4 mount { 123 = 456; 456 = 789;}
7 test Cgconfig.lns get conf =
8 { "#comment" = "cgconfig test cofiguration file" }
14 (* white spaces before mount sign *)
19 mount { 123 = 456;}mount { 123 = 456;}
22 test Cgconfig.lns get conf2 =
24 { "mount" { "123" = "456"} }
26 { "mount" { "123" = "456"} }
29 { "mount" { "123" = "456"} }
30 { "mount" { "123" = "456" } }
33 let conf3="#cgconfig test cofiguration file
38 test Cgconfig.lns get conf3 =
39 { "#comment" = "cgconfig test cofiguration file" }
43 { "#comment" = "eswkh" }
47 let conf4="#cgconfig test cofiguration file
51 mount { 323=324;}mount{324=5343; }# this is a comment
54 test Cgconfig.lns get conf4 =
55 {"#comment" = "cgconfig test cofiguration file" }
62 { "mount" { "323" = "324" } }
63 { "mount" { "324" = "5343" } }
64 { "#comment" = "this is a comment" }
75 test Cgconfig.lns get group1 =
79 { "controller" = "cpuacct"
84 { "controller" = "cpu" { } }
95 test Cgconfig.lns get group2 =
124 test Cgconfig.lns get group3 =
141 { "#comment" = "no aaa" }
178 devices = /mnt/cgroups/devices;cpuacct = /mnt/cgroups/cpuset;
179 cpuset = /mnt/cgroups/cpuset;
183 # cpuset = /mnt/cgroups/cpuset2;
186 devices = /mnt/cgroups/devices;
187 # cpuacct = /mnt/cgroups/cpuacct;
188 ns = /mnt/cgroups/ns;
194 test Cgconfig.lns get group4 =
196 { "#comment" = "group daemons {" }
197 { "#comment" = "cpuacct{" }
201 { "group" = "daemons/ftp"
203 { "controller" = "cpuacct" { } }
207 { "group" = "daemons/www"
226 { "#comment" = "cpu {" }
227 { "#comment" = "cpu.shares = 1000;" }
228 { "#comment" = "}" } }
235 { "devices" = "/mnt/cgroups/devices" }
236 { "cpuacct" = "/mnt/cgroups/cpuset" }
238 { "cpuset" = "/mnt/cgroups/cpuset" }
242 { "cpu" = "/mnt/cpu" }
244 { "#comment" = "cpuset = /mnt/cgroups/cpuset2;" } }
248 { "devices" = "/mnt/cgroups/devices" }
250 { "#comment" = "cpuacct = /mnt/cgroups/cpuacct;" }
251 { "ns" = "/mnt/cgroups/ns" }
257 test Cgconfig.lns put "group tst {memory {}}" after
259 = "group tst2 {memory {}}"
275 test Cgconfig.lns get group5 =
279 { "controller" = "cpuacct" }
281 { "controller" = "cpu" }
283 { "controller" = "cpuset" }
285 { "controller" = "devices" }
287 { "controller" = "freezer" }
289 { "controller" = "memory" }
291 { "controller" = "net_cls" }
293 { "controller" = "blkio" }
295 { "controller" = "hugetlb" }
297 { "controller" = "perf_event" }
301 (* quoted controller parameter whitespace *)
305 blkio.throttle.read_iops_device=\"8:0 50\";
309 test Cgconfig.lns get group6 =
311 { "group" = "blklimit"
313 { "controller" = "blkio"
315 { "blkio.throttle.read_iops_device" = "\"8:0 50\"" }