linux/tools/testing/selftests/cgroup
Sun Shaojie 645c3b7ef1 cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update
When sibling CPU exclusion occurs, a partition's effective_xcpus may be
a subset of its user_xcpus. The partcmd_update path must use
effective_xcpus instead of user_xcpus when calculating CPUs to return
to or request from the parent.

Add two test cases to verify this behavior:

  1) Narrowing cpuset.cpus to only the sibling-excluded CPUs should not
     return CPUs to parent that the partition never actually owned.

  2) Expanding cpuset.cpus after a sibling becomes a member should
     correctly request the additional CPUs from parent.

Co-developed-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
Signed-off-by: Zhang Guopeng <zhangguopeng@kylinos.cn>
Signed-off-by: Sun Shaojie <sunshaojie@kylinos.cn>
Reviewed-by: Waiman Long <longman@redhat.com>
Signed-off-by: Tejun Heo <tj@kernel.org>
2026-05-27 08:59:17 -10:00
..
lib selftests/cgroup: Fix cg_read_strcmp() empty string comparison 2026-05-10 15:53:44 -10:00
.gitignore selftests: cgroup: Add basic tests for pids controller 2024-05-26 08:45:10 -10:00
config mm: remove CONFIG_MEMCG_KMEM 2024-07-10 12:14:54 -07:00
Makefile cgroup: selftests: Move cgroup_util into its own library 2025-05-16 11:45:15 -07:00
memcg_protection.m selftests: memcg: adjust expected reclaim values of protected cgroups 2022-05-27 09:33:45 -07:00
test_core.c selftests/cgroup: Don't require synchronous populated update on task exit 2026-03-24 10:21:57 -10:00
test_cpu.c Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
test_cpuset_prs.sh cgroup/cpuset: Add test cases for sibling CPU exclusion on partition update 2026-05-27 08:59:17 -10:00
test_cpuset_v1_base.sh selftests/cgroup: Fix string comparison in write_test 2026-05-10 15:54:12 -10:00
test_cpuset_v1_hp.sh selftests/cgroup: use bash in test_cpuset_v1_hp.sh 2025-02-04 09:36:54 -10:00
test_cpuset.c Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
test_freezer.c Significant patch series in this pull request: 2025-12-06 14:01:20 -08:00
test_hugetlb_memcg.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
test_kill.c selftests/cgroup: Don't require synchronous populated update on task exit 2026-03-24 10:21:57 -10:00
test_kmem.c selftests/cgroup: Fix error path leaks in test_percpu_basic 2026-05-13 08:40:52 -10:00
test_memcontrol.c mm.git review status for linus..mm-stable 2026-04-15 12:59:16 -07:00
test_pids.c selftests: complete kselftest include centralization 2025-11-27 14:24:31 -08:00
test_stress.sh kseltest/cgroup: Make test_stress.sh work if run interactively 2022-05-13 09:33:21 -10:00
test_zswap.c selftests/cgroup: add test for zswap incompressible pages 2026-04-05 13:53:00 -07:00
wait_inotify.c kselftest/cgroup: Add cpuset v2 partition root state test 2022-09-04 10:47:28 -10:00
with_stress.sh selftests: cgroup: Run test_core under interfering stress 2019-10-07 07:11:54 -07:00