-
Notifications
You must be signed in to change notification settings - Fork 56
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
RFE: support for SCMP_FLTATR_CTL_OPTIMIZE, SCMP_FLTATR_API_SYSRAWRC #75
Conversation
3bec561
to
94d13ad
Compare
|
Commit 23edf06 moved the SetBadArchAction(ActInvalid) check to the end of TestFilterAttributeGettersAndSetters. A few subsequent commits added more code before it, until finally commit 541420d added a conditional t.Skipf before it. As a result, this check is not performed with latest libseccomp. Move it back to where it belongs (before the API/version checks). Signed-off-by: Kir Kolyshkin <[email protected]>
1. Use checkAPI to check for minimal API level and libseccomp version requirements. 2. TestFilterAttributeGettersAndSetters tests multiple things, requiring different API levels and libseccomp versions. It should not use t.Skip in the middle of the test, since the end result is going to be "SKIP" instead of "PASS". In the middle of the test, use return to skip the part of the test. 3. While at it, don't use t.Logf/t.Errorf if there are no %-style arguments. Signed-off-by: Kir Kolyshkin <[email protected]>
Introduce (*ScmpFilter).GetOptimize and (*ScmpFilter).SetOptimize methods, together with the documentation and trivial tests. Signed-off-by: Kir Kolyshkin <[email protected]>
Introduce (*ScmpFilter).GetRawRC and (*ScmpFilter).SetRawRC methods, together with the documentation and trivial tests. Signed-off-by: Kir Kolyshkin <[email protected]>
No longer a draft |
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.
Looks good to me, @drakenclimber ?
Acked-by: Paul Moore <[email protected]>
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.
Looks good to me, @kolyshkin. Thanks.
Acked-by: Tom Hromatka <[email protected]>
Merged at HEAD 460967f, thanks! |
Test fixups.
Those are fixups in test case used by the following commits.
Let me know if you want a separate PR for that (first two commits).
Add support for
SCMP_FLTATR_CTL_OPTIMIZE
Introduce
(*ScmpFilter).GetOptimize
and(*ScmpFilter).SetOptimize
methods, together with the documentation and trivial tests.
Add support for
SCMP_FLTATR_API_SYSRAWRC
Introduce
(*ScmpFilter).GetRawRC
and(*ScmpFilter).SetRawRC
methods, together with the documentation and trivial tests.
Addresses: #37