-
Notifications
You must be signed in to change notification settings - Fork 355
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
Check capabilities in youki info subcommand #1389
Conversation
af5aa5e
to
42b3b44
Compare
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #1389 +/- ##
==========================================
- Coverage 68.80% 68.65% -0.15%
==========================================
Files 119 119
Lines 12664 12692 +28
==========================================
+ Hits 8713 8714 +1
- Misses 3951 3978 +27 |
Hey, the CI is failing due to a lint error |
5652b7c
to
172e9c2
Compare
Hey @udzura apologies for the delay, but can you clarify the above? Apart from that this PR is good to go 👍 |
Apologies, just find the questions!
No, but if anything, I just encountered the same error as referred in #1349 . If
I've considered this in advance, but I find there are so many capability flags to show in solo command. Maybe a special flag such as |
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.
Hey, Apologies, can I ask you for two small changes?
crates/youki/src/commands/info.rs
Outdated
"available" | ||
} else { | ||
"unsupported" |
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.
Can we have either supported
and unsupported
or available
and unavailable
? I thought on it and it feels it'd be better if we have one of these two
crates/youki/src/commands/info.rs
Outdated
@@ -223,6 +224,38 @@ pub fn print_namespaces() { | |||
} | |||
} | |||
|
|||
#[inline] | |||
fn get_cap_supported(caps: &caps::CapsHashSet, cap: caps::Capability) -> &'static str { |
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.
can we rename this to is_cap_supported
oris_cap_available
depending on how we are wording the output?
Hey @udzura , would it be possible for you to make the changes? If you are busy, I'd be happy to push a commit in this PR and merge. Please let me know :) |
@YJDoc2 Very sorry for being late! I've applied suggestions. |
3fef8d2
to
80904dd
Compare
Signed-off-by: Uchio Kondo <[email protected]>
Signed-off-by: Uchio Kondo <[email protected]>
Signed-off-by: Uchio Kondo <[email protected]>
Signed-off-by: Uchio Kondo <[email protected]>
80904dd
to
01a492e
Compare
Signed-off-by: Uchio Kondo <[email protected]>
e695ea6
to
7757267
Compare
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 👍 Thanks for your contribution!
Shows supported capabilities that started to be supported in recent kernel release.
At first I tried to call
caps::drop()
actually for each newly added caps, but it required privilege. So I just check these caps from defaultCapSet::Bounding
.