<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jul 22, 2022 at 4:53 AM Luke Nowakowski-Krijger <<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">The older function in the cgroup lib 'get_cgroup_mountpoint' has been<br>
removed, so instead replace it with its old functionaility to get<br>
mountpoint.<br>
<br>
Also use the newer cgroup lib require operation to mount and cleanup a<br>
cpu controller.<br>
<br>
Signed-off-by: Luke Nowakowski-Krijger <<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>><br>
---<br>
v2: Use cgroup_require "$subsys" instead of manual greping the path<br>
v3: fixed bug where the ouput of cgroup_get_mountpoint wasnt being<br>
captured<br>
<br>
.../cgroup/cgroup_regression_test.sh | 31 ++++++-------------<br>
1 file changed, 9 insertions(+), 22 deletions(-)<br>
<br>
diff --git a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh<br>
index 69b51773c..bfa9097ec 100755<br>
--- a/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh<br>
+++ b/testcases/kernel/controllers/cgroup/cgroup_regression_test.sh<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">This patch itself looks good.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Note:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">But I got one failure from test7 that was caused by randomly picking up 'rdma' ctrl to test.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">tst_cgroup.c:820: TBROK: 'rdma' controller is unknown to LTP<br>cgroup_regression_test 7 TBROK: cgroup_require: No state was set after call to tst_cgctl require?<br></div><br></div><div><div class="gmail_default" style="font-size:small"> # cat -n cgroup_regression_test.sh</div></div><div class="gmail_default" style="font-size:small"><br></div><div><div class="gmail_default" style="font-size:small"> 359 test7()</div> 360 {<br><div class="gmail_default" style="font-size:small"> ...</div> 371<span class="gmail_default" style="font-size:small"> </span> subsys=`tail -n 1 /proc/cgroups | awk '{ print $1 }'`</div><div><br><div class="gmail_default" style="font-size:small"> 379 }</div><br></div><div><div class="gmail_default" style="font-size:small">Because on my aarch64 (Cgroup V2) test box, the last one in /proc/cgroups:</div><br></div><div><div class="gmail_default" style="font-size:small"># cat /proc/cgroups</div>#subsys_name hierarchy num_cgroups enabled<br>cpuset 3 3 1<br>cpu 2 82 1<br>cpuacct 2 82 1<br>blkio 9 82 1<br>memory 12 288 1<br>devices 4 82 1<br>freezer 11 3 1<br>net_cls 6 3 1<br>perf_event 8 3 1<br>net_prio 6 3 1<br>hugetlb 10 3 1<br>pids 5 110 1<br>rdma 7 1 1<br><div class="gmail_default" style="font-size:small"></div></div><div><br></div><div><br></div><div><div class="gmail_default" style="font-size:small">Anyway, we can fix this by picking a supported cgroup ctrl in a separate patch.</div><br></div></div><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>