[LTP] [PATCH] cgroup_dir_mk: set the umask to '0' before creating the subdir

Petr Vorel pvorel@suse.cz
Fri Mar 1 12:51:31 CET 2024


Hi Li, Wei,

> This is to resolve the permission issue when creating
> a new subdir in the cgroup, in case of system's default
> umask is 0077, this will trigger issues for LTP case.

>  cgroup_core01.c will report following error msg:
>  cgroup_core01.c:50: TBROK: openat(21</sys/fs/cgroup/memory/ltp/test-3519/child_b>, 'tasks', 2, 0): EACCES (13)

Reviewed-by: Petr Vorel <pvorel@suse.cz>

Setting this on single place which *should* fix problems, but still not affect
whole LTP API looks good to me. BTW there were more tests which needed it,
e.g. testcases/kernel/syscalls/statx/statx07.c
https://patchwork.ozlabs.org/project/ltp/patch/20240222031018.12281-3-wegao@suse.com/

Therefore this solves just some problems.

Kind regards,
Petr


More information about the ltp mailing list