Skip to content

Commit

Permalink
trace: Add Fedora Support to trace testing
Browse files Browse the repository at this point in the history
Added distros "fedora", "centos" in trace_UDT_probes.py
for installing packages: "perf", "systemtap-sdt-devel.ppc64le"

Added self.distro_name == "fedora" in perf_uprobe.py
for testing of "perf record .." command

Added self.distro_name == "fedora" in dawr.py to enable extra
setting required to run gdb for fedora

Signed-off-by: Misbah Anjum N <[email protected]>
  • Loading branch information
misanjumn committed Mar 20, 2024
1 parent d9691f2 commit b0bfa71
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
7 changes: 7 additions & 0 deletions trace/dawr.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ def test_read_dawr_v1(self):
executing the program
"""
child, return_value = self.run_cmd('dawr_v1')
i = 0
if self.distro_name == "fedora":
child.sendline('set debuginfod enabled on')
child.expect_exact([pexpect.TIMEOUT, ''])
child.sendline('awatch a')
return_value.append(child.expect_exact(['watchpoint 1: a',
pexpect.TIMEOUT]))
Expand All @@ -88,6 +92,9 @@ def test_read_dawr_v2(self):
"""
child, return_value = self.run_cmd('dawr_v2')
i = 0
if self.distro_name == "fedora":
child.sendline('set debuginfod enabled on')
child.expect_exact([pexpect.TIMEOUT, ''])
for value in ['a', 'b']:
i = i+1
child.sendline('awatch %s' % value)
Expand Down
3 changes: 2 additions & 1 deletion trace/perf_uprobe.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ def test_uprobe_return(self):
if (self.distro_name == "rhel" and self.detected_distro.version > "7")\
or (self.distro_name == "SuSE" and
self.detected_distro.version >= 15 and
self.detected_distro.release >= 2):
self.detected_distro.release >= 2)\
or (self.distro_name == "fedora"):
output = self.cmd_verify('%s__return -- ./uprobe_test'
% self.recProbe)
else:
Expand Down
2 changes: 1 addition & 1 deletion trace/trace_UDT_probes.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def setUp(self):
if 'Ubuntu' in self.distro_name:
deps.extend(['linux-tools-common', 'linux-tools-%s' %
platform.uname()[2]])
elif self.distro_name in ['rhel', 'SuSE']:
elif self.distro_name in ['rhel', 'SuSE', 'fedora', 'centos']:
deps.extend(['perf', 'systemtap-sdt-devel.ppc64le'])
else:
self.cancel("Install the package for perf supported\
Expand Down

0 comments on commit b0bfa71

Please sign in to comment.