Hello.

On Wed, Sep 16, 2026 at 07:14:45PM +0800, Shaojie Sun <[email protected]> 
wrote:
> ---
> RFC.  This adds the missing selftest coverage for how /proc/$PID/cgroup is
> rendered for cgroup namespaces: the behavior is documented in
> Documentation/admin-guide/cgroup-v2.rst (section "Namespace"), but nothing
> in tools/testing/selftests exercises it.

What lead you to consider this as the missing coverage? (Are you using
some kcov reports or just the docs?)
What reasons do you see for this to break?

> 
> Two points I would like feedback on before asking for a merge:
> 
>   - The third case, a process moved into a sibling cgroup of its namespace
>     root, needs the parent and the child to synchronize, which is about a
>     third of the file.  Letting the child migrate itself after unsharing
>     would remove most of that code, but with the nsdelegate mount option
>     (which systemd sets by default) cgroup_procs_write_permission()
>     rejects the migration with -ENOENT, so the test could only skip on
>     exactly the setups where the behavior matters.  Keep the coverage and
>     the synchronization, prefer the smaller test, or split the file into a
>     basic-view patch and a boundary patch?

Looking at the sibling cgns is not so common, hence the test isn't
easily implementable. I prefer the smaller test w/out this case. (If the
child checked /proc/<other-pid>/cgroup, perhaps it could be simpler but
some synchronization is likely unavoidable.)

> 
>   - I kept the ksft_* style with a tests[] table which the other tests in
>     this directory use.  If new tests should use kselftest_harness.h
>     instead, I can switch.

I'd like to gradually move to the harness, i.e. potential new code could
use that.

> This is an RFC, not a merge request yet.

Thank you

Michal

Attachment: signature.asc
Description: PGP signature

Reply via email to