<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 Mon, Sep 28, 2020 at 5:00 PM Richard Palethorpe <<a href="mailto:rpalethorpe@suse.de">rpalethorpe@suse.de</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">Hello Li,<br>
<br>
Li Wang <<a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a>> writes:<br>
<br>
>><br>
>> -static void tst_cgroup2_mount(const char *mnt_path, const char *new_path)<br>
>> +static int cgroup2_mount(const char *mnt_path, const char *new_path)<br>
>><br>
><br>
> We'd like to make the series function name starts with tst_*.<br>
><br>
<br>
The idea is this will be an internal/static function and<br>
tst_cgroup2_mount will be a public function if it is needed. I guess<br>
that eventually there will be features only available in cgroup2, in<br>
which case the test author will want to call tst_cgroup2_mount not<br>
tst_cgroup_mount and they will just want it to fail with tst_brk if<br>
cgroup2 can't be mounted.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">Sounds good.</div></div><div><span class="gmail_default" style="font-size:small"></span> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Infact, if the user wants cpuset or some other V1 only controller, then<br>
they should probably call tst_cgroup1_mount. AFAICT some of these<br>
controllers will not be moved to V2. OTOH a functionally similar feature<br>
may be available in V2, but with a different interface. There is a<br>
difference between requiring a specific controller to test it and<br>
needing some functionality without caring how it is provided.<br>
<br>
So I suggest providing an API for mounting specific cgroup versions and<br>
controllers and an API to mount specific controllers of either version<br>
(i.e. tst_cgroup_mount). Then we can create helper functions to provide<br>
functionality without caring how it is achieved, if we need to do that.<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">This is a really good suggestion.</div></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">
Other comments sound good! I will try creating another patch with<br>
diagnostics.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Thanks!</div><div class="gmail_default" style="font-size:small"></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>