Skip to content

Commit 5c5ebe7

Browse files
committed
tests/int/scheduler: require smp
This test case fails when there's a single CPU. Fix this by adding "require smp". While at it, document the test case and add a FIXME to maybe remove this test later. Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 854c4af commit 5c5ebe7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/integration/scheduler.bats

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,21 @@ function teardown() {
2525
[[ "${lines[2]}" == *"runtime/deadline/period parameters: 42000/1000000/1000000" ]]
2626
}
2727

28+
# Checks that runc emits a specific error when scheduling policy is used
29+
# together with specific CPUs. As documented in sched_setattr(2):
30+
#
31+
# ERRORS:
32+
# ...
33+
# EPERM The CPU affinity mask of the thread specified by pid does not
34+
# include all CPUs in the system (see sched_setaffinity(2)).
35+
#
2836
@test "scheduler vs cpus" {
37+
requires smp
38+
2939
update_config ' .linux.resources.cpu.cpus = "0"
3040
| .process.scheduler = {"policy": "SCHED_DEADLINE", "nice": 19, "runtime": 42000, "deadline": 1000000, "period": 1000000, }'
3141

3242
runc run -d --console-socket "$CONSOLE_SOCKET" test_scheduler
3343
[ "$status" -eq 1 ]
44+
[[ "$output" == *"process scheduler can't be used together with AllowedCPUs"* ]]
3445
}

0 commit comments

Comments
 (0)