Merge lp:~ara/checkbox/fix_1303694 into lp:checkbox

Proposed by Ara Pulido
Status: Merged
Approved by: Jeff Lane 
Approved revision: 2896
Merged at revision: 2899
Proposed branch: lp:~ara/checkbox/fix_1303694
Merge into: lp:checkbox
Diff against target: 96 lines (+24/-5)
5 files modified
plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist (+2/-1)
plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist (+2/-1)
plainbox-provider-certification-server/provider_whitelists/server-selftest-14.04.whitelist (+2/-1)
plainbox-provider-checkbox/provider_bin/fwts_test (+1/-2)
plainbox-provider-checkbox/provider_jobs/cpu.txt.in (+17/-0)
To merge this branch: bzr merge lp:~ara/checkbox/fix_1303694
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Brendan Donegan (community) Approve
Review via email: mp+214509@code.launchpad.net

Description of the change

Modification of the 14.04 certification tests to avoid false positives and duplicates:

 * Removed frequency_governors test from whitelists in 14.04
 * Removed maxfreq test from the fwts default tests
 * Added a new cpu job that tests cpu maxfreq using the fwts test

To post a comment you must log in.
Revision history for this message
Brendan Donegan (brendan-donegan) wrote :

I approve. Let's see what Jeff says

review: Approve
Revision history for this message
Jeff Lane  (bladernr) wrote :
Download full text (13.9 KiB)

I'm fine with this change of tests and thanks for also editing the server whitelists as well :)

However, a couple things need to be addressed.

First, just to keep the same functionality, I'd prefer that a couple things were fixed:
line 215:
    elif args.all:
        tests.extend(['wakealarm', 'cpufreq'] + TESTS)

should include 'maxfreq'

However, that's a minor issue that shouldn't affect anything beyond using the --all option.

More importantly though, is why are we using maxfreq as opposed to cpufreq in fwts:

cpufreq CPU frequency scaling tests.
maxfreq Check max CPU frequencies against max scaling frequency.

As I understand it, maxfreq just does a quick check that what the CPU says about frequencies jives with what the kernel thinks it knows about them, while cpufreq actually changes frequencies and does cpu scale testing.

Here's sample output from my Core i5 Ivy Bridge based NUC:
Results generated by fwts: Version V14.03.01 (2014-03-27 02:14:17).

Some of this work - Copyright (c) 1999 - 2014, Intel Corp. All rights reserved.
Some of this work - Copyright (c) 2010 - 2014, Canonical.

This test run on 07/04/14 at 10:20:53 on host Linux critical-maas
3.13.0-19-generic #40-Ubuntu SMP Mon Mar 24 02:36:06 UTC 2014 x86_64.

Command: "fwts maxfreq".
Running tests: maxfreq.

maxfreq: Test max CPU frequencies against max scaling frequency.
--------------------------------------------------------------------------------
Test 1 of 1: Maximum CPU frequency test.
This test checks the maximum CPU frequency as detected by the kernel for each
CPU against maxiumum frequency as specified by the BIOS frequency scaling
settings.
FAILED [MEDIUM] CPUFreqSpeedMismatch: Test 1, Maximum scaling frequency 2.301000
GHz do not match expected frequency 1.800000 GHz.

ADVICE: The maximum scaling frequency 2.301000 GHz for CPU 0 configured by the
BIOS in /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies does
not match the expected maximum CPU frequency 1.800000 GHz that the CPU can run
at. This usually indicates a misconfiguration of the ACPI _PSS (Performance
Supported States) object. This is described in section 8.4.4.2 of the APCI
specification.

FAILED [MEDIUM] CPUFreqSpeedMismatch: Test 1, Maximum scaling frequency 2.301000
GHz do not match expected frequency 1.800000 GHz.

ADVICE: See advice for previous CPU.

FAILED [MEDIUM] CPUFreqSpeedMismatch: Test 1, Maximum scaling frequency 2.301000
GHz do not match expected frequency 1.800000 GHz.

ADVICE: See advice for previous CPU.

FAILED [MEDIUM] CPUFreqSpeedMismatch: Test 1, Maximum scaling frequency 2.301000
GHz do not match expected frequency 1.800000 GHz.

ADVICE: See advice for previous CPU.

================================================================================
0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.
================================================================================

0 passed, 4 failed, 0 warning, 0 aborted, 0 skipped, 0 info only.

Test Failure Summary
================================================================================

Critical failures: NONE

High failures: NONE

Medium failures: 1
 maxfreq: Maximum scali...

review: Needs Fixing
Revision history for this message
Ara Pulido (ara) wrote :

Jeff, I agree with your first comment, but I don't understand your reasoning for the second one.

You are arguing that we would miss errors, but, actually, cpufreq test was already being run outside fwts in its own test, with the same level (High or Critical) and there hasn't been any complains yet. Can you clarify, please?

Also, the MEDIUM level here is correct. The fwts adjusts this levels so in Checkbox/Plainbox (i.e. for certificatoin) we only need to care about HIGH/CRITICAL.

Revision history for this message
Jeff Lane  (bladernr) wrote :

Yeah, actually, I said "a couple things" but meant three:

1: we agree on

2: you suggest using maxfreq as opposed to cpufreq. As best as I can tell, maxfreq is simply a comparison of stated frequencies, similar in function to the CPU topology test where we simply compare one thing to another. cpufreq in fwts actually does cpu scaling and tests that the frequency change happens and makes sense, which is closer to the intention of the older frequency_governors test.

And thinking back, I intentionally left cpufreq out of the wrapper because we were already testing this via frequency governors. Perhaps this would be better as a new option to specify running cpufreq instead and putting maxfreq back in the man tests list?

3: Error handling - this was more a suggestion. The real reason we "ignored" frequency_governors is that the test was mysterious, no one quite understood how it worked and the results were very often dodgy (it would pass on a machine at one moment, and fail the next for no good reason at all, or it would fail outright but the logs would appear to have been satisfactory).

If the intention is to use the fwts test because the fwts team are the experts there, it MAY be useful to figure out what an actual failure is. Test this on several different systems with different CPUs and such and find out exactly what it looks like and maybe decide if there's a need to parse the results for different fail criteria.

Yeah, I admit my sample is very small and unscientific and does NOT demonstrate a real failure, but to be honest, I don't know what a "Real" failure with this test would be. So the third item is more a suggestion.

I'm sorry for not making that more clear before... to summarize, in order of importance:

1: Are we using maxfreq or cpufreq, and if not cpufreq, why?
2: Line 215 just to maintain the same functionality in the wrapper
3: Just a suggestion about fail criteria and log parsing because I can't say what this really looks like when it fails. Perhaps just asking the firmware team would give a good enough idea.

lp:~ara/checkbox/fix_1303694 updated
2896. By Ara Pulido

Added maxfreq to the list of tests to extend when running fwts_test with the all parameter

Revision history for this message
Jeff Lane  (bladernr) wrote :

To sync with the discussion on IRC and email, I agree with Ara's disagreement :) Silly me should read more than just the diff... sigh...

Thanks for fixing the first item too :)

review: Approve
Revision history for this message
Zygmunt Krynicki (zyga) wrote :

+command: [[ -e ${CHECKBOX_DATA}/maxfreq_test.log ]] && cat ${CHECKBOX_DATA}/maxfreq_test.log

This is an useless bashism. Use [ ] the next time. I've fixed this while rebasing my provider changes.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist'
2--- plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist 2014-03-27 20:36:34 +0000
3+++ plainbox-provider-certification-client/provider_whitelists/client-cert.whitelist 2014-04-07 15:08:50 +0000
4@@ -270,9 +270,10 @@
5 benchmarks/graphics/gtkperf
6 cpu/scaling_test
7 cpu/scaling_test-log-attach
8+cpu/maxfreq_test
9+cpu/maxfreq_test-log-attach
10 cpu/offlining_test
11 cpu/topology
12-cpu/frequency_governors
13 cpu/clocktest
14 disk/stats
15 disk/stats_.*
16
17=== modified file 'plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist'
18--- plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist 2014-03-27 20:36:34 +0000
19+++ plainbox-provider-certification-client/provider_whitelists/client-selftest.whitelist 2014-04-07 15:08:50 +0000
20@@ -278,9 +278,10 @@
21 benchmarks/graphics/gtkperf
22 cpu/scaling_test
23 cpu/scaling_test-log-attach
24+cpu/maxfreq_test
25+cpu/maxfreq_test-log-attach
26 cpu/offlining_test
27 cpu/topology
28-cpu/frequency_governors
29 cpu/clocktest
30 disk/stats
31 disk/stats_.*
32
33=== modified file 'plainbox-provider-certification-server/provider_whitelists/server-selftest-14.04.whitelist'
34--- plainbox-provider-certification-server/provider_whitelists/server-selftest-14.04.whitelist 2014-04-01 16:01:57 +0000
35+++ plainbox-provider-certification-server/provider_whitelists/server-selftest-14.04.whitelist 2014-04-07 15:08:50 +0000
36@@ -55,9 +55,10 @@
37 cpu/clocktest
38 cpu/scaling_test
39 cpu/scaling_test-log-attach
40+cpu/maxfreq_test
41+cpu/maxfreq_test-log-attach
42 cpu/offlining_test
43 cpu/topology
44-cpu/frequency_governors
45 __disk__
46 disk/detect
47 disk/stats
48
49=== modified file 'plainbox-provider-checkbox/provider_bin/fwts_test'
50--- plainbox-provider-checkbox/provider_bin/fwts_test 2014-03-20 14:01:58 +0000
51+++ plainbox-provider-checkbox/provider_bin/fwts_test 2014-04-07 15:08:50 +0000
52@@ -22,7 +22,6 @@
53 'fadt',
54 'hpet_check',
55 'klog',
56- 'maxfreq',
57 'mcfg',
58 'method',
59 'mpcheck',
60@@ -212,7 +211,7 @@
61 elif args.test:
62 tests.extend(args.test)
63 elif args.all:
64- tests.extend(['wakealarm', 'cpufreq'] + TESTS)
65+ tests.extend(['wakealarm', 'cpufreq', 'maxfreq'] + TESTS)
66 elif args.sleep:
67 args.sleep = fix_sleep_args(args.sleep)
68 iterations = 1
69
70=== modified file 'plainbox-provider-checkbox/provider_jobs/cpu.txt.in'
71--- plainbox-provider-checkbox/provider_jobs/cpu.txt.in 2014-03-20 14:07:18 +0000
72+++ plainbox-provider-checkbox/provider_jobs/cpu.txt.in 2014-04-07 15:08:50 +0000
73@@ -16,6 +16,23 @@
74 Attaches the log generated by cpu/scaling_test to the results
75
76 plugin: shell
77+name: cpu/maxfreq_test
78+requires:
79+ package.name == 'fwts'
80+user: root
81+environ: CHECKBOX_DATA
82+command: fwts_test -t maxfreq -l ${CHECKBOX_DATA}/maxfreq_test.log
83+_description:
84+ Test that the CPU can run at its max frequency using Firmware Test Suite (fwts cpufreq).
85+
86+plugin: attachment
87+name: cpu/maxfreq_test-log-attach
88+depends: cpu/maxfreq_test
89+command: [[ -e ${CHECKBOX_DATA}/maxfreq_test.log ]] && cat ${CHECKBOX_DATA}/maxfreq_test.log
90+_description:
91+ Attaches the log generated by cpu/maxfreq_test to the results
92+
93+plugin: shell
94 name: cpu/clocktest
95 command: clocktest
96 _description:

Subscribers

People subscribed via source and target branches