Skip to content

Commit 92841d6

Browse files
Waiman-Longhtejun
authored andcommitted
selftest/cgroup: Add new test cases to test_cpuset_prs.sh
Add new test cases to test_cpuset_prs.sh to cover corner cases reported in previous fix commits. Signed-off-by: Waiman Long <[email protected]> Signed-off-by: Tejun Heo <[email protected]>
1 parent 9957030 commit 92841d6

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tools/testing/selftests/cgroup/test_cpuset_prs.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ TEST_MATRIX=(
321321
# old-A1 old-A2 old-A3 old-B1 new-A1 new-A2 new-A3 new-B1 fail ECPUs Pstate ISOLCPUS
322322
# ------ ------ ------ ------ ------ ------ ------ ------ ---- ----- ------ --------
323323
#
324-
# Incorrect change to cpuset.cpus invalidates partition root
324+
# Incorrect change to cpuset.cpus[.exclusive] invalidates partition root
325325
#
326326
# Adding CPUs to partition root that are not in parent's
327327
# cpuset.cpus is allowed, but those extra CPUs are ignored.
@@ -365,6 +365,16 @@ TEST_MATRIX=(
365365
# cpuset.cpus can overlap with sibling cpuset.cpus.exclusive but not subsumed by it
366366
" C0-3 . . C4-5 X5 . . . 0 A1:0-3,B1:4-5"
367367
368+
# Child partition root that try to take all CPUs from parent partition
369+
# with tasks will remain invalid.
370+
" C1-4:P1:S+ P1 . . . . . . 0 A1:1-4,A2:1-4 A1:P1,A2:P-1"
371+
" C1-4:P1:S+ P1 . . . C1-4 . . 0 A1,A2:1-4 A1:P1,A2:P1"
372+
" C1-4:P1:S+ P1 . . T C1-4 . . 0 A1:1-4,A2:1-4 A1:P1,A2:P-1"
373+
374+
# Clearing of cpuset.cpus with a preset cpuset.cpus.exclusive shouldn't
375+
# affect cpuset.cpus.exclusive.effective.
376+
" C1-4:X3:S+ C1:X3 . . . C . . 0 A2:1-4,XA2:3"
377+
368378
# old-A1 old-A2 old-A3 old-B1 new-A1 new-A2 new-A3 new-B1 fail ECPUs Pstate ISOLCPUS
369379
# ------ ------ ------ ------ ------ ------ ------ ------ ---- ----- ------ --------
370380
# Failure cases:

0 commit comments

Comments
 (0)