Skip to content

Commit

Permalink
Merge pull request iovisor#4207 from chantra/test_fix_trace3
Browse files Browse the repository at this point in the history
[test][python] temptatively attach to blk_start_request probe.
  • Loading branch information
davemarchevsky committed Aug 31, 2022
2 parents f2dcfc3 + 7f07581 commit 5bfe444
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions tests/python/test_trace3.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@


class TestBlkRequest(TestCase):
@mayFail("This fails on github actions environment, and needs to be fixed")
def setUp(self):
b = BPF(arg1, arg2, debug=0)
self.latency = b.get_table("latency", c_uint, c_ulong)
b.attach_kprobe(event="blk_start_request",
if BPF.get_kprobe_functions(b"blk_start_request"):
b.attach_kprobe(event="blk_start_request",
fn_name="probe_blk_start_request")
b.attach_kprobe(event="blk_mq_start_request",
fn_name="probe_blk_start_request")
b.attach_kprobe(event="blk_update_request",
fn_name="probe_blk_update_request")
Expand Down
3 changes: 1 addition & 2 deletions tools/biosnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,8 +209,7 @@
b.attach_kprobe(event="blk_account_io_start", fn_name="trace_pid_start")
if BPF.get_kprobe_functions(b'blk_start_request'):
b.attach_kprobe(event="blk_start_request", fn_name="trace_req_start")
else:
b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start")
b.attach_kprobe(event="blk_mq_start_request", fn_name="trace_req_start")
if BPF.get_kprobe_functions(b'__blk_account_io_done'):
b.attach_kprobe(event="__blk_account_io_done", fn_name="trace_req_completion")
else:
Expand Down

0 comments on commit 5bfe444

Please sign in to comment.