-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Clean up seccomp tests #4945
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
Merged
Merged
Clean up seccomp tests #4945
Conversation
This file contains hidden or 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #4945 +/- ##
=======================================
Coverage 83.98% 83.98%
=======================================
Files 251 251
Lines 27889 27889
=======================================
Hits 23422 23422
Misses 4467 4467
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
kalyazin
reviewed
Dec 5, 2024
078346a
to
10613c8
Compare
roypat
previously approved these changes
Dec 6, 2024
ab52ac7
to
a65d8ad
Compare
It makes it easier to configure pylint Signed-off-by: Pablo Barbáchano <[email protected]>
I think this lint is not useful, and makes writing small classes more difficult than it needs to be. Signed-off-by: Pablo Barbáchano <[email protected]>
- convert inline JSON to dicts - use pytest temporary files instead of tempfile - create a seccompiler fixture to make running it easy Signed-off-by: Pablo Barbáchano <[email protected]>
seccompiler --basic filters are deprecated Signed-off-by: Pablo Barbáchano <[email protected]>
9b15435
to
631fd04
Compare
kalyazin
reviewed
Dec 11, 2024
Add a test to validate that a seccomp filter works as defined in the JSON description. To do this we use a simple C program that just loads a given seccomp filter and calls a syscall also given in the arguments. Signed-off-by: Pablo Barbáchano <[email protected]>
kalyazin
approved these changes
Dec 11, 2024
roypat
approved these changes
Dec 11, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Priority: Medium
Indicates than an issue or pull request should be resolved ahead of issues or pull requests labelled
python
Pull requests that update Python code
Status: Awaiting review
Indicates that a pull request is ready to be reviewed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
While looking at seccomp and associated tests, I noticed they were a bit verbose. Refactored to make them simpler.
Also reflect one seccompiler deprecation and move pylint config to a
pyproject.toml
.Reason
...
License Acceptance
By submitting this pull request, I confirm that my contribution is made under
the terms of the Apache 2.0 license. For more information on following Developer
Certificate of Origin and signing off your commits, please check
CONTRIBUTING.md
.PR Checklist
tools/devtool checkstyle
to verify that the PR passes theautomated style checks.
how they are solving the problem in a clear and encompassing way.
in the PR.
CHANGELOG.md
.Runbook for Firecracker API changes.
integration tests.
TODO
.rust-vmm
.