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: fix various bugs found when working on code coverage #182

Closed
wants to merge 6 commits into from

Conversation

pcmoore
Copy link
Member

@pcmoore pcmoore commented Nov 6, 2019

While working to claw back some code coverage I ran across two problems which are fixed in this PR. The patches are small and should speak for themselves.

Signed-off-by: Paul Moore <paul@paul-moore.com>
We recently changed how libseccomp handles syscall numbers that are
not defined natively, but we missed test seccomp#15.

Signed-off-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
The clang compiler complains of a potential memory leak, this patch
fixes it.

Signed-off-by: Paul Moore <paul@paul-moore.com>
… tests

This is a bit controversial as historically we've refrained from
doing any tests that rely on the host kernel in the non-live tests,
but I think enough time has past that we can do a simple
seccomp_load() and not break the world's build/test platforms.

The obvious big advantage is we are now testing the basic
prctl()/seccomp() filter load infrastructure as part of the main
regression test run.

Signed-off-by: Paul Moore <paul@paul-moore.com>
Oddly, going from 16.04 to 18.04 results in about a 0.8% reduction
in code coverage.

Signed-off-by: Paul Moore <paul@paul-moore.com>
@pcmoore pcmoore added this to the v2.5 milestone Nov 6, 2019
@coveralls
Copy link

coveralls commented Nov 6, 2019

Coverage Status

Coverage decreased (-0.1%) to 89.741% when pulling 9090255 on pcmoore:ghpr_1 into 94d4292 on seccomp:master.

@pcmoore
Copy link
Member Author

pcmoore commented Nov 11, 2019

FYI: this fixes issue #184.

@pcmoore pcmoore self-assigned this Nov 11, 2019
@pcmoore
Copy link
Member Author

pcmoore commented Nov 11, 2019

I had some other patches that were blocked on this PR so I decided to just add them to this PR since they are related to code coverage testing.

Copy link
Member

@drakenclimber drakenclimber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Adding a non-live test to verify that a very simple seccomp_load() works seems reasonable to me. The other changes in this patchset were straightforward and spot on. Thanks!

Acked-by: Tom Hromatka <tom.hromatka@oracle.com>

@pcmoore
Copy link
Member Author

pcmoore commented Nov 14, 2019

Merged at HEAD e5ef83b, closing.

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

3 participants