Merge ~sylvain-pineau/plainbox-provider-resource:fix-1744863 into plainbox-provider-resource:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: 79087af475596d7b2390faa8b9a3d797b4791a1d
Merged at revision: 3eb2f80c193b9d7caae5458ba05929169f8ea9db
Proposed branch: ~sylvain-pineau/plainbox-provider-resource:fix-1744863
Merge into: plainbox-provider-resource:master
Diff against target: 26 lines (+7/-2)
1 file modified
jobs/resource.pxu (+7/-2)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Needs Resubmitting
Paul Larson Needs Information
Review via email: mp+341166@code.launchpad.net

Description of the change

Fixes the linked bug, tested by Gavin on the system which failed the same resource job with only iw.

To post a comment you must log in.
Revision history for this message
Paul Larson (pwlars) wrote :

But this won't work on systems without iwconfig right? for instance, caracalla doesn't seem to have iwconfig.

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

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 812812e..790f2e8 100644
3--- a/jobs/resource.pxu
4+++ b/jobs/resource.pxu
5@@ -58,6 +58,11 @@ unit: packaging meta-data
6 os-id: debian
7 Depends: python3-requests-unixsocket
8
9+# This is for wireless_sta_protocol
10+unit: packaging meta-data
11+os-id: debian
12+Depends: wireless-tools
13+
14 id: cpuinfo
15 estimated_duration: 0.37
16 plugin: resource
17@@ -273,8 +278,8 @@ _summary: Resource job to identify Wi-Fi STA supported protocols
18 _description:
19 Job listing STA supported protocols (802.11n, 802.11ac) per interfaces.
20 command:
21- for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo $i"_ac: supported"; done
22- for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'HT Capa' && echo $i"_n: supported"; done
23+ for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iwconfig $i | grep -q '802.11abgn' && echo $i"_n: supported" || echo $i"_n: unsupported"; done
24+ for i in `iw dev | grep -oP 'Interface\s+\K\w+'`; do iw phy phy$(iw dev $i info | grep -oP 'wiphy\s+\K\d+') info | grep -q 'VHT' && echo $i"_ac: supported" || echo $i"_ac: unsupported"; done
25 estimated_duration: 0.5
26 flags: preserve-locale
27

Subscribers

People subscribed via source and target branches