-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add a test for runc exec --cap #4406
Conversation
Signed-off-by: lifubang <lifubang@acmcoder.com>
[[ "${output}" == *"CapBnd: 0000000400000021"* ]] | ||
[[ "${output}" == *"CapEff: 0000000000000021"* ]] | ||
[[ "${output}" == *"CapPrm: 0000000000000021"* ]] | ||
[[ "${output}" == *"CapAmb: 0000000000000001"* ]] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe add comments to help understanding these bitmasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, I'll add them later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM @lifubang do you want to add the comments before merging?
update_config '.process.capabilities.inheritable = ["CAP_CHOWN", "CAP_SYSLOG"]' | ||
update_config '.process.capabilities.ambient = ["CAP_CHOWN"]' | ||
__runc run -d test_some_caps | ||
[ "$status" -eq 0 ] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are not checking runc exit code here, because __runc
doesn't use bats' run
which sets $status
.
If you copied this code from some other place -- that place is also wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need to explain (either in a commit message or in the test itself) what exactly are you checking for.
I will add this test to #4367. |
Will be moved to another PR and adjusted to check for the status
This is now part of #4367. |
No description provided.