diff options
| author | kissiel <kissiel@gmail.com> | 2020-08-12 14:56:15 +0200 |
|---|---|---|
| committer | kissiel <kissiel@gmail.com> | 2020-08-12 22:01:11 +0200 |
| commit | 6178bf961e6b77515c02581344919dd9c665cbc6 (patch) | |
| tree | 0f98570ae482331bbc6a5840893e271151597b94 | |
| parent | d527f39fae8167512d40adc9acc57224ce037863 (diff) | |
add leeway for frequency scaling test
| -rwxr-xr-x | bin/frequency_governors_test.py | 11 |
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 |
