Skip to content

Commit

Permalink
add a test for warnning on ambient caps setting error
Browse files Browse the repository at this point in the history
Signed-off-by: lfbzhm <[email protected]>
  • Loading branch information
lifubang committed Sep 27, 2024
1 parent 063bd24 commit 4051eaa
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/integration/capabilities.bats
Original file line number Diff line number Diff line change
Expand Up @@ -136,3 +136,11 @@ function teardown() {
[[ "${output}" == *"CapBnd: 0000000400000021"* ]]
[[ "${output}" == *"CapAmb: 0000000000000000"* ]]
}

@test "runc run [ambient caps not set in inheritable result in a warning]" {
update_config ' .process.capabilities.inheritable = ["CAP_KILL"]
| .process.capabilities.ambient = ["CAP_KILL", "CAP_AUDIT_WRITE"]'
runc run test_amb
[ "$status" -eq 0 ]
[[ "$output" == **"unable to set Ambient capabilities:"* ]]
}

0 comments on commit 4051eaa

Please sign in to comment.