Merge ~alanec/plainbox-provider-resource:cpufreq_test-support-res into plainbox-provider-resource:master

Proposed by Adrian Lane
Status: Rejected
Rejected by: Jeff Lane 
Proposed branch: ~alanec/plainbox-provider-resource:cpufreq_test-support-res
Merge into: plainbox-provider-resource:master
Diff against target: 21 lines (+13/-0)
1 file modified
jobs/resource.pxu (+13/-0)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Needs Fixing
Maciej Kisielewski Needs Fixing
Review via email: mp+398395@code.launchpad.net

Description of the change

Added resource to allow plainbox-provider-checkbox/bin/cpufreq_test.py to be skipped if cpufreq scaling non-supported.

To post a comment you must log in.
Revision history for this message
Adrian Lane (alanec) wrote :
Revision history for this message
Adrian Lane (alanec) wrote :

> Dependent resource update in *checkbox-provider-checkbox:
*plainbox-provider-checkbox

Revision history for this message
Maciej Kisielewski (kissiel) wrote :

The resoruce provider should not depend on the checkbox provider. Hardcoding paths like that doesn't work on at half of the systems we test.

Scaling support should be a field in cpuinfo resource job. The jobs requiring scaling to be supported should check that field.

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

As Maciej said, hardcoding path this way won't work everywhere and implies a dependency on the checkbox provider (but it's the other way around actually), see https://git.launchpad.net/~checkbox-dev/plainbox-provider-checkbox/+git/packaging/tree/debian/control#n23

Would it be possible to add the necessary bits to https://git.launchpad.net/plainbox-provider-resource/tree/bin/cpuinfo_resource.py in order to report if scaling is supported.

and having a resource expression like this one in provider checkbox:

cpuinfo.scaling == 'supported'

review: Needs Fixing
Revision history for this message
Adrian Lane (alanec) wrote :

This sounds reasonable to me. I cam go ahead and move the logic to the mentioned file.
MR's en-route shortly.

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

thanks a lot!

Revision history for this message
Adrian Lane (alanec) wrote :

Getting back around to this change, worked out a solution as previously discussed. Submitted new MRs for this, and will close out this MR.

I much prefer this way of checking the dependency for the test, good call (and kept it simple).

MRs:
https://code.launchpad.net/~alanec/plainbox-provider-resource/+git/plainbox-provider-resource/+merge/400085
https://code.launchpad.net/~alanec/plainbox-provider-checkbox/+git/plainbox-provider-checkbox/+merge/400086

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

Rejected per comment from Adrian.

Unmerged commits

8eb2734... by Adrian Lane

Added resource to allow plainbox-provider-checkbox/bin/cpufreq_test.py to be skipped if cpufreq scaling non-supported. lp: 1913397

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/jobs/resource.pxu b/jobs/resource.pxu
2index bfde8f3..4e16b0e 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -482,3 +482,16 @@ command:
6 else
7 echo "detected: true"
8 fi
9+
10+id: cpufreqtest_resource
11+estimated_duration: 0.25
12+plugin: resource
13+user: root
14+_summary: Pre-test check for CPUFreq support
15+command:
16+ if ( /usr/lib/plainbox-provider-checkbox/bin/cpufreq_test.py -s );
17+ then
18+ echo "supported: true"
19+ else
20+ echo "supported: false"
21+ fi

Subscribers

People subscribed via source and target branches