Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests/bpf: Add selftests for cgroup1 hierarchy
Add selftests for cgroup1 hierarchy. The result as follows, $ tools/testing/selftests/bpf/test_progs --name=cgroup1_hierarchy torvalds#36/1 cgroup1_hierarchy/test_cgroup1_hierarchy:OK torvalds#36/2 cgroup1_hierarchy/test_root_cgid:OK torvalds#36/3 cgroup1_hierarchy/test_invalid_level:OK torvalds#36/4 cgroup1_hierarchy/test_invalid_cgid:OK torvalds#36/5 cgroup1_hierarchy/test_invalid_hid:OK torvalds#36/6 cgroup1_hierarchy/test_invalid_cgrp_name:OK torvalds#36/7 cgroup1_hierarchy/test_invalid_cgrp_name2:OK torvalds#36/8 cgroup1_hierarchy/test_sleepable_prog:OK torvalds#36 cgroup1_hierarchy:OK Summary: 1/8 PASSED, 0 SKIPPED, 0 FAILED Besides, I also did some stress test similar to the patch #2 in this series, as follows (with CONFIG_PROVE_RCU_LIST enabled): - Continuously mounting and unmounting named cgroups in some tasks, for example: cgrp_name=$1 while true do mount -t cgroup -o none,name=$cgrp_name none /$cgrp_name umount /$cgrp_name done - Continuously run this selftest concurrently, while true; do ./test_progs --name=cgroup1_hierarchy; done They can ran successfully without any RCU warnings in dmesg. Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Link: https://lore.kernel.org/r/20231111090034.4248-7-laoar.shao@gmail.com Signed-off-by: Alexei Starovoitov <ast@kernel.org>
- Loading branch information