Skip to content

Commit

Permalink
Merge pull request iovisor#4097 from davemarchevsky/davemarchevsky_fi…
Browse files Browse the repository at this point in the history
…x_test

tests/python: @mayFail offcputime in py_smoke_tests
  • Loading branch information
davemarchevsky committed Jul 8, 2022
2 parents fbc1540 + 984d24c commit d7dcbb5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/python/test_tools_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ def test_nfsdist(self):
pass

@skipUnless(kernel_version_ge(4,6), "requires kernel >= 4.6")
@mayFail("This fails on github actions environment, and needs to be fixed")
def test_offcputime(self):
self.run_with_duration("offcputime.py 1")

Expand Down
7 changes: 4 additions & 3 deletions tools/offcputime.py
Original file line number Diff line number Diff line change
Expand Up @@ -246,12 +246,13 @@ def signal_ignore(signal, frame):
if args.kernel_threads_only and args.user_stacks_only:
print("ERROR: Displaying user stacks for kernel threads " +
"doesn't make sense.", file=stderr)
exit(1)
exit(2)

if debug or args.ebpf:
print(bpf_text)
if args.ebpf:
exit()
print("ERROR: Exiting")
exit(3)

# initialize BPF
b = BPF(text=bpf_text)
Expand All @@ -260,7 +261,7 @@ def signal_ignore(signal, frame):
matched = b.num_open_kprobes()
if matched == 0:
print("error: 0 functions traced. Exiting.", file=stderr)
exit(1)
exit(4)

# header
if not folded:
Expand Down

0 comments on commit d7dcbb5

Please sign in to comment.