mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
bfbd0305ba
Signed-off-by: utam0k <k0ma@utam0k.jp>
31 lines
653 B
Bash
31 lines
653 B
Bash
#!/usr/bin/env bats
|
|
|
|
load helpers
|
|
|
|
function setup() {
|
|
setup_debian
|
|
}
|
|
|
|
function teardown() {
|
|
teardown_bundle
|
|
}
|
|
|
|
@test "ioprio_set is applied to process group" {
|
|
# Create a container with a specific I/O priority.
|
|
update_config '.process.ioPriority = {"class": "IOPRIO_CLASS_BE", "priority": 4}'
|
|
|
|
runc run -d --console-socket "$CONSOLE_SOCKET" test_ioprio
|
|
[ "$status" -eq 0 ]
|
|
|
|
# Check the init process.
|
|
runc exec test_ioprio ionice -p 1
|
|
[ "$status" -eq 0 ]
|
|
[[ "$output" = *'best-effort: prio 4'* ]]
|
|
|
|
# Check the process made from the exec command.
|
|
runc exec test_ioprio ionice
|
|
[ "$status" -eq 0 ]
|
|
|
|
[[ "$output" = *'best-effort: prio 4'* ]]
|
|
}
|