From a93ce763f1ff0cac78a35745111615fe7945eb60 Mon Sep 17 00:00:00 2001 From: Tejas Manhas Date: Tue, 24 Sep 2024 11:43:21 +0530 Subject: [PATCH] perf_hv_gpci.py & perf_24x7_all_events.py: Fix 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 --- perf/perf_24x7_all_events.py | 2 +- perf/perf_hv_gpci.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/perf/perf_24x7_all_events.py b/perf/perf_24x7_all_events.py index 7b6df1068..537efe5a0 100755 --- a/perf/perf_24x7_all_events.py +++ b/perf/perf_24x7_all_events.py @@ -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) diff --git a/perf/perf_hv_gpci.py b/perf/perf_hv_gpci.py index 193f4e996..ec41edd02 100644 --- a/perf/perf_hv_gpci.py +++ b/perf/perf_hv_gpci.py @@ -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)