Skip to content

Commit

Permalink
[test][python] temptatively attach to blk_start_request probe.
Browse files Browse the repository at this point in the history
`blk_start_request` is gone since kernel 5. This patch is in the same vein as iovisor#4124
except that we only conditionally attach to `blk_start_request` but attach also attach to
`blk_mq_start_request`.

Fixes iovisor#4206
  • Loading branch information
chantra committed Aug 31, 2022
1 parent 76fb1e2 commit e56fdf8
Showing 1 changed file with 4 additions and 2 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

0 comments on commit e56fdf8

Please sign in to comment.