<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 Sat, Mar 5, 2022 at 7:18 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">Mounting the v1 blkio controller while v2 io controller is mounted<br>
unmounts the io controller, triggering a tst_brk that the number of<br>
controller has gone down.<br>
<br>
Because these controllers don't seem to be compatible, tst_brk with<br>
TCONF and report that we refused to mount the blkio controller while the<br>
io controller is mounted.<br>
<br>
Signed-off-by: Luke Nowakowski-Krijger <<a href="mailto:luke.nowakowskikrijger@canonical.com" target="_blank">luke.nowakowskikrijger@canonical.com</a>><br>
---<br>
lib/tst_cgroup.c | 5 +++++<br>
1 file changed, 5 insertions(+)<br>
<br>
diff --git a/lib/tst_cgroup.c b/lib/tst_cgroup.c<br>
index 4e14a2895..52cbf680b 100644<br>
--- a/lib/tst_cgroup.c<br>
+++ b/lib/tst_cgroup.c<br>
@@ -691,6 +691,11 @@ static void cgroup_mount_v1(struct cgroup_ctrl *const ctrl)<br>
char mnt_path[PATH_MAX];<br>
int made_dir = 0;<br>
<br>
+ if (ctrl->ctrl_indx == CTRL_BLKIO && controllers[CTRL_IO].ctrl_root) {<br>
+ tst_brk(TCONF,<br>
+ "IO controller found on V2 root, skipping blkio mount that would unmount IO controller");<br>
+ }<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Although we do a TCONF break here, there is still a need to check tst_cgctl</div><div class="gmail_default" style="font-size:small">return value in cgroup_require(). Otherwise, test report failure like below:</div></div><div><br></div><div><div class="gmail_default" style="font-size:small">tst_cgroup.c:702: TCONF: IO controller found on V2 root, skipping blkio mount that would unmount IO controller</div>cgroup_fj_function 1 TBROK: cgroup_require: No state was set after call. Controller 'blkio' maybe does not exist?<br><div class="gmail_default" style="font-size:small"></div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
sprintf(mnt_path, "%s%s", cgroup_mount_ltp_prefix, ctrl->ctrl_name);<br>
<br>
if (!mkdir(mnt_path, 0777)) {<br>
-- <br>
2.32.0<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>