-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[release-4.18] OCPBUGS-45616: performanceprofile cpuset input validat…
…ion (#1239) * performanceprofile cpuset input validation This fix ensures that the input for any CPU set field is valid. If an invalid string that does not represent a valid CPU set is provided, the admission webhook will return an appropriate error, such as: spec.cpu: Internal error: strconv.Atoi: parsing "garbage": invalid syntax This replaces the previous behavior where the server would return an error like: Error from server: error when creating "pp.yaml": admission webhook "vwb.performance.openshift.io" denied the request: panic: runtime error: invalid memory address or nil pointer dereference [recovered]. Signed-off-by: Ronny Baturov <[email protected]> * added fuzz tests for ValidateCPUs function Fuzz test for ValidateCPUs to verify it handles both valid and invalid inputs without panicking. This ensures that all potential errors are exercised and no panic occurs during execution. Signed-off-by: Ronny Baturov <[email protected]> --------- Signed-off-by: Ronny Baturov <[email protected]> Co-authored-by: Ronny Baturov <[email protected]>
- Loading branch information
1 parent
0593ea3
commit 49ab6f7
Showing
3 changed files
with
47 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters