Skip to content

Commit

Permalink
fix verbose output of tools/argdist.py (iovisor#1846)
Browse files Browse the repository at this point in the history
Fix issue iovisor#1845.

The verbose output of argdist.py is broken.
The bpf.open_uprobes/open_kprobes have been
replaced by bpf.uprobe_fds/kprobe_fds.

Fix the argdist.py and add "-v" to the argdist.py test
in test_tools_smoke.py.

Signed-off-by: Yonghong Song <[email protected]>
  • Loading branch information
yonghong-song committed Jun 22, 2018
1 parent 79758cc commit 6070dcb
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tests/python/test_tools_smoke.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ def tearDown(self):
pass

def test_argdist(self):
self.run_with_duration("argdist.py -C 'p::do_sys_open()' -n 1 -i 1")
self.run_with_duration("argdist.py -v -C 'p::do_sys_open()' -n 1 -i 1")

@skipUnless(kernel_version_ge(4,4), "requires kernel >= 4.4")
def test_bashreadline(self):
Expand Down
4 changes: 2 additions & 2 deletions tools/argdist.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,8 +681,8 @@ def _attach(self):
for probe in self.probes:
probe.attach(self.bpf)
if self.args.verbose:
print("open uprobes: %s" % self.bpf.open_uprobes)
print("open kprobes: %s" % self.bpf.open_kprobes)
print("open uprobes: %s" % list(self.bpf.uprobe_fds.keys()))
print("open kprobes: %s" % list(self.bpf.kprobe_fds.keys()))

def _main_loop(self):
count_so_far = 0
Expand Down

0 comments on commit 6070dcb

Please sign in to comment.