-
-
Notifications
You must be signed in to change notification settings - Fork 408
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
[feature]: Added Validate() function to check if the linux kernel version is lower than 5.15 #1828
Conversation
… than 5.15 Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
@slayerjain @gouravkrosx Kindly review |
…heck Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
@gouravkrosx your requested changes have been integrated |
cli/provider/cmd.go
Outdated
@@ -240,6 +241,18 @@ func (c *CmdConfigurator) AddFlags(cmd *cobra.Command) error { | |||
return nil | |||
} | |||
|
|||
func (c *CmdConfigurator) Validate(ctx context.Context, cmd *cobra.Command) error { | |||
//check if the version of the kernel is above 5.15 for eBPF support | |||
isValidVersion := kernel.CheckKernelVersion(5, 15, 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.
just call it isValid
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.
refactored
Signed-off-by: Akash Singh <akashsingh2210670@gmail.com>
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
Related Issue
Closes: #1811
Describe the changes you've made
Added Validate() function to check if the linux kernel version is lower than 5.15 for eBPF support. Validate() then calls ValidateFlags() for record and test command.
Type of change
Please let us know if any test cases are added
NIL
Please describe the tests(if any). Provide instructions how its affecting the coverage.
NIL
Describe if there is any unusual behaviour of your code(Write
NA
if there isn't)A clear and concise description of it.
NIL
Checklist: