Merge ~jocave/plainbox-provider-checkbox:wlan-manifest-replace-resource into plainbox-provider-checkbox:master

Proposed by Jonathan Cave
Status: Work in progress
Proposed branch: ~jocave/plainbox-provider-checkbox:wlan-manifest-replace-resource
Merge into: plainbox-provider-checkbox:master
Diff against target: 251 lines (+56/-12)
4 files modified
units/wireless/jobs.pxu (+36/-5)
units/wireless/manifest.pxu (+10/-0)
units/wireless/test-plan.pxu (+2/-2)
units/wireless/wireless-connection-netplan.pxu (+8/-5)
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+394414@code.launchpad.net

Description of the change

A proposal to make all wireless testing be governed by manifest entries. There was an existing manifest category defined for wireless interfaces but it was not used in the automated test plan. This add two more manifest entries for AC and AX testing rather than rely on the existing resource job.

This will would need to rolled out carefully a great many manifests for devices currently tested in the lab would need to be updated.

I'm not 100% sold on this idea, but keen to hear feedback.

To post a comment you must log in.
Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

[BOT]
$ cat plainbox-provider-checkbox-0.59.0-1-a1f4f09-in-linux-container-focal-summary.log
bootstrap-client-cert-desktop-20-04-automated FAIL stderr: unable to find nested part: com.canonical.certification::submission-cert-automated
https://oem-share.canonical.com/share/lyoncore/artifacts/plainbox-provider-checkbox-0.59.0-1-a1f4f09-in-linux-container-focal

Revision history for this message
OEM Taipei Bot (oem-taipei-bot) wrote :

Execute `curl -X POST http://10.102.135.31/api/v1/teams/self-contained/pipelines/plainbox-provider-checkbox/resources/merge-proposal-394414/check/webhook?webhook_token=merge-proposal-394414` within TW VPN to restart the test.
[autopkgtest]
$ cat plainbox-provider-checkbox-0.59.0-1-a1f4f09-in-linux-container-focal-summary.log
bootstrap-client-cert-desktop-20-04-automated FAIL stderr: unable to find nested part: com.canonical.certification::submission-cert-automated
https://oem-share.canonical.com/partners/lyoncore/share/artifacts/plainbox-provider-checkbox-0.59.0-1-a1f4f09-in-linux-container-focal

Unmerged commits

a1f4f09... by Jonathan Cave

wireless/*: make auto jobs depend on manifest

Modify all the automated NM and networkd jobs such that they
depend on a detect job and the presence of a manifest entry.
This should protect aginst mis-reporting of device capabilities
by iw.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/units/wireless/jobs.pxu b/units/wireless/jobs.pxu
2index 4827af1..75eb548 100644
3--- a/units/wireless/jobs.pxu
4+++ b/units/wireless/jobs.pxu
5@@ -4,12 +4,38 @@ category_id: com.canonical.plainbox::wireless
6 plugin: shell
7 flags: also-after-suspend
8 estimated_duration: 2.0
9-_summary: Detect if at least one Wireless LAN device is detected
10+_summary: Detect presence of at least one Wireless LAN device
11 imports: from com.canonical.plainbox import manifest
12 requires: manifest.has_wlan_adapter == 'True'
13 command:
14 network_device_info.py detect WIRELESS
15
16+id: wireless/detect_ac
17+category_id: com.canonical.plainbox::wireless
18+plugin: shell
19+flags: also-after-suspend
20+estimated_duration: 2.0
21+_summary: Detect presence of at least one Wireless LAN with AC support
22+imports: from com.canonical.plainbox import manifest
23+requires:
24+ manifest.has_wlan_adapter_ac == 'True'
25+command:
26+ 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' && exit 0; done
27+ exit 1
28+
29+id: wireless/detect_ax
30+category_id: com.canonical.plainbox::wireless
31+plugin: shell
32+flags: also-after-suspend
33+estimated_duration: 2.0
34+_summary: Detect presence of at least one Wireless LAN with AX support
35+imports: from com.canonical.plainbox import manifest
36+requires:
37+ manifest.has_wlan_adapter_ax == 'True'
38+command:
39+ 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 'MCS 0-11' && exit 0; done
40+ exit 1
41+
42 unit: template
43 template-resource: device
44 template-filter: device.category == 'WIRELESS' and device.interface != 'UNKNOWN'
45@@ -31,6 +57,7 @@ requires:
46 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
47 {% endif -%}
48 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
49+depends: wireless/detect
50
51 unit: template
52 template-resource: device
53@@ -54,6 +81,7 @@ requires:
54 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
55 {% endif -%}
56 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
57+depends: wireless/detect
58
59 unit: template
60 template-resource: device
61@@ -77,6 +105,7 @@ requires:
62 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
63 {% endif -%}
64 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
65+depends: wireless/detect
66
67 unit: template
68 template-resource: device
69@@ -100,6 +129,7 @@ requires:
70 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
71 {% endif -%}
72 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
73+depends: wireless/detect
74
75 unit: template
76 template-resource: device
77@@ -123,6 +153,7 @@ requires:
78 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
79 {% endif -%}
80 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
81+depends: wireless/detect
82
83 unit: template
84 template-resource: device
85@@ -142,11 +173,11 @@ category_id: com.canonical.plainbox::wireless
86 estimated_duration: 30.0
87 flags: preserve-locale also-after-suspend also-after-suspend-manual
88 requires:
89- wireless_sta_protocol.{{ interface }}_ac == 'supported'
90 {%- if __on_ubuntucore__ %}
91 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
92 {%- endif %}
93 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
94+depends: wireless/detect_ac
95
96 unit: template
97 template-resource: device
98@@ -166,11 +197,11 @@ category_id: com.canonical.plainbox::wireless
99 estimated_duration: 30.0
100 flags: preserve-locale also-after-suspend also-after-suspend-manual
101 requires:
102- wireless_sta_protocol.{{ interface }}_ac == 'supported'
103 {%- if __on_ubuntucore__ %}
104 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
105 {%- endif %}
106 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
107+depends: wireless/detect_ac
108
109 unit: template
110 template-resource: device
111@@ -190,11 +221,11 @@ category_id: com.canonical.plainbox::wireless
112 estimated_duration: 30.0
113 flags: preserve-locale also-after-suspend also-after-suspend-manual
114 requires:
115- wireless_sta_protocol.{{ interface }}_ax == 'supported'
116 {%- if __on_ubuntucore__ %}
117 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
118 {%- endif %}
119 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
120+depends: wireless/detect_ax
121
122 unit: template
123 template-resource: device
124@@ -214,11 +245,11 @@ category_id: com.canonical.plainbox::wireless
125 estimated_duration: 30.0
126 flags: preserve-locale also-after-suspend also-after-suspend-manual
127 requires:
128- wireless_sta_protocol.{{ interface }}_ax == 'supported'
129 {%- if __on_ubuntucore__ %}
130 connections.slot == 'network-manager:service' and connections.plug == '{{ __system_env__["SNAP_NAME"] }}:network-manager'
131 {%- endif %}
132 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'NetworkManager'
133+depends: wireless/detect_ax
134
135 plugin: user-interact-verify
136 category_id: com.canonical.plainbox::wireless
137diff --git a/units/wireless/manifest.pxu b/units/wireless/manifest.pxu
138index ed92bf6..7fa3e90 100644
139--- a/units/wireless/manifest.pxu
140+++ b/units/wireless/manifest.pxu
141@@ -2,3 +2,13 @@ unit: manifest entry
142 id: has_wlan_adapter
143 _name: A WLAN Adapter
144 value-type: bool
145+
146+unit: manifest entry
147+id: has_wlan_adapter_ac
148+_name: A WLAN Adapter with AC support
149+value-type: bool
150+
151+unit: manifest entry
152+id: has_wlan_adapter_ax
153+_name: A WLAN Adapter with AX support
154+value-type: bool
155\ No newline at end of file
156diff --git a/units/wireless/test-plan.pxu b/units/wireless/test-plan.pxu
157index ce14cc1..bdc9868 100644
158--- a/units/wireless/test-plan.pxu
159+++ b/units/wireless/test-plan.pxu
160@@ -153,7 +153,7 @@ _description:
161 Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac, ax
162 networks.
163 include:
164- wireless/detect
165+ wireless/detect.*
166 wireless/wireless_scanning_.*
167 wireless/wireless_connection_open_ax_nm_.*
168 wireless/wireless_connection_open_ac_nm_.*
169@@ -181,7 +181,7 @@ _description:
170 Automated connection tests for unencrypted or WPA-encrypted 802.11 bg, n, ac, ax
171 networks using netplan.
172 include:
173- wireless/detect
174+ wireless/detect.*
175 wireless/wireless_scanning_.*
176 wireless/wireless_connection_open_ax_nm_.*
177 wireless/wireless_connection_open_ac_nm_.*
178diff --git a/units/wireless/wireless-connection-netplan.pxu b/units/wireless/wireless-connection-netplan.pxu
179index 44677e2..49ad5b3 100644
180--- a/units/wireless/wireless-connection-netplan.pxu
181+++ b/units/wireless/wireless-connection-netplan.pxu
182@@ -18,8 +18,8 @@ category_id: com.canonical.plainbox::wireless
183 estimated_duration: 15
184 flags: preserve-locale also-after-suspend also-after-suspend-manual
185 requires:
186- wireless_sta_protocol.{{ interface }}_ax == 'supported'
187 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
188+depends: wireless/detect_ax
189
190
191 unit: template
192@@ -42,9 +42,8 @@ category_id: com.canonical.plainbox::wireless
193 estimated_duration: 15
194 flags: preserve-locale also-after-suspend also-after-suspend-manual
195 requires:
196- wireless_sta_protocol.{{ interface }}_ac == 'supported'
197 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
198-
199+depends: wireless/detect_ac
200
201
202 unit: template
203@@ -68,6 +67,7 @@ estimated_duration: 15
204 flags: preserve-locale also-after-suspend also-after-suspend-manual
205 requires:
206 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
207+depends: wireless/detect
208
209
210 unit: template
211@@ -91,6 +91,7 @@ estimated_duration: 15
212 flags: preserve-locale also-after-suspend also-after-suspend-manual
213 requires:
214 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
215+depends: wireless/detect
216
217
218 unit: template
219@@ -113,8 +114,8 @@ category_id: com.canonical.plainbox::wireless
220 estimated_duration: 15
221 flags: preserve-locale also-after-suspend also-after-suspend-manual
222 requires:
223- wireless_sta_protocol.{{ interface }}_ax == 'supported'
224 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
225+depends: wireless/detect_ax
226
227
228 unit: template
229@@ -137,8 +138,8 @@ category_id: com.canonical.plainbox::wireless
230 estimated_duration: 15
231 flags: preserve-locale also-after-suspend also-after-suspend-manual
232 requires:
233- wireless_sta_protocol.{{ interface }}_ac == 'supported'
234 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
235+depends: wireless/detect_ac
236
237
238 unit: template
239@@ -162,6 +163,7 @@ estimated_duration: 15
240 flags: preserve-locale also-after-suspend also-after-suspend-manual
241 requires:
242 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
243+depends: wireless/detect
244
245
246 unit: template
247@@ -185,3 +187,4 @@ estimated_duration: 15
248 flags: preserve-locale also-after-suspend also-after-suspend-manual
249 requires:
250 net_if_management.device == '{{ interface }}' and net_if_management.managed_by == 'networkd'
251+depends: wireless/detect

Subscribers

People subscribed via source and target branches