Skip to content

Commit

Permalink
perf_hv_gpci.py & perf_24x7_all_events.py: Fix
Browse files Browse the repository at this point in the history
Fix to accomodate event descripter in perf list.
On the current RHEL Distro, we have event descriptor along with events and while testing it is taking an event descriptor to test and is throwing an error. Change in the perf list command to remove event descriptors from the list.

Signed-off-by: Tejas Manhas <[email protected]>
  • Loading branch information
Tejas Manhas authored and Tejas Manhas committed Sep 24, 2024
1 parent ef7e5c3 commit a93ce76
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion perf/perf_24x7_all_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def setUp(self):

# Collect all hv_24x7 events
self.list_of_hv_24x7_events = []
for lne in process.get_command_output_matching('perf list', 'hv_24x7'):
for lne in process.get_command_output_matching("perf list | grep 'hv_24x7' | grep -v 'descriptor'", 'hv_24x7'):
lne = lne.split(',')[0].split('/')[1]
self.list_of_hv_24x7_events.append(lne)

Expand Down
2 changes: 1 addition & 1 deletion perf/perf_hv_gpci.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def setUp(self):
self.list_partition = []
self.list_hw = []
self.list_noid = []
for line in process.get_command_output_matching('perf list', 'hv_gpci'):
for line in process.get_command_output_matching("perf list | grep 'hv_gpci' | grep -v 'descriptor'", 'hv_gpci'):
line = "%s/%s" % (line.split('/')[0], line.split('/')[1])
if 'phys_processor_idx' in line:
self.list_phys.append(line)
Expand Down

0 comments on commit a93ce76

Please sign in to comment.