Skip to content

Commit 01764d0

Browse files
author
root
committed
perf_top.py:test_workload_output$ Fixing ebizzy run issue
Ebizzy was not run and it exited very quick;y before capture fixed Signed-off-by: root <[email protected]>
1 parent 08dec46 commit 01764d0

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

perf/perf_top.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def setUp(self):
4343
detected_distro = distro.detect()
4444
self.distro_name = detected_distro.name
4545

46-
deps = ['gcc', 'make']
46+
deps = ['gcc', 'make', 'ebizzy']
4747
if 'Ubuntu' in self.distro_name:
4848
deps.extend(['linux-tools-common', 'linux-tools-%s' %
4949
platform.uname()[2]])
@@ -67,6 +67,9 @@ def setUp(self):
6767
# Creating a temporary file
6868
self.temp_file = tempfile.NamedTemporaryFile().name
6969

70+
def run_ebizzy(self):
71+
process.run("ebizzy -S 30", ignore_status=True, shell=True)
72+
7073
def test_top(self):
7174
if self.option in ["-k", "--vmlinux", "--kallsyms"]:
7275
if self.distro_name in ['rhel', 'fedora', 'centos']:
@@ -105,7 +108,11 @@ def test_top(self):
105108
'soft lockup', 'Unable to handle'])
106109

107110
def test_workload_output(self):
108-
process.getoutput("perf top -a > %s " % self.temp_file, timeout=10)
111+
workload_thread = threading.Thread(target=self.run_ebizzy)
112+
workload_thread.start()
113+
114+
process.getoutput("perf top -a > %s " % self.temp_file, timeout=35)
115+
workload_thread.join(timeout=5)
109116
perf_top_output = genio.read_file(self.temp_file).splitlines()
110117
flag = False
111118
for lines in perf_top_output:

0 commit comments

Comments
 (0)