Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perf/perf_24x7_hardware_counters.py: check_valid_chip - Update testcase to avoid failures #2787

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions perf/perf_24x7_hardware_counters.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,16 +214,16 @@ def test_check_valid_chip(self):
def test_check_invalid_chip(self):
"""
Test invalid out of range chip value
chip can take maximum value of 65535 only
"""
invalid_chip = [self.chips, 65536]
for chip_val in invalid_chip:
if self.rev == '004b' or self.rev == '004e':
cmd = "hv_24x7/PM_PB_CYC,domain=1,chip=%s/ /bin/true" % chip_val
if self.rev == '0080':
cmd = "hv_24x7/PM_PHB0_0_CYC,domain=1,chip=%s/ /bin/true" % chip_val
res = self.event_stat1(cmd)
if res.exit_status == 0:
self.fail("perf unable to recognise invalid chip value")
invalid_chip = 65536
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you have a meaning full name, max_range ?

if self.rev == '004b' or self.rev == '004e':
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if self.rev in ['004b' , '004e']:

cmd = "hv_24x7/PM_PB_CYC,domain=1,chip=%s/ /bin/true" % invalid_chip
if self.rev == '0080':
cmd = "hv_24x7/PM_PHB0_0_CYC,domain=1,chip=%s/ /bin/true" % invalid_chip
res = self.event_stat1(cmd)
if res.exit_status == 0:
self.fail("perf unable to recognise invalid chip value")

def test_domain_chip_offset(self):
cmd = "perf stat -r 10 -x ' ' perf stat -r 10 -x ' ' \
Expand Down
Loading