Merge ~sylvain-pineau/plainbox-provider-checkbox:fix-1794644-s2idle into plainbox-provider-checkbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 6c43ba3ff935e6cf1f10a3f48adabeb46e7f2ca0
Merged at revision: b4fcc5dba16b697d8e9c420e82ba43e17c6fc739
Proposed branch: ~sylvain-pineau/plainbox-provider-checkbox:fix-1794644-s2idle
Merge into: plainbox-provider-checkbox:master
Diff against target: 19 lines (+6/-2)
1 file modified
bin/pm_test (+6/-2)
Reviewer Review Type Date Requested Status
Sheila Miguez (community) Approve
Review via email: mp+378166@code.launchpad.net

Description of the change

Update pm_test to also count s2idle markers in fwts.log, see commit msg for more details.

To post a comment you must log in.
Revision history for this message
Sheila Miguez (codersquid) wrote :

Will old platforms still pass?

Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

yes, the /sys/power/mem_sleep is either deep (s3) or s2idle. The total of iterations is taken into account both so the test will continue to work on both old and new platforms.

Revision history for this message
Sheila Miguez (codersquid) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/bin/pm_test b/bin/pm_test
2index 1ac0c53..b03e680 100755
3--- a/bin/pm_test
4+++ b/bin/pm_test
5@@ -256,8 +256,12 @@ class PowerManagementOperation():
6 fwts_log_path = os.path.join(self.args.log_dir, 'fwts.log')
7 try:
8 with open(fwts_log_path, 'rt') as f:
9- magic_line = 'Completed S3 cycle(s) \n'
10- count = f.readlines().count(magic_line)
11+ magic_line_s3 = 'Completed S3 cycle(s) \n'
12+ magic_line_s2idle = 'Completed s2idle cycle(s) \n'
13+ lines = f.readlines()
14+ count_s3 = lines.count(magic_line_s3)
15+ count_s2idle = lines.count(magic_line_s2idle)
16+ count = count_s3 + count_s2idle
17 if count != total_suspends_expected:
18 problems = (
19 "Found {} occurrences of '{}'. Expected {}".format(

Subscribers

People subscribed via source and target branches