-
Notifications
You must be signed in to change notification settings - Fork 3.9k
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
execsnoop: Fix -x handling #1360
Conversation
Execsnoop's documentation says -x/--fails means "also include failed exec()s". However it was programmed to instead skip successful execs on -x and without -x show all - successful and unsuccessful ones. The logic was broken in 5b47e0f ("execsnoop: use BPF_PERF_OUTPUT instead of trace pipe"). Fix it. P.S. current test_tools_smoke.py only provides basic infrastructure for testing whether tool's BPF program won't break, without anything related to options handling, so unfortunately the patch comes without corresponding test.
[buildbot, ok to test] |
@brendangregg Could you please take a look? |
( Ubuntu Jenkins failure is probably due to some git/networking glitch: https://buildbot.iovisor.org/jenkins/job/bcc-pr/645/label=ubuntu1604/console, not this patch; builds on fc24 and fc25 succeeded ) |
Yeah, we need to feed the buildbot. @drzaeus77 |
ping @brendangregg, @drzaeus77, @goldshtn |
thanks, this fixes it! |
[buildbot, ok to test] |
... I would merge this, but my merge button is greyed out since the build failed. Gotta fix the build first. |
[buildbot, test this please] |
Everyone thanks for feedback & action. It is now all green. |
Thanks. |
Execsnoop's documentation says -x/--fails means "also include failed
exec()s". However it was programmed to instead skip successful execs on
-x, and without -x shows all - successful and unsuccessful ones.
The logic was broken in 5b47e0f ("execsnoop: use BPF_PERF_OUTPUT
instead of trace pipe").
Fix it.
P.S. current test_tools_smoke.py only provides basic infrastructure for
testing whether tool's BPF program won't break, without anything related
to options handling, so unfortunately the patch comes without
corresponding test.
/cc @brendangregg, @markdrayton