blob: fad4a7ae494338b161e78cc8acec855d163d69fb [file] [log] [blame]
Bindu Mahadev27c2d292018-03-19 16:13:08 -07001#!/usr/bin/env python3.4
2#
3# Copyright 2018 - The Android Open Source Project
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16
17import itertools
18import pprint
19import queue
20import sys
21import time
22
23import acts.base_test
24import acts.signals as signals
25import acts.test_utils.wifi.wifi_test_utils as wutils
26import acts.utils as utils
27
28from acts import asserts
29from acts.controllers.ap_lib import hostapd_constants
30from acts.test_decorators import test_tracker_info
31from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_2G
32from acts.test_utils.tel.tel_test_utils import WIFI_CONFIG_APBAND_5G
33from acts.test_utils.wifi.WifiBaseTest import WifiBaseTest
34from threading import Thread
35
36WifiEnums = wutils.WifiEnums
37WIFI_CONFIG_APBAND_AUTO = -1
38
39class WifiSoftApAcsTest(WifiBaseTest):
40 """Tests for Automatic Channel Selection.
41
42 Test Bed Requirement:
43 * Two Android devices and an AP.
44 * 2GHz and 5GHz Wi-Fi network visible to the device.
45 """
46
47 def __init__(self, controllers):
48 WifiBaseTest.__init__(self, controllers)
49
50 def setup_class(self):
51 self.dut = self.android_devices[0]
52 self.dut_client = self.android_devices[1]
53 wutils.wifi_test_device_init(self.dut)
54 wutils.wifi_test_device_init(self.dut_client)
55 utils.require_sl4a((self.dut, self.dut_client))
56 utils.sync_device_time(self.dut)
57 utils.sync_device_time(self.dut_client)
58 # Set country code explicitly to "US".
59 self.dut.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
60 self.dut_client.droid.wifiSetCountryCode(wutils.WifiEnums.CountryCode.US)
61 # Enable verbose logging on the duts
62 self.dut.droid.wifiEnableVerboseLogging(1)
63 asserts.assert_equal(self.dut.droid.wifiGetVerboseLoggingLevel(), 1,
64 "Failed to enable WiFi verbose logging on the softap dut.")
65 self.dut_client.droid.wifiEnableVerboseLogging(1)
66 asserts.assert_equal(self.dut_client.droid.wifiGetVerboseLoggingLevel(), 1,
67 "Failed to enable WiFi verbose logging on the client dut.")
68 req_params = []
Girish Moturu55e46be2019-08-16 14:42:24 -070069 opt_param = ["iperf_server_address", "reference_networks",
70 "iperf_server_port"]
Bindu Mahadev27c2d292018-03-19 16:13:08 -070071 self.unpack_userparams(
72 req_param_names=req_params, opt_param_names=opt_param)
Bindu Mahadev27c2d292018-03-19 16:13:08 -070073
74 def setup_test(self):
75 self.dut.droid.wakeLockAcquireBright()
76 self.dut.droid.wakeUpNow()
77
78 def teardown_test(self):
79 self.dut.droid.wakeLockRelease()
80 self.dut.droid.goToSleepNow()
81 wutils.stop_wifi_tethering(self.dut)
82 wutils.reset_wifi(self.dut)
83 wutils.reset_wifi(self.dut_client)
84 try:
85 if "AccessPoint" in self.user_params:
86 del self.user_params["reference_networks"]
87 del self.user_params["open_network"]
88 except:
89 pass
Bindu Mahadev0c378a52018-05-10 16:49:01 -070090 self.access_points[0].close()
Bindu Mahadev27c2d292018-03-19 16:13:08 -070091
Bindu Mahadev27c2d292018-03-19 16:13:08 -070092 def on_fail(self, test_name, begin_time):
93 self.dut.take_bug_report(test_name, begin_time)
94 self.dut.cat_adb_log(test_name, begin_time)
95
96 """Helper Functions"""
97
98 def run_iperf_client(self, params):
99 """Run iperf traffic after connection.
100
101 Args:
102 params: A tuple of network info and AndroidDevice object.
103
104 """
105 if "iperf_server_address" in self.user_params:
106 network, ad = params
107 SSID = network[WifiEnums.SSID_KEY]
108 self.log.info("Starting iperf traffic through {}".format(SSID))
Girish Moturu55e46be2019-08-16 14:42:24 -0700109 port_arg = "-p {} -t {}".format(self.iperf_server_port, 3)
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700110 success, data = ad.run_iperf_client(self.iperf_server_address,
111 port_arg)
112 self.log.debug(pprint.pformat(data))
113 asserts.assert_true(success, "Error occurred in iPerf traffic.")
114 self.log.info("Finished iperf traffic through {}".format(SSID))
115
116 def start_softap_and_verify(self, band):
117 """Bring-up softap and verify AP mode and in scan results.
118
119 Args:
120 band: The band to use for softAP.
121
122 """
123 config = wutils.create_softap_config()
124 wutils.start_wifi_tethering(self.dut,
125 config[wutils.WifiEnums.SSID_KEY],
126 config[wutils.WifiEnums.PWD_KEY], band=band)
127 asserts.assert_true(self.dut.droid.wifiIsApEnabled(),
128 "SoftAp is not reported as running")
129 wutils.start_wifi_connection_scan_and_ensure_network_found(
130 self.dut_client, config[wutils.WifiEnums.SSID_KEY])
131 return config
132
133 def get_softap_acs(self, softap):
134 """Connect to the softap on client-dut and get the softap channel
135 information.
136
137 Args:
138 softap: The softap network configuration information.
139
140 """
141 wutils.connect_to_wifi_network(self.dut_client, softap,
142 check_connectivity=False)
143 softap_info = self.dut_client.droid.wifiGetConnectionInfo()
144 self.log.debug("DUT is connected to softAP %s with details: %s" %
145 (softap[wutils.WifiEnums.SSID_KEY], softap_info))
Bindu Mahadev0c378a52018-05-10 16:49:01 -0700146 frequency = softap_info['frequency']
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700147 return hostapd_constants.CHANNEL_MAP[frequency]
148
149 def configure_ap(self, channel_2g=None, channel_5g=None):
150 """Configure and bring up AP on required channel.
151
152 Args:
153 channel_2g: The channel number to use for 2GHz network.
154 channel_5g: The channel number to use for 5GHz network.
155
156 """
157 if "AccessPoint" in self.user_params:
158 if not channel_2g:
159 self.legacy_configure_ap_and_start(channel_5g=channel_5g)
160 elif not channel_5g:
161 self.legacy_configure_ap_and_start(channel_2g=channel_2g)
162 else:
163 self.legacy_configure_ap_and_start(channel_2g=channel_2g,
164 channel_5g=chanel_5g)
165
166 def start_traffic_and_softap(self, network, softap_band):
167 """Start iPerf traffic on client dut, during softAP bring-up on dut.
168
169 Args:
170 network: Network information of the network to connect to.
171 softap_band: The band to use for softAP.
172
173 """
174 if not network:
175 # For a clean environment just bring up softap and return channel.
176 softap = self.start_softap_and_verify(softap_band)
177 channel = self.get_softap_acs(softap)
178 return channel
179 # Connect to the AP and start IPerf traffic, while we bring up softap.
180 wutils.connect_to_wifi_network(self.dut_client, network)
181 t = Thread(target=self.run_iperf_client,args=((network,self.dut_client),))
182 t.setDaemon(True)
183 t.start()
184 time.sleep(1)
185 softap = self.start_softap_and_verify(softap_band)
186 t.join()
187 channel = self.get_softap_acs(softap)
188 return channel
189
190 def verify_acs_channel(self, chan, avoid_chan):
191 """Verify ACS algorithm by ensuring that softAP came up on a channel,
192 different than the active channels.
193
194 Args:
195 chan: The channel number softap came-up on.
196 avoid_chan: The channel to avoid during this test.
197
198 """
199 if avoid_chan in range(1,12):
200 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_5G
Bindu Mahadevf014b282018-05-30 14:00:28 -0700201 elif avoid_chan in range(36, 166):
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700202 avoid_chan2 = hostapd_constants.AP_DEFAULT_CHANNEL_2G
203 if chan == avoid_chan or chan == avoid_chan2:
204 raise signals.TestFailure("ACS chose the same channel that the "
205 "AP was beaconing on. Channel = %d" % chan)
206
207 """Tests"""
208 @test_tracker_info(uuid="3507bd18-e787-4380-8725-1872916d4267")
209 def test_softap_2G_clean_env(self):
210 """Test to bring up SoftAp on 2GHz in clean environment."""
211 network = None
212 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
213 if not chan in range(1, 12):
214 raise signals.TestFailure("ACS chose incorrect channel %d for 2GHz "
215 "band" % chan)
216
217 @test_tracker_info(uuid="3d18da8b-d29a-45f9-8018-5348e10099e9")
218 def test_softap_5G_clean_env(self):
219 """Test to bring up SoftAp on 5GHz in clean environment."""
220 network = None
221 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
222 if not chan in range(36, 166):
223 # Note: This does not treat DFS channel separately.
224 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
225 "band" % chan)
226
227 @test_tracker_info(uuid="cc353bda-3831-4d6e-b990-e501b8e4eafe")
228 def test_softap_auto_clean_env(self):
229 """Test to bring up SoftAp on AUTO-band in clean environment."""
230 network = None
231 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_AUTO)
232 if not chan in range(36, 166):
233 # Note: This does not treat DFS channel separately.
234 raise signals.TestFailure("ACS chose incorrect channel %d for 5GHz "
235 "band" % chan)
236
237 @test_tracker_info(uuid="a5f6a926-76d2-46a7-8136-426e35b5a5a8")
238 def test_softap_2G_avoid_channel_1(self):
239 """Test to configure AP and bring up SoftAp on 2G."""
240 self.configure_ap(channel_2g=1)
241 network = self.reference_networks[0]["2g"]
242 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
243 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
244 self.verify_acs_channel(chan, avoid_chan)
245
246 @test_tracker_info(uuid="757e2019-b027-40bf-a562-2b01f3e5957e")
247 def test_softap_5G_avoid_channel_1(self):
248 """Test to configure AP and bring up SoftAp on 5G."""
249 self.configure_ap(channel_2g=1)
250 network = self.reference_networks[0]["2g"]
251 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
252 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
253 self.verify_acs_channel(chan, avoid_chan)
254
255 @test_tracker_info(uuid="b96e39d1-9041-4662-a55f-22641c2e2b02")
256 def test_softap_2G_avoid_channel_2(self):
257 """Test to configure AP and bring up SoftAp on 2G."""
258 self.configure_ap(channel_2g=2)
259 network = self.reference_networks[0]["2g"]
260 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
261 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
262 self.verify_acs_channel(chan, avoid_chan)
263
264 @test_tracker_info(uuid="941c4e2b-ae35-4b49-aa81-13d3dc44b5b6")
265 def test_softap_5G_avoid_channel_2(self):
266 """Test to configure AP and bring up SoftAp on 5G."""
267 self.configure_ap(channel_2g=2)
268 network = self.reference_networks[0]["2g"]
269 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
270 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
271 self.verify_acs_channel(chan, avoid_chan)
272
273 @test_tracker_info(uuid="444c4a34-7f6b-4f02-9802-2e896e7d1796")
274 def test_softap_2G_avoid_channel_3(self):
275 """Test to configure AP and bring up SoftAp on 2G."""
276 self.configure_ap(channel_2g=3)
277 network = self.reference_networks[0]["2g"]
278 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
279 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
280 self.verify_acs_channel(chan, avoid_chan)
281
282 @test_tracker_info(uuid="eccd06b1-6df5-4144-8fda-1504cb822375")
283 def test_softap_5G_avoid_channel_3(self):
284 """Test to configure AP and bring up SoftAp on 5G."""
285 self.configure_ap(channel_2g=3)
286 network = self.reference_networks[0]["2g"]
287 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
288 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
289 self.verify_acs_channel(chan, avoid_chan)
290
291 @test_tracker_info(uuid="fb257644-2081-4c3d-8394-7a308dde0047")
292 def test_softap_2G_avoid_channel_4(self):
293 """Test to configure AP and bring up SoftAp on 2G."""
294 self.configure_ap(channel_2g=4)
295 network = self.reference_networks[0]["2g"]
296 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
297 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
298 self.verify_acs_channel(chan, avoid_chan)
299
300 @test_tracker_info(uuid="88b9cd16-4541-408a-8607-415fe60001f2")
301 def test_softap_5G_avoid_channel_4(self):
302 """Test to configure AP and bring up SoftAp on 5G."""
303 self.configure_ap(channel_2g=4)
304 network = self.reference_networks[0]["2g"]
305 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
306 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
307 self.verify_acs_channel(chan, avoid_chan)
308
309 @test_tracker_info(uuid="b3626ec8-50e8-412c-bdbe-5c5ade647d7b")
310 def test_softap_2G_avoid_channel_5(self):
311 """Test to configure AP and bring up SoftAp on 2G."""
312 self.configure_ap(channel_2g=5)
313 network = self.reference_networks[0]["2g"]
314 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
315 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
316 self.verify_acs_channel(chan, avoid_chan)
317
318 @test_tracker_info(uuid="45c4396b-9b0c-44f3-adf2-ea9c86fcab1d")
319 def test_softap_5G_avoid_channel_5(self):
320 """Test to configure AP and bring up SoftAp on 5G."""
321 self.configure_ap(channel_2g=5)
322 network = self.reference_networks[0]["2g"]
323 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
324 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
325 self.verify_acs_channel(chan, avoid_chan)
326
327 @test_tracker_info(uuid="f70634e7-c6fd-403d-8cd7-439fbbda6af0")
328 def test_softap_2G_avoid_channel_6(self):
329 """Test to configure AP and bring up SoftAp on 2G."""
330 self.configure_ap(channel_2g=6)
331 network = self.reference_networks[0]["2g"]
332 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
333 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
334 self.verify_acs_channel(chan, avoid_chan)
335
336 @test_tracker_info(uuid="f3341136-10bc-44e2-b9a8-2d27d3284b73")
337 def test_softap_5G_avoid_channel_6(self):
338 """Test to configure AP and bring up SoftAp on 5G."""
339 self.configure_ap(channel_2g=6)
340 network = self.reference_networks[0]["2g"]
341 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
342 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
343 self.verify_acs_channel(chan, avoid_chan)
344
345 @test_tracker_info(uuid="8129594d-1608-448b-8548-5a8c4022f2a1")
346 def test_softap_2G_avoid_channel_7(self):
347 """Test to configure AP and bring up SoftAp on 2G."""
348 self.configure_ap(channel_2g=7)
349 network = self.reference_networks[0]["2g"]
350 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
351 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
352 self.verify_acs_channel(chan, avoid_chan)
353
354 @test_tracker_info(uuid="7b470b82-d19b-438c-8f98-ce697e0eb474")
355 def test_softap_5G_avoid_channel_7(self):
356 """Test to configure AP and bring up SoftAp on 5G."""
357 self.configure_ap(channel_2g=7)
358 network = self.reference_networks[0]["2g"]
359 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
360 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
361 self.verify_acs_channel(chan, avoid_chan)
362
363 @test_tracker_info(uuid="11540182-d471-4bf0-8f8b-add89443c329")
364 def test_softap_2G_avoid_channel_8(self):
365 """Test to configure AP and bring up SoftAp on 2G."""
366 self.configure_ap(channel_2g=8)
367 network = self.reference_networks[0]["2g"]
368 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
369 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
370 self.verify_acs_channel(chan, avoid_chan)
371
372 @test_tracker_info(uuid="1280067c-389e-42e9-aa75-6bfbd61340f3")
373 def test_softap_5G_avoid_channel_8(self):
374 """Test to configure AP and bring up SoftAp on 5G."""
Bindu Mahadeved92b572019-02-08 16:38:20 -0800375 self.configure_ap(channel_2g=8)
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700376 network = self.reference_networks[0]["2g"]
377 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
378 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
379 self.verify_acs_channel(chan, avoid_chan)
380
381 @test_tracker_info(uuid="6feeb83c-2723-49cb-93c1-6297d4a3d853")
382 def test_softap_2G_avoid_channel_9(self):
383 """Test to configure AP and bring up SoftAp on 2G."""
384 self.configure_ap(channel_2g=9)
385 network = self.reference_networks[0]["2g"]
386 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
387 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
388 self.verify_acs_channel(chan, avoid_chan)
389
390 @test_tracker_info(uuid="49a110cd-03e8-4e99-9327-5123eab40902")
391 def test_softap_5G_avoid_channel_9(self):
392 """Test to configure AP and bring up SoftAp on 5G."""
393 self.configure_ap(channel_2g=9)
394 network = self.reference_networks[0]["2g"]
395 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
396 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
397 self.verify_acs_channel(chan, avoid_chan)
398
399 @test_tracker_info(uuid="a03c9e45-8763-4b5c-bead-e574fb9899a2")
400 def test_softap_2G_avoid_channel_10(self):
401 """Test to configure AP and bring up SoftAp on 2G."""
402 self.configure_ap(channel_2g=10)
403 network = self.reference_networks[0]["2g"]
404 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
405 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
406 self.verify_acs_channel(chan, avoid_chan)
407
408 @test_tracker_info(uuid="c1a1d272-a646-4c2d-8425-09d2ae6ae8e6")
409 def test_softap_5G_avoid_channel_10(self):
410 """Test to configure AP and bring up SoftAp on 5G."""
411 self.configure_ap(channel_2g=10)
412 network = self.reference_networks[0]["2g"]
413 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
414 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
415 self.verify_acs_channel(chan, avoid_chan)
416
417 @test_tracker_info(uuid="f38d8911-92d4-4dcd-ba23-1e1667fa1f5a")
418 def test_softap_2G_avoid_channel_11(self):
419 """Test to configure AP and bring up SoftAp on 2G."""
420 self.configure_ap(channel_2g=11)
421 network = self.reference_networks[0]["2g"]
422 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
423 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
424 self.verify_acs_channel(chan, avoid_chan)
425
426 @test_tracker_info(uuid="24cc35ba-45e3-4b7a-9bc9-25b7abe92fa9")
427 def test_softap_5G_avoid_channel_11(self):
428 """Test to configure AP and bring up SoftAp on 5G."""
429 self.configure_ap(channel_2g=11)
430 network = self.reference_networks[0]["2g"]
431 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
432 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
433 self.verify_acs_channel(chan, avoid_chan)
434
435 @test_tracker_info(uuid="85aef720-4f3c-43bb-9de0-615b88c2bfe0")
436 def test_softap_2G_avoid_channel_36(self):
437 """Test to configure AP and bring up SoftAp on 2G."""
438 self.configure_ap(channel_5g=36)
439 network = self.reference_networks[0]["5g"]
440 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
441 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
442 self.verify_acs_channel(chan, avoid_chan)
443
444 @test_tracker_info(uuid="433e8db3-93b5-463e-a83c-0d4b9b9a8700")
445 def test_softap_5G_avoid_channel_36(self):
446 """Test to configure AP and bring up SoftAp on 5G."""
447 self.configure_ap(channel_5g=36)
448 network = self.reference_networks[0]["5g"]
449 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
450 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
451 self.verify_acs_channel(chan, avoid_chan)
452
453 @test_tracker_info(uuid="326e0e42-3219-4e63-a18d-5dc32c58e7d8")
454 def test_softap_2G_avoid_channel_40(self):
455 """Test to configure AP and bring up SoftAp on 2G."""
456 self.configure_ap(channel_5g=40)
457 network = self.reference_networks[0]["5g"]
458 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
459 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
460 self.verify_acs_channel(chan, avoid_chan)
461
462 @test_tracker_info(uuid="45953c03-c978-4775-a39b-fb7e70c8990a")
463 def test_softap_5G_avoid_channel_40(self):
464 """Test to configure AP and bring up SoftAp on 5G."""
465 self.configure_ap(channel_5g=40)
466 network = self.reference_networks[0]["5g"]
467 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
468 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
469 self.verify_acs_channel(chan, avoid_chan)
470
471 @test_tracker_info(uuid="e8e89cec-aa27-4780-8ff8-546d5af820f7")
472 def test_softap_2G_avoid_channel_44(self):
473 """Test to configure AP and bring up SoftAp on 2G."""
474 self.configure_ap(channel_5g=44)
475 network = self.reference_networks[0]["5g"]
476 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
477 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
478 self.verify_acs_channel(chan, avoid_chan)
479
480 @test_tracker_info(uuid="5e386d7d-d4c9-40cf-9333-06da55e11ba1")
481 def test_softap_5G_avoid_channel_44(self):
482 """Test to configure AP and bring up SoftAp on 5G."""
483 self.configure_ap(channel_5g=44)
484 network = self.reference_networks[0]["5g"]
485 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
486 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
487 self.verify_acs_channel(chan, avoid_chan)
488
489 @test_tracker_info(uuid="cb51dfca-f8de-4dfc-b513-e590c838c766")
490 def test_softap_2G_avoid_channel_48(self):
491 """Test to configure AP and bring up SoftAp on 2G."""
492 self.configure_ap(channel_5g=48)
493 network = self.reference_networks[0]["5g"]
494 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
495 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
496 self.verify_acs_channel(chan, avoid_chan)
497
498 @test_tracker_info(uuid="490b8ed1-196c-4941-b06b-5f0721ca440b")
499 def test_softap_5G_avoid_channel_48(self):
500 """Test to configure AP and bring up SoftAp on 5G."""
501 self.configure_ap(channel_5g=48)
502 network = self.reference_networks[0]["5g"]
503 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
504 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
505 self.verify_acs_channel(chan, avoid_chan)
506
507 @test_tracker_info(uuid="c5ab141b-e145-4cc1-b0d7-dd610cbfb462")
508 def test_softap_2G_avoid_channel_149(self):
509 """Test to configure AP and bring up SoftAp on 2G."""
510 self.configure_ap(channel_5g=149)
511 network = self.reference_networks[0]["5g"]
512 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
513 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
514 self.verify_acs_channel(chan, avoid_chan)
515
516 @test_tracker_info(uuid="108d7ef8-6fe7-49ba-b684-3820e881fcf0")
517 def test_softap_5G_avoid_channel_149(self):
518 """Test to configure AP and bring up SoftAp on 5G."""
519 self.configure_ap(channel_5g=149)
520 network = self.reference_networks[0]["5g"]
521 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
522 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
523 self.verify_acs_channel(chan, avoid_chan)
524
525 @test_tracker_info(uuid="f6926f40-0afc-41c5-9b38-c95a99788ff5")
526 def test_softap_2G_avoid_channel_153(self):
527 """Test to configure AP and bring up SoftAp on 2G."""
528 self.configure_ap(channel_5g=153)
529 network = self.reference_networks[0]["5g"]
530 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
531 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
532 self.verify_acs_channel(chan, avoid_chan)
533
534 @test_tracker_info(uuid="3d7b653b-c094-4c57-8e6a-047629b05216")
535 def test_softap_5G_avoid_channel_153(self):
536 """Test to configure AP and bring up SoftAp on 5G."""
537 self.configure_ap(channel_5g=153)
538 network = self.reference_networks[0]["5g"]
539 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
540 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
541 self.verify_acs_channel(chan, avoid_chan)
542
543 @test_tracker_info(uuid="b866ceea-d3ca-45d4-964a-4edea96026e6")
544 def test_softap_2G_avoid_channel_157(self):
545 """Test to configure AP and bring up SoftAp on 2G."""
546 self.configure_ap(channel_5g=157)
547 network = self.reference_networks[0]["5g"]
548 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
549 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
550 self.verify_acs_channel(chan, avoid_chan)
551
552 @test_tracker_info(uuid="03cb9163-bca3-442e-9691-6df82f8c51c7")
Hsiu-Chang Chen32df2012019-05-22 14:24:46 +0800553 def test_softap_5G_avoid_channel_157(self):
Bindu Mahadev27c2d292018-03-19 16:13:08 -0700554 """Test to configure AP and bring up SoftAp on 5G."""
555 self.configure_ap(channel_5g=157)
556 network = self.reference_networks[0]["5g"]
557 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
558 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
559 self.verify_acs_channel(chan, avoid_chan)
560
561 @test_tracker_info(uuid="ae10f23a-da70-43c8-9991-2c2f4a602724")
562 def test_softap_2G_avoid_channel_161(self):
563 """Test to configure AP and bring up SoftAp on 2G."""
564 self.configure_ap(channel_5g=161)
565 network = self.reference_networks[0]["5g"]
566 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
567 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
568 self.verify_acs_channel(chan, avoid_chan)
569
570 @test_tracker_info(uuid="521686c2-acfa-42d1-861b-aa10ac4dad34")
571 def test_softap_5G_avoid_channel_161(self):
572 """Test to configure AP and bring up SoftAp on 5G."""
573 self.configure_ap(channel_5g=161)
574 network = self.reference_networks[0]["5g"]
575 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
576 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
577 self.verify_acs_channel(chan, avoid_chan)
578
579 @test_tracker_info(uuid="77ebecd7-c036-463f-b77d-2cd70d89bc81")
580 def test_softap_2G_avoid_channel_165(self):
581 """Test to configure AP and bring up SoftAp on 2G."""
582 self.configure_ap(channel_5g=165)
583 network = self.reference_networks[0]["5g"]
584 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_2G)
585 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
586 self.verify_acs_channel(chan, avoid_chan)
587
588 @test_tracker_info(uuid="85d9386d-fe60-4708-9f91-75bbf8bec54f")
589 def test_softap_5G_avoid_channel_165(self):
590 """Test to configure AP and bring up SoftAp on 5G."""
591 self.configure_ap(channel_5g=165)
592 network = self.reference_networks[0]["5g"]
593 chan = self.start_traffic_and_softap(network, WIFI_CONFIG_APBAND_5G)
594 avoid_chan = int(sys._getframe().f_code.co_name.split('_')[-1])
595 self.verify_acs_channel(chan, avoid_chan)