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

execsnoop: Fix -x handling #1360

Merged
merged 1 commit into from
Oct 11, 2017
Merged

Conversation

navytux
Copy link
Contributor

@navytux navytux commented Sep 24, 2017

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

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.
@goldshtn
Copy link
Collaborator

[buildbot, ok to test]

@goldshtn
Copy link
Collaborator

@brendangregg Could you please take a look?

@navytux
Copy link
Contributor Author

navytux commented Sep 26, 2017

( 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 )

@goldshtn
Copy link
Collaborator

Yeah, we need to feed the buildbot. @drzaeus77

@navytux
Copy link
Contributor Author

navytux commented Oct 10, 2017

ping @brendangregg, @drzaeus77, @goldshtn

@brendangregg
Copy link
Member

thanks, this fixes it!

@brendangregg
Copy link
Member

[buildbot, ok to test]

@brendangregg
Copy link
Member

... I would merge this, but my merge button is greyed out since the build failed. Gotta fix the build first.

@drzaeus77
Copy link
Collaborator

[buildbot, test this please]

@navytux
Copy link
Contributor Author

navytux commented Oct 11, 2017

Everyone thanks for feedback & action. It is now all green.

@brendangregg brendangregg merged commit 920319d into iovisor:master Oct 11, 2017
@navytux
Copy link
Contributor Author

navytux commented Oct 11, 2017

Thanks.

@navytux navytux deleted the y/execsnoop-x-fix branch July 24, 2018 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants