Merge lp:~brendan-donegan/checkbox/bug999547_frequency_governors_speedup into lp:checkbox

Proposed by Brendan Donegan
Status: Merged
Merged at revision: 1657
Proposed branch: lp:~brendan-donegan/checkbox/bug999547_frequency_governors_speedup
Merge into: lp:checkbox
Diff against target: 35 lines (+8/-2)
2 files modified
debian/changelog (+3/-0)
scripts/frequency_governors_test (+5/-2)
To merge this branch: bzr merge lp:~brendan-donegan/checkbox/bug999547_frequency_governors_speedup
Reviewer Review Type Date Requested Status
Zygmunt Krynicki (community) Approve
Review via email: mp+123896@code.launchpad.net

Description of the change

Because the difference between expected and actual speedup was being passed through the abs() function, the logic was failing the test even if the actual speedup was greater than the expected speedup. The abs() call has been removed so that if this is the case, the 'difference' value will be negative and the test will not fail.

To post a comment you must log in.
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

Looks good, +1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2012-09-11 19:30:27 +0000
3+++ debian/changelog 2012-09-12 07:44:18 +0000
4@@ -74,6 +74,9 @@
5 on them (LP: #1043144)
6 * Remove default value from windows_number argument since the logic following
7 it dictates that it's only valid for certain tests (LP: #1047621)
8+ * scripts/frequency_governors_test - Ensure that check for difference in
9+ expected and actual speedup only fails if the actual speedup is less than
10+ the expected speedup (LP: #999547)
11
12 [Sylvain Pineau]
13 * jobs/suspend.txt.in: Fixed suspend/suspend_advanced dependencies to avoid
14
15=== modified file 'scripts/frequency_governors_test'
16--- scripts/frequency_governors_test 2012-07-05 16:45:00 +0000
17+++ scripts/frequency_governors_test 2012-09-12 07:44:18 +0000
18@@ -417,13 +417,16 @@
19 / self.maximumFrequencyTestTime)
20 logging.info("CPU Frequency Speed Up: %.2f" % predictedSpeedup)
21 logging.info("Measured Speed Up: %.2f" % measuredSpeedup)
22- differenceSpeedUp = ((abs(measuredSpeedup - predictedSpeedup)
23- / predictedSpeedup) * 100)
24+ differenceSpeedUp = (((measuredSpeedup - predictedSpeedup) / predictedSpeedup) * 100)
25 logging.info("Percentage Difference %.1f%%" % differenceSpeedUp)
26 if differenceSpeedUp > self.speedUpTolerance:
27 logging.error("Measured speedup vs expected speedup is %.1f%% and is not within %.1f%% margin."
28 % (differenceSpeedUp, self.speedUpTolerance))
29 success = False
30+ elif differenceSpeedUp < 0:
31+ logging.info("""
32+ Measured speed up %.2f exceeded expected speedup %.2f
33+ """ % (measuredSpeedup, predictedSpeedup))
34 else:
35 logging.error("Not enough timing data to calculate speed differences.")
36

Subscribers

People subscribed via source and target branches