[LTP] [PATCH v3 18/18] controllers: update cgroup_regression_test to use newer cgroup lib
Li Wang
liwang@redhat.com
Tue Jul 26 05:33:46 CEST 2022
On Fri, Jul 22, 2022 at 4:53 AM Luke Nowakowski-Krijger <
luke.nowakowskikrijger@canonical.com> wrote:
> The older function in the cgroup lib 'get_cgroup_mountpoint' has been
> removed, so instead replace it with its old functionaility to get
> mountpoint.
>
> Also use the newer cgroup lib require operation to mount and cleanup a
> cpu controller.
>
> Signed-off-by: Luke Nowakowski-Krijger <
> luke.nowakowskikrijger@canonical.com>
> ---
> v2: Use cgroup_require "$subsys" instead of manual greping the path
> v3: fixed bug where the ouput of cgroup_get_mountpoint wasnt being
> captured
>
> .../cgroup/cgroup_regression_test.sh | 31 ++++++-------------
> 1 file changed, 9 insertions(+), 22 deletions(-)
>
> diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> index 69b51773c..bfa9097ec 100755
> --- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
> +++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh
>
This patch itself looks good.
Note:
But I got one failure from test7 that was caused by randomly picking up
'rdma' ctrl to test.
tst_cgroup.c:820: TBROK: 'rdma' controller is unknown to LTP
cgroup_regression_test 7 TBROK: cgroup_require: No state was set after call
to tst_cgctl require?
# cat -n cgroup_regression_test.sh
359 test7()
360 {
...
371 subsys=`tail -n 1 /proc/cgroups | awk '{ print $1 }'`
379 }
Because on my aarch64 (Cgroup V2) test box, the last one in /proc/cgroups:
# cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 3 3 1
cpu 2 82 1
cpuacct 2 82 1
blkio 9 82 1
memory 12 288 1
devices 4 82 1
freezer 11 3 1
net_cls 6 3 1
perf_event 8 3 1
net_prio 6 3 1
hugetlb 10 3 1
pids 5 110 1
rdma 7 1 1
Anyway, we can fix this by picking a supported cgroup ctrl in a separate
patch.
--
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220726/84b728a2/attachment.htm>
More information about the ltp
mailing list