github.com/opencontainers/runc@v1.2.0-rc.1.0.20240520010911-492dc558cdd6/tests/integration/ioprio.bats (about) 1 #!/usr/bin/env bats 2 3 load helpers 4 5 function setup() { 6 setup_debian 7 } 8 9 function teardown() { 10 teardown_bundle 11 } 12 13 @test "ioprio_set is applied to process group" { 14 # Create a container with a specific I/O priority. 15 update_config '.process.ioPriority = {"class": "IOPRIO_CLASS_BE", "priority": 4}' 16 17 runc run -d --console-socket "$CONSOLE_SOCKET" test_ioprio 18 [ "$status" -eq 0 ] 19 20 # Check the init process. 21 runc exec test_ioprio ionice -p 1 22 [ "$status" -eq 0 ] 23 [[ "$output" = *'best-effort: prio 4'* ]] 24 25 # Check the process made from the exec command. 26 runc exec test_ioprio ionice 27 [ "$status" -eq 0 ] 28 29 [[ "$output" = *'best-effort: prio 4'* ]] 30 }