Merge ~ycheng-twn/plainbox-provider-pc-sanity/+git/plainbox-provider-pc-sanity:0001_fix_long_idle_test into plainbox-provider-pc-sanity:master

Proposed by Yuan-Chen Cheng
Status: Merged
Merged at revision: 7435d4756230e99ae776630656ec91ab1840b3a3
Proposed branch: ~ycheng-twn/plainbox-provider-pc-sanity/+git/plainbox-provider-pc-sanity:0001_fix_long_idle_test
Merge into: plainbox-provider-pc-sanity:master
Diff against target: 51 lines (+11/-6)
2 files modified
debian/changelog (+7/-3)
usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-power-consumption.pxu (+4/-3)
Reviewer Review Type Date Requested Status
Alex Tu (community) Approve
Yuan-Chen Cheng (community) Needs Resubmitting
Kai-Chuan Hsieh Approve
Review via email: mp+385978@code.launchpad.net

Commit message

pc-sanity-power-consumption.pxu: fix a issue that long idle always passed, and also failed if requirement neither exists nor can be installed.

To post a comment you must log in.
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

test on machine that kernel from proposed channel, and source list does not have proposed channel, it will failed.

test on machine that can't go pc10, then it does failed.

Revision history for this message
Kai-Chuan Hsieh (kchsieh) wrote :

LGTM.

review: Approve
Revision history for this message
Alex Tu (alextu) wrote :

comment inline
it was there before up is to check if there shows pc10 during long idle.
Not checked, but will it still show PC10 values record in long idle after system up from long idle?
Did you test this logic on machines which long idle can deep to pc10?

review: Needs Information
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

A1: yes, because the output goes to different place, and the grep check previous output.

A2: fix the bug that per test, it properly failed on the failed machine and pass on ok machine.

review: Needs Resubmitting
Revision history for this message
Alex Tu (alextu) wrote :

sorry, I don't get the idea of moving the checking from 'before' system up to 'after' system up.
The result is expected to the same.

review: Needs Information
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

only the return value of the last command means.

Please test by creating a job that's

 true
 false
 ------------
 false
 true

separately and test it.

Revision history for this message
Alex Tu (alextu) wrote :

comment in line

Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

modify per request.

review: Needs Resubmitting
Revision history for this message
Yuan-Chen Cheng (ycheng-twn) wrote :

tested in a machine that can't pass c10, and it does fail.
tested in a machine that can pass c10, and it does pass.

Revision history for this message
Alex Tu (alextu) wrote :

thanks! LGTM

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index e1b9159..6e237f9 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,12 +1,16 @@
6-plainbox-provider-pc-sanity (0.2.7ubuntu1) UNRELEASED; urgency=medium
7+plainbox-provider-pc-sanity (0.2.8) UNRELEASED; urgency=medium
8
9- [Kai-Chuan Hsieh]
10+ [ Kai-Chuan Hsieh ]
11 * Add job to check if thermald is active.
12
13 [Alex Tu]
14 * remove turbostat checking for shortidle
15
16- -- Kai-Chuan Hsieh <kaichuan.hsieh@canonical.com> Thu, 30 Apr 2020 15:50:35 +0800
17+ [ Yuan-Chen Cheng ]
18+ * pc-sanity-power-consumption.pxu: fix issues that long idle always passed,
19+ and also failed if requirements neither exists nor can be installed.
20+
21+ -- Yuan-Chen Cheng <yc.cheng@canonical.com> Thu, 18 Jun 2020 15:02:17 +0800
22
23 plainbox-provider-pc-sanity (0.2.7) bionic; urgency=medium
24
25diff --git a/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-power-consumption.pxu b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-power-consumption.pxu
26index d7726a9..ce90233 100644
27--- a/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-power-consumption.pxu
28+++ b/usr/share/plainbox-provider-checkbox/units/pc-sanity/pc-sanity-power-consumption.pxu
29@@ -29,8 +29,8 @@ command:
30 set -x
31 report_folder="$HOME/submission-report-$(date +%Y%m%d%H%M)"
32 mkdir -p "$report_folder"
33- dpkg -s linux-tools-"$(uname -r)" || sudo apt-get install -y linux-tools-"$(uname -r)"
34- dpkg -s xautomation || sudo apt-get install -y xautomation
35+ dpkg -s linux-tools-"$(uname -r)" || sudo apt-get install -y linux-tools-"$(uname -r)" || exit 1
36+ dpkg -s xautomation || sudo apt-get install -y xautomation || exit 1
37 gsettings set org.gnome.desktop.session idle-delay 10
38 sleep 10
39 for i in $(sudo turbostat --list | sed 's/,/ /g'); do
40@@ -44,9 +44,10 @@ command:
41 fi;
42 done;
43 sudo turbostat --num_iterations 20 --show "$COL" 2>&1 | tee "$report_folder"/turbostat-pkgpc-longidle.log
44- tail -n1 "$report_folder"/turbostat-pkgpc-longidle.log | grep "0.00$" && false
45 DISPLAY=:0 xte 'key Up'
46 gsettings set org.gnome.desktop.session idle-delay 0
47+ # set false in the end when it failed so that test case be marked as failed.
48+ ! (tail -n1 "$report_folder"/turbostat-pkgpc-longidle.log | grep "0.00$")
49 _summary: check if target machine can get cpu pkg c10 in long idle.
50 _description:
51 check if target machine can get cpu pkg c10 in long idle. detail history: https://trello.com/c/3C0b5Nkt

Subscribers

People subscribed via source and target branches