Skip to content
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

Closed
wants to merge 4 commits into from

Commits on Oct 12, 2021

  1. TestFilterAttributeGettersAndSetters: fixup

    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 <kolyshkin@gmail.com>
    kolyshkin committed Oct 12, 2021
    Configuration menu
    Copy the full SHA
    e7dfd95 View commit details
    Browse the repository at this point in the history
  2. tests: fix wrt API level and libseccomp version checks

    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 <kolyshkin@gmail.com>
    kolyshkin committed Oct 12, 2021
    Configuration menu
    Copy the full SHA
    b34ed64 View commit details
    Browse the repository at this point in the history
  3. Add support for SCMP_FLTATR_CTL_OPTIMIZE

    Introduce (*ScmpFilter).GetOptimize and (*ScmpFilter).SetOptimize
    methods, together with the documentation and trivial tests.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 12, 2021
    Configuration menu
    Copy the full SHA
    2ea6e39 View commit details
    Browse the repository at this point in the history
  4. Add support for SCMP_FLTATR_API_SYSRAWRC

    Introduce (*ScmpFilter).GetRawRC and (*ScmpFilter).SetRawRC
    methods, together with the documentation and trivial tests.
    
    Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
    kolyshkin committed Oct 12, 2021
    Configuration menu
    Copy the full SHA
    bb2ca29 View commit details
    Browse the repository at this point in the history