Skip to content

Conversation

@HoyeonRhee
Copy link
Contributor

@HoyeonRhee HoyeonRhee commented Sep 17, 2025

Some BCC tools currently exit with status code 0 even when encountering
fatal errors. This makes it impossible to distinguish between success and
failure, which makes smoke tests (and packaging checks) unreliable.

Examples are:

  • No kprobe or tracepoint event attached
  • Missing required symbols in /proc/kallsyms
  • Invalid or conflicting command-line options

This PR updates the BCC python tools to consistently return exit(1) in
these cases. This ensures errors are clearly reported and allows the
tools to be used more effectively in automated workflows such as smoke
testing.

Several tools were using plain exit() when no kprobes or tracepoints
could be attached. This returned 0 to the shell, incorrectly signaling
success. Update these cases to use exit(1) so the failure is properly
reported to the caller.

Signed-off-by: Hoyeon Lee <[email protected]>
When symbols such as *_file_operations or vm_zone_stat are not found
in /proc/kallsyms, the scripts exited with code 0. Change these cases
to exit(1) so that missing symbol errors are reported correctly, rather
than appearing as successful termination.

Signed-off-by: Hoyeon Lee <[email protected]>
Many tools were exiting with code 0 when given invalid or conflicting
options (e.g. mutually exclusive arguments, zero intervals). This patch
updates those cases to exit(1), ensuring argument errors propagate as
failures to the caller.

Signed-off-by: Hoyeon Lee <[email protected]>
@ekyooo ekyooo merged commit e58d680 into iovisor:master Sep 29, 2025
1 of 12 checks passed
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.

2 participants