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
diff --git a/jobs/resource.pxu b/jobs/resource.pxu
index 812812e..790f2e8 100644
--- a/jobs/resource.pxu
+++ b/jobs/resource.pxu
@@ -58,6 +58,11 @@ unit: packaging meta-data
58os-id: debian58os-id: debian
59Depends: python3-requests-unixsocket59Depends: python3-requests-unixsocket
6060
61# This is for wireless_sta_protocol
62unit: packaging meta-data
63os-id: debian
64Depends: wireless-tools
65
61id: cpuinfo66id: cpuinfo
62estimated_duration: 0.3767estimated_duration: 0.37
63plugin: resource68plugin: resource
@@ -273,8 +278,8 @@ _summary: Resource job to identify Wi-Fi STA supported protocols
273_description:278_description:
274 Job listing STA supported protocols (802.11n, 802.11ac) per interfaces.279 Job listing STA supported protocols (802.11n, 802.11ac) per interfaces.
275command:280command:
276 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"; done281 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
277 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"; done282 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
278estimated_duration: 0.5283estimated_duration: 0.5
279flags: preserve-locale284flags: preserve-locale
280285

Subscribers

People subscribed via source and target branches