-
Notifications
You must be signed in to change notification settings - Fork 169
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
Conversation
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
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)
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
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.
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.