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

BUG: backport arch fixes, TravisCI to GH Actions conversion, and code coverage tweaks #331

Merged
merged 13 commits into from
Aug 12, 2021

Conversation

pcmoore
Copy link
Member

@pcmoore pcmoore commented Aug 12, 2021

This is a backport of PR #330 and the requisite GH Actions patches. The only noteworthy change is the removal of the SuperH arch/ABI as we do not support that in the libseccomp v2.5.x releases.

drakenclimber and others added 13 commits August 12, 2021 12:35
Disable Travis CI by deleting the .travis.yml file.  Subsequent
commits will enable the Github Actions continuous integration.

Signed-off-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit dc775c0)
Delete the unused variable 'len' from scmp_bpf_disasm.

scan-build identified the following two warnings:

    scmp_bpf_disasm.c:304:10: warning: Although the value stored to 'len'
    is used in the enclosing expression, the value is never actually read
    from 'len'
            while ((len = fread(&bpf, sizeof(bpf), 1, file))) {

    scmp_bpf_disasm.c:441:10: warning: Although the value stored to 'len' is
    used in the enclosing expression, the value is never actually read from
    'len'
            while ((len = fread(&bpf, sizeof(bpf), 1, file))) {

Signed-off-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 947ecc8)
Add Github Actions workflow and actions to run the automated
libseccomp tests and gather code coverage metrics.

Signed-off-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit fe06841)
Travis CI has now been disabled.  Delete the Travis CI
build status badge and display the Github Actions
continuous integration workflow badge.

Signed-off-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 04245d9)
Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 8e2d449)
Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 255801b)
You can now run multiple test types using the '-T' argument and
the LIBSECCOMP_TSTCFG_TYPE environment variable, for example:

 % cd tests
 % ./regression -T bpf-valgrind,live

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit b465f23)
This allows us to specify the test batches via environment variables
like we do other parts of the test configuration.

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 72609f7)
This is arguably the way it should have been done in the beginning
but TravisCI and Coveralls masked the need for proper standalone
code coverage tests.

With this change simply enabling code coverage during ./configure
and following with a code coverage build should generate proper
gcov/lcov data and a local HTML report, example:

 % ./configure --enable-code-coverage
 % make check-code-coverage

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit a415ef0)
As documented in the function header:

 "This function is to make it easier for developers to temporarily
  add support for gcov/lcov to a test program; it likely should not
  be used in the normal regression tests.  Further, this should only
  be necessary for the "live" tests."

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit cc8d19b)
This should help leverage the recent code coverage changes as well as
some changes to the test framework.  We also add the generated HTML
coverage report to the "codecoverage" artifacts.

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit c261232)
Not only does this reduce the amount of duplicated code
significantly, it removes a lot of the "magic" numbers in the
code, and it happened to catch some bugs too.

Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit 17cbd2c)
Acked-by: Tom Hromatka <[email protected]>
Signed-off-by: Paul Moore <[email protected]>

(imported from commit fcc6012)
@pcmoore pcmoore added this to the v2.5.2 milestone Aug 12, 2021
@pcmoore pcmoore self-assigned this Aug 12, 2021
@pcmoore pcmoore merged commit aa0f858 into seccomp:release-2.5 Aug 12, 2021
@pcmoore
Copy link
Member Author

pcmoore commented Aug 12, 2021

Given that this was just a backport of patches that were already fully ACK'd I've gone ahead and merged this PR since all of the CI tests passed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants