summaryrefslogtreecommitdiff
diff options
authorPMR <pmr@pmr-lander>2020-08-13 17:45:52 +0000
committerPMR <pmr@pmr-lander>2020-08-13 17:45:52 +0000
commit14641e19456ee1806de63c76c7bb0a2b68fd2e5b (patch)
tree90d1b776a171b91542ab3708b022c78bfbaccb00
parentb512c13f909f4a45f60057c9e698e61976ff97a0 (diff)
parent6178bf961e6b77515c02581344919dd9c665cbc6 (diff)
Merge #389187 from ~kissiel/plainbox-provider-checkbox:add-leeway-for-freq-scaling
-rwxr-xr-xbin/frequency_governors_test.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/bin/frequency_governors_test.py b/bin/frequency_governors_test.py
index fb652f5..d6a1e08 100755
--- a/bin/frequency_governors_test.py
+++ b/bin/frequency_governors_test.py
@@ -542,17 +542,20 @@ class CPUScalingTest(object):
if not self.setGovernor(governor):
success = False
- # Verify the current speed is the same as scaling_max_freq
+ # let's run a warm-up task so the CPU can raise its freq
+ performanceTestTime = self.runLoadTest()
+ # Verify the current speed is close to scaling_max_freq
maximumFrequency = self.getParameter("scaling_max_freq")
currentFrequency = self.getParameter("scaling_cur_freq")
if (
not maximumFrequency or
not currentFrequency or
- (maximumFrequency != currentFrequency)
+ (float(currentFrequency) < 0.99 * float(maximumFrequency))
):
logging.error(
- "Current cpu frequency of %s is not set to the maximum "
- "value of %s" % (currentFrequency, maximumFrequency))
+ "Current cpu frequency of %s is not close enough to the "
+ "maximum value of %s" % (
+ currentFrequency, maximumFrequency))
success = False
# Repeat work load test