Fix file fetching for aosp/1953697 am: 69d3365fc8 am: 1b0f8ace57
Original change: https://android-review.googlesource.com/c/platform/tools/test/connectivity/+/1959551
Change-Id: I34bef8bd976c3cebfd2f10d826f4054d7cdb70e1
diff --git a/acts_tests/tests/google/wifi/WifiAutoUpdateTest.py b/acts_tests/tests/google/wifi/WifiAutoUpdateTest.py
index 38302ad..c50cef7 100755
--- a/acts_tests/tests/google/wifi/WifiAutoUpdateTest.py
+++ b/acts_tests/tests/google/wifi/WifiAutoUpdateTest.py
@@ -68,19 +68,27 @@
wutils.wifi_toggle_state(self.dut, True)
# configure APs
- self.legacy_configure_ap_and_start(wpa_network=True)
+ opt_param = ["reference_networks"]
+ self.unpack_userparams(opt_param_names=opt_param)
+ if "AccessPoint" in self.user_params:
+ self.legacy_configure_ap_and_start(wpa_network=True,
+ wep_network=True)
+ elif "OpenWrtAP" in self.user_params:
+ self.configure_openwrt_ap_and_start(wpa_network=True,
+ wep_network=True,
+ ap_count=2)
self.wpapsk_2g = self.reference_networks[0]["2g"]
self.wpapsk_5g = self.reference_networks[0]["5g"]
- self.open_2g = self.open_network[0]["2g"]
- self.open_5g = self.open_network[0]["5g"]
+ self.wep_2g = self.wep_networks[0]["2g"]
+ self.wep_5g = self.wep_networks[0]["5g"]
# saved & connected networks, network suggestions
# and new networks
- self.saved_networks = [self.open_2g]
+ self.saved_networks = [self.wep_2g]
self.network_suggestions = [self.wpapsk_5g]
- self.connected_networks = [self.wpapsk_2g, self.open_5g]
+ self.connected_networks = [self.wpapsk_2g, self.wep_5g]
self.new_networks = [self.reference_networks[1]["2g"],
- self.open_network[1]["5g"]]
+ self.wep_networks[1]["5g"]]
# add pre ota upgrade configuration
self.wifi_config_list = []
@@ -110,7 +118,6 @@
def teardown_class(self):
if "AccessPoint" in self.user_params:
del self.user_params["reference_networks"]
- del self.user_params["open_network"]
### Helper Methods
diff --git a/acts_tests/tests/google/wifi/WifiBridgedApTest.py b/acts_tests/tests/google/wifi/WifiBridgedApTest.py
index 5cc94d6..34a7d32 100644
--- a/acts_tests/tests/google/wifi/WifiBridgedApTest.py
+++ b/acts_tests/tests/google/wifi/WifiBridgedApTest.py
@@ -1281,8 +1281,6 @@
# Client connects to the 2G BridgedAp instance and wait 5 minutes.
self.client_connects_to_a_bridgeap(self.client1, BAND_2G)
self.wait_interval(BRIDGED_AP_SHUTDOWN_INTERVAL_5_MINUTES)
- # Verify there are two clients connect to the BridgedAp.
- self.verify_expected_number_of_softap_clients(self.dut, 2)
# Verify both 2G/5G BridgedAp instances exist.
self.verify_number_band_freq_of_bridged_ap(
self.dut, [WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G,
@@ -1325,8 +1323,6 @@
# Client connects to the 5G BridgedAp instance and wait 5 minutes.
self.client_connects_to_a_bridgeap(self.client1, BAND_5G)
self.wait_interval(BRIDGED_AP_SHUTDOWN_INTERVAL_5_MINUTES)
- # Verify there are two clients connect to the BridgedAp.
- self.verify_expected_number_of_softap_clients(self.dut, 2)
# Verify both 2G/5G BridgedAp instances exist.
self.verify_number_band_freq_of_bridged_ap(
self.dut, [WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G,
diff --git a/acts_tests/tests/google/wifi/WifiCellCoexChannelAvoidTest.py b/acts_tests/tests/google/wifi/WifiCellCoexChannelAvoidTest.py
new file mode 100644
index 0000000..6d47ddf
--- /dev/null
+++ b/acts_tests/tests/google/wifi/WifiCellCoexChannelAvoidTest.py
@@ -0,0 +1,274 @@
+#!/usr/bin/env python3.4
+#
+# Copyright 2016 - The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import os
+import time
+import re
+import json
+import logging
+import pprint
+
+from acts import asserts
+from acts import utils
+from acts.keys import Config
+from acts.test_decorators import test_tracker_info
+from acts_contrib.test_utils.wifi import wifi_constants
+from acts_contrib.test_utils.wifi import wifi_test_utils as wutils
+from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
+from acts_contrib.test_utils.wifi.wifi_constants import\
+ COEX_BAND, COEX_CHANNEL, COEX_POWER_CAP_DBM, KEY_COEX_UNSAFE_CHANNELS, KEY_COEX_RESTRICTIONS
+
+
+WifiEnums = wutils.WifiEnums
+WIFI_CONFIG_APBAND_2G = WifiEnums.WIFI_CONFIG_APBAND_2G
+WIFI_CONFIG_APBAND_5G = WifiEnums.WIFI_CONFIG_APBAND_5G
+WIFI_CONFIG_APBAND_AUTO = WifiEnums.WIFI_CONFIG_APBAND_AUTO
+WPA3_SAE_TRANSITION_SOFTAP = WifiEnums.SoftApSecurityType.WPA3_SAE_TRANSITION
+WPA3_SAE_SOFTAP = WifiEnums.SoftApSecurityType.WPA3_SAE
+WAIT_AFTER_REBOOT = 10
+
+BRIDGED_AP_LAUNCH_INTERVAL_5_SECONDS = 5
+
+
+class WifiCellCoexChannelAvoidTest(WifiBaseTest):
+
+ def __init__(self, configs):
+ super().__init__(configs)
+ self.generate_test_list()
+
+ def generate_test_list(self):
+ """Generates a test list sorted with coex_unsafe_list_sap list.
+ Test with a sorted list can reduce lots of time
+ on switch radio and band start up.
+ """
+ sorted_list = sorted(
+ self.user_params["coex_unsafe_list_sap"], key=lambda radio: radio["band"])
+ for test_item in sorted_list:
+ self.init_test_case(self.coex_unsafechannel_avoidance, test_item)
+ pprint.pprint("self.tests = {}".format(self.tests))
+
+ def init_test_case(self, coex_unsafechannel_avoidance, test_item):
+ """Generates a single test case from the given data.
+
+ Args:
+ coex_unsafechannel_avoidance: The base test case function to run.
+ test_item: test case required info include ["uuid","coex_unsafe_case"]
+ """
+ test_name = test_item["coex_unsafe_case"]
+ test_tracker_uuid = test_item["uuid"]
+ if not test_name.startswith("test_"):
+ test_name = "test_{}".format(test_name)
+ test_case = test_tracker_info(uuid=test_tracker_uuid)(
+ lambda: coex_unsafechannel_avoidance(test_item))
+ setattr(self, test_name, test_case)
+ self.tests.append(test_name)
+
+ def setup_class(self):
+ """It will setup the required dependencies from config file and configure
+ the devices for softap mode testing.
+
+ Returns:
+ True if successfully configured the requirements for testing.
+ """
+ super().setup_class()
+ self.dut = self.android_devices[0]
+ self.dut_client = self.android_devices[1]
+ req_params = ["dbs_supported_models", "sta_concurrency_supported_models",
+ "wifi6_models","coex_unsafe_list_sap"]
+ opt_param = ["reference_networks"]
+ self.unpack_userparams(
+ req_param_names=req_params, opt_param_names=opt_param)
+ if "AccessPoint" in self.user_params:
+ self.legacy_configure_ap_and_start()
+ elif "OpenWrtAP" in self.user_params:
+ self.configure_openwrt_ap_and_start(wpa_network=True)
+ self.wifi_network = self.reference_networks[0]["2g"]
+ # Do a simple version of init - mainly just sync the time and enable
+ # verbose logging. This test will fail if the DUT has a sim and cell
+ # data is disabled. We would also like to test with phones in less
+ # constrained states (or add variations where we specifically
+ # constrain).
+ utils.require_sl4a((self.dut, self.dut_client))
+ utils.sync_device_time(self.dut)
+ utils.sync_device_time(self.dut_client)
+ # Enable verbose logging on the duts
+ self.dut.droid.wifiEnableVerboseLogging(1)
+ asserts.assert_equal(self.dut.droid.wifiGetVerboseLoggingLevel(), 1,
+ "Failed to enable WiFi verbose logging on the softap dut.")
+ self.dut_client.droid.wifiEnableVerboseLogging(1)
+ asserts.assert_equal(self.dut_client.droid.wifiGetVerboseLoggingLevel(), 1,
+ "Failed to enable WiFi verbose logging on the client dut.")
+ wutils.wifi_toggle_state(self.dut, True)
+ wutils.wifi_toggle_state(self.dut_client, True)
+ self.AP_IFACE = 'wlan0'
+ if self.dut.model in self.dbs_supported_models:
+ self.AP_IFACE = 'wlan1'
+ if self.dut.model in self.sta_concurrency_supported_models:
+ self.AP_IFACE = 'wlan2'
+ if len(self.android_devices) > 2:
+ utils.sync_device_time(self.android_devices[2])
+ self.android_devices[2].droid.wifiEnableVerboseLogging(1)
+ asserts.assert_equal(self.android_devices[2].droid.wifiGetVerboseLoggingLevel(), 1,
+ "Failed to enable WiFi verbose logging on the client dut.")
+ self.dut_client_2 = self.android_devices[2]
+
+ def teardown_class(self):
+ super().teardown_class()
+ for ad in self.android_devices:
+ wutils.wifi_toggle_state(ad, True)
+ wutils.reset_wifi(ad)
+ time.sleep(WAIT_AFTER_REBOOT)
+ if self.dut.droid.wifiIsApEnabled():
+ wutils.stop_wifi_tethering(self.dut)
+ if "AccessPoint" in self.user_params:
+ del self.user_params["reference_networks"]
+ del self.user_params["open_network"]
+
+ def setup_test(self):
+ super().setup_test()
+ for ad in self.android_devices:
+ wutils.wifi_toggle_state(ad, True)
+ self.dut.reboot()
+ time.sleep(WAIT_AFTER_REBOOT)
+
+ def teardown_test(self):
+ super().teardown_test()
+ for ad in self.android_devices:
+ wutils.wifi_toggle_state(ad, True)
+ if self.dut.droid.wifiIsApEnabled():
+ wutils.stop_wifi_tethering(self.dut)
+ self.dut.log.debug("Toggling Airplane mode OFF.")
+ asserts.assert_true(utils.force_airplane_mode(self.dut, False),
+ "Can not turn off airplane mode: %s" % self.dut.serial)
+ #reset coexcell setting
+ self.dut.adb.shell('cmd wifi reset-coex-cell-channels')
+
+ """ Helper Functions """
+
+ def coex_unsafe_channel_key(self, unsafe_channel):
+ if COEX_POWER_CAP_DBM in unsafe_channel:
+ return (unsafe_channel[COEX_BAND], unsafe_channel[COEX_CHANNEL],
+ unsafe_channel[COEX_POWER_CAP_DBM])
+ return (unsafe_channel[COEX_BAND], unsafe_channel[COEX_CHANNEL])
+
+ def enable_softap(self, ad, band=None):
+ """ Enable SoftAp of the DUT
+
+ Returns:
+ (freq1, freq2): Integer; a 2G frequency and a 5G frequency if DUT
+ support BridgedAp.
+ freq: Integer; a frequency from SoftAp.
+ None, bandwidth: Just a placeholder, won't be used.
+ """
+ # Enable SoftAp
+ # Create SoftAp config.
+ config = wutils.create_softap_config()
+ # If DUT support BridgedAp, then two BridgedAp instances enabled.
+ if self.dut.droid.wifiIsBridgedApConcurrencySupported():
+ wutils.save_wifi_soft_ap_config(
+ ad,
+ config,
+ bands=[WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G,
+ WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G_5G])
+ # If DUT does not support BridgedAp, 2G OR 5G SoftAp enabled.
+ else:
+ if self.init_softap_band == BAND_2G:
+ band = WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G
+ if self.init_softap_band == BAND_5G:
+ band = WifiEnums.WIFI_CONFIG_SOFTAP_BAND_5G
+ wutils.save_wifi_soft_ap_config(ad,
+ config,
+ band=band)
+ wutils.start_wifi_tethering_saved_config(ad)
+ time.sleep(BRIDGED_AP_LAUNCH_INTERVAL_5_SECONDS)
+
+ # if DUT support BridgedAp:
+ if ad.droid.wifiIsBridgedApConcurrencySupported():
+ callbackId = ad.droid.registerSoftApCallback()
+ infos = wutils.get_current_softap_infos(ad, callbackId, True)
+ ad.droid.unregisterSoftApCallback(callbackId)
+ # if DUT BridgedAp has two instances, return two frequencies.
+ if len(infos) == 2:
+ freq_1 = infos[0]["frequency"]
+ freq_2 = infos[1]["frequency"]
+ self.dut.log.info("DUT connected to AP on freq: {},{}, chan: {} ,{}".
+ format(freq_1, freq_2, WifiEnums.freq_to_channel[freq_1],
+ WifiEnums.freq_to_channel[freq_2]))
+ return freq_1, freq_2
+ # if DUT BridgedAp has only one instances, return the frequency.
+ elif len(infos) == 1:
+ freq = infos[0]["frequency"]
+ self.dut.log.info("DUT connected to AP on freq: {}, chan: {}".
+ format(freq, WifiEnums.freq_to_channel[freq]))
+ return freq
+ else:
+ raise signals.TestFailure("There should be SoftAp instance.")
+ # if DUT does not support BridgedAp:
+ else:
+ # Return SoftAp frequency.
+ callbackId = ad.droid.registerSoftApCallback()
+ freq, bandwidth = wutils.get_current_softap_info(ad,
+ callbackId,
+ True)
+ ad.log.info("SoftAp freq: {}".format(freq))
+ ad.droid.unregisterSoftApCallback(callbackId)
+ self.dut.log.info("DUT connected to AP on freq: {}, chan: {}".
+ format(freq, WifiEnums.freq_to_channel[freq]))
+ return freq, bandwidth
+
+ """ Tests Begin """
+
+ def coex_unsafechannel_avoidance(self, test_item):
+ self.radio = test_item["radio"]
+ self.band = test_item["band"]
+ self.cellchannels = test_item["setcoexcellchannels"]
+ time.sleep(WAIT_AFTER_REBOOT)
+ wutils.set_wifi_country_code(self.dut, country_code='US')
+ asserts.skip_if(not self.dut.droid.isSdkAtLeastS(),
+ "Require SDK at least S to use wifi coex apis.")
+ self.dut.ed.clear_all_events()
+ #Listing the test coex setting from configuration
+ self.dut.log.info("DUT test cellcoex radio:{}, band:{}, channels setting:{}"
+ .format(self.radio, self.band, self.cellchannels))
+ self.dut.adb.shell('cmd wifi set-coex-cell-channels %s %s %s' % (self.radio, self.band,
+ self.cellchannels))
+ self.dut.droid.wifiRegisterCoexCallback()
+ try:
+ # Wait for the immediate callback from registering and store the current values
+ event = self.dut.ed.pop_event("WifiManagerCoexCallback#onCoexUnsafeChannelsChanged", 5)
+ except queue.Empty:
+ asserts.fail("Coex callback event not received after registering.")
+ prev_unsafe_channels = sorted(json.loads(event["data"][KEY_COEX_UNSAFE_CHANNELS]),
+ key=self.coex_unsafe_channel_key)
+ prev_restrictions = sorted(json.loads(event["data"][KEY_COEX_RESTRICTIONS]))
+ unsafe_channels = []
+ for i in range(len(prev_unsafe_channels)):
+ unsafe_channels.append(prev_unsafe_channels[i]['channel'])
+ self.dut.log.info("DUT unsafe channels:{}".format(unsafe_channels))
+ freq1, freq2 = self.enable_softap(self.dut)
+ sapchan1, sapchan2 = WifiEnums.freq_to_channel[freq1], WifiEnums.freq_to_channel[freq2]
+ if sapchan1 in unsafe_channels or sapchan2 in unsafe_channels:
+ asserts.fail("devices hotspot's channel open on current unsafe channels "
+ + str(unsafe_channels))
+ else:
+ pass
+ self.dut.droid.wifiUnregisterCoexCallback()
+ self.dut.adb.shell('cmd wifi reset-coex-cell-channels')
+
+ """ Tests End """
+
+if __name__ == "__main__":
+ pass
diff --git a/acts_tests/tests/google/wifi/WifiCountrySoftApAcsTest.py b/acts_tests/tests/google/wifi/WifiCountrySoftApAcsTest.py
new file mode 100644
index 0000000..3422167
--- /dev/null
+++ b/acts_tests/tests/google/wifi/WifiCountrySoftApAcsTest.py
@@ -0,0 +1,375 @@
+#!/usr/bin/env python3
+#
+# Copyright 2021 - The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import time
+from acts import asserts
+from acts import signals
+from acts.test_decorators import test_tracker_info
+import acts_contrib.test_utils.wifi.wifi_test_utils as wutils
+from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
+from acts.controllers.ap_lib.hostapd_constants import BAND_2G
+from acts.controllers.ap_lib.hostapd_constants import BAND_5G
+from acts.controllers.ap_lib import hostapd_constants
+
+# TODO: Find a better way to get real country code and channels data.
+COUNTRY_5G_NOT_ALLOWED = ["JP", "GB", "DE"]
+WIFI_5G_NON_DFS_CHANNELS = [36, 38, 40, 42, 44, 46, 48, 149, 153, 157, 161, 165]
+WIFI_5G_DFS_CHANNELS = [52, 56, 60, 64, 100, 104, 108, 112, 116, 132, 136, 140]
+WIFI_EU_SRD_CHANNELS = [149, 153, 157, 161, 165]
+
+BRIDGED_AP_LAUNCH_INTERVAL_5_SECONDS = 5
+WifiEnums = wutils.WifiEnums
+
+
+class WifiCountrySoftApAcsTest(WifiBaseTest):
+ """WiFi WifiSoftApCountryAcsTest test class.
+
+ Test Bed Requirement:
+ * Android DUT x 1.
+ * OpenWrt x 1.
+ """
+
+ def setup_class(self):
+ super().setup_class()
+
+ self.dut = self.android_devices[0]
+ self.client = self.android_devices[1]
+
+ req_params = []
+ opt_param = ["cnss_diag_file", "pixel_models"]
+
+ self.unpack_userparams(
+ req_param_names=req_params, opt_param_names=opt_param)
+
+ def setup_test(self):
+ super().setup_test()
+ for ad in self.android_devices:
+ wutils.reset_wifi(ad)
+ wutils.wifi_toggle_state(self.dut, True)
+ wutils.wifi_toggle_state(self.client, True)
+
+ def teardown_test(self):
+ super().teardown_test()
+ if self.dut.droid.wifiIsApEnabled():
+ wutils.stop_wifi_tethering(self.dut)
+
+ for ad in self.android_devices:
+ wutils.reset_wifi(ad)
+ wutils.set_wifi_country_code(
+ ad, wutils.WifiEnums.CountryCode.US)
+
+ def teardown_class(self):
+ super().teardown_class()
+ for ad in self.android_devices:
+ wutils.reset_wifi(ad)
+
+ if "AccessPoint" in self.user_params:
+ del self.user_params["reference_networks"]
+ del self.user_params["open_network"]
+
+ def is_bridgedap_supported(self, *args):
+ return self.dut.droid.wifiIsBridgedApConcurrencySupported()
+
+ def set_country_code_and_verify(self, ad, country_code):
+ """ Set Country Code to DUT.
+
+ Args:
+ ad: An AndroidDevice object.
+ country_code: String; 2 letter ISO country code, e,g,. "US".
+ """
+ wutils.set_wifi_country_code(ad, country_code)
+ # Wi-Fi OFF and ON to make sure country code take effect.
+ wutils.wifi_toggle_state(ad, False)
+ wutils.wifi_toggle_state(ad, True)
+
+ country = ad.droid.wifiGetCountryCode()
+ asserts.assert_true(country == country_code,
+ "country code {} is not set".format(country_code))
+ ad.log.info("Country code set to : {}".format(country))
+
+ def connect_wifi_network(self, init_sta_band, init_sta_chan):
+ """Enable OpenWrt with a 2G/5G channels and a DUT connect to it.
+
+ Args:
+ init_sta_band: String; "2g" or "5g".
+ init_sta_chan: Integer; use to setup OpenWrt 2G/5G channel.
+
+ Returns:
+ ap_freq: Integer'; represent the frequency of the AP which
+ the DUT connect to.
+ """
+
+ # Enable a Wi-Fi network and DUT connect to it.
+ if init_sta_band == BAND_2G:
+ connect = BAND_2G
+ channel_2g = init_sta_chan
+ channel_5g = hostapd_constants.AP_DEFAULT_CHANNEL_5G
+ elif init_sta_band == BAND_5G:
+ connect = BAND_5G
+ channel_2g = hostapd_constants.AP_DEFAULT_CHANNEL_2G
+ channel_5g = init_sta_chan
+
+ # Enable OpenWrt AP.
+ if "OpenWrtAP" in self.user_params:
+ self.openwrt = self.access_points[0]
+ self.configure_openwrt_ap_and_start(wpa_network=True,
+ channel_2g=channel_2g,
+ channel_5g=channel_5g)
+ self.ap1_2g = self.wpa_networks[0][BAND_2G]
+ self.ap1_5g = self.wpa_networks[0][BAND_5G]
+
+ self.openwrt.log.info("OpenWrt AP 2G: {}".format(self.ap1_2g))
+ self.openwrt.log.info("OpenWrt AP 5G: {}".format(self.ap1_5g))
+
+ if connect == BAND_2G:
+ wutils.connect_to_wifi_network(self.dut, self.ap1_2g)
+ elif connect == BAND_5G:
+ wutils.connect_to_wifi_network(self.dut, self.ap1_5g)
+
+ ap_freq = self.dut.droid.wifiGetConnectionInfo()["frequency"]
+ self.dut.log.info("DUT connected to AP on freq: {}, chan: {}".
+ format(ap_freq, WifiEnums.freq_to_channel[ap_freq]))
+ return ap_freq
+
+ def enable_softap(self, ad):
+ """ Enable SoftAp of the DUT
+
+ Args:
+ ad: An AndroidDevice object.
+
+ Returns:
+ (freq1, freq2): Integer; a 2G frequency and a 5G frequency if DUT
+ support BridgedAp.
+ freq: Integer; a frequency from SoftAp.
+ None, bandwidth: Just a placeholder, won't be used.
+
+ Raises:
+ TestFailure if no BridgedAp instances.
+ """
+ # Enable SoftAp
+ # Create SoftAp config.
+ config = wutils.create_softap_config()
+ # If DUT support BridgedAp, then two BridgedAp instances enabled.
+ if self.dut.droid.wifiIsBridgedApConcurrencySupported():
+ wutils.save_wifi_soft_ap_config(
+ ad,
+ config,
+ bands=[WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G,
+ WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G_5G])
+ # If DUT does not support BridgedAp, 2G OR 5G SoftAp enabled.
+ else:
+ if self.init_softap_band == BAND_2G:
+ band = WifiEnums.WIFI_CONFIG_SOFTAP_BAND_2G
+ elif self.init_softap_band == BAND_5G:
+ band = WifiEnums.WIFI_CONFIG_SOFTAP_BAND_5G
+ wutils.save_wifi_soft_ap_config(ad, config, band=band)
+ wutils.start_wifi_tethering_saved_config(ad)
+ time.sleep(BRIDGED_AP_LAUNCH_INTERVAL_5_SECONDS)
+
+ # if DUT support BridgedAp:
+ if ad.droid.wifiIsBridgedApConcurrencySupported():
+ callbackId = ad.droid.registerSoftApCallback()
+ infos = wutils.get_current_softap_infos(ad, callbackId, True)
+ ad.droid.unregisterSoftApCallback(callbackId)
+ # if DUT BridgedAp has two instances, return two frequencies.
+ if len(infos) == 2:
+ freq_1 = infos[0]["frequency"]
+ freq_2 = infos[1]["frequency"]
+ return freq_1, freq_2
+ # if DUT BridgedAp has only one instances, return the frequency.
+ elif len(infos) == 1:
+ freq = infos[0]["frequency"]
+ return freq, None
+ else:
+ raise signals.TestFailure("There should be SoftAp instance.")
+ # if DUT does not support BridgedAp:
+ else:
+ # Return SoftAp frequency.
+ callbackId = ad.droid.registerSoftApCallback()
+ freq, bandwidth = wutils.get_current_softap_info(ad, callbackId,
+ True)
+ ad.log.info("SoftAp freq: {}".format(freq))
+ ad.droid.unregisterSoftApCallback(callbackId)
+ return freq, bandwidth
+
+ def collect_acs_failures(self, freq1, freq2, country, init_sta_band,
+ init_sta_chan, init_softap_band):
+ """ Verify SoftAp ACS rules and return error message when fail.
+
+ Args:
+ freq1: Integer; frequency from SoftAp.
+ freq2: Integer; frequency from SoftAp.
+ country: String; Two letters country code, e.g., "US".
+ init_sta_band: String; "2g" or "5g".
+ init_sta_chan: Integer; use to setup OpenWrt 2G/5G channel.
+ init_softap_band: String: "2g" or "5g".
+
+ Returns: List of string; contains failure messages.
+ """
+ # If DUT support BridgedAp(Dual SoftAp).
+ # Decide which is softap_2g_freq, which is softap_5g_freq
+ self.softap_freq_1 = freq1
+ if self.dut.droid.wifiIsBridgedApConcurrencySupported():
+ self.softap_freq_2 = freq2
+ if self.softap_freq_1 in WifiEnums.ALL_2G_FREQUENCIES:
+ self.softap_2g_freq = self.softap_freq_1
+ elif self.softap_freq_1 in WifiEnums.ALL_5G_FREQUENCIES:
+ self.softap_5g_freq = self.softap_freq_1
+ if self.softap_freq_2 in WifiEnums.ALL_2G_FREQUENCIES:
+ self.softap_2g_freq = self.softap_freq_2
+ elif self.softap_freq_2 in WifiEnums.ALL_5G_FREQUENCIES:
+ self.softap_5g_freq = self.softap_freq_2
+ # If DUT does not support BridgedAp(Dual SoftAp).
+ # Decide the frequency is softap_2g_freq or softap_5g_freq
+ else:
+ if self.softap_freq_1 in WifiEnums.ALL_2G_FREQUENCIES:
+ self.softap_2g_freq = self.softap_freq_1
+ elif self.softap_freq_1 in WifiEnums.ALL_5G_FREQUENCIES:
+ self.softap_5g_freq = self.softap_freq_1
+
+ # Verify ACS when SoftAp 2G enabled.
+ failures = []
+ if init_softap_band == BAND_2G:
+ if init_sta_band == BAND_2G:
+ self.dut.log.info("Verifying 2G SoftAp chan == 2G STA chan")
+ if self.softap_2g_freq != self.actual_sta_freq:
+ failures.append("Expect 2G SoftAp chan == 2G STA chan")
+ else:
+ self.dut.log.info("Verifying SoftAp still operates on 2G")
+ if self.softap_2g_freq not in WifiEnums.ALL_2G_FREQUENCIES:
+ failures.append("Expect SoftAp still operates on 2G")
+
+ # Verify ACS when SoftAp 5G enabled.
+ elif init_softap_band == BAND_5G:
+ if (country in COUNTRY_5G_NOT_ALLOWED or
+ init_sta_chan in WIFI_5G_DFS_CHANNELS or
+ init_sta_chan in WIFI_EU_SRD_CHANNELS):
+ self.dut.log.info("Verifying SoftAp fallback to 2G")
+ if self.softap_2g_freq not in WifiEnums.ALL_2G_FREQUENCIES:
+ failures.append("Expect SoftAp fallback to 2G.")
+ else:
+ if init_sta_band == BAND_2G:
+ self.dut.log.info("Verifying SoftAp still operates on 5G")
+ if self.softap_5g_freq not in WifiEnums.ALL_5G_FREQUENCIES:
+ failures.append("Expect SoftAp still operates on 5G.")
+ elif init_sta_chan in WIFI_5G_NON_DFS_CHANNELS:
+ self.dut.log.info("Verify 5G SoftAp chan == 5g STA chan")
+ if self.softap_5g_freq != self.actual_sta_freq:
+ failures.append("Expect 5G SoftAp chan == 5G STA chan")
+ failures = "\n".join(failures)
+ return failures
+
+ def validate_country_softap_acs(self, country, init_sta_band,
+ init_sta_chan, init_softap_band):
+ """ Verify SoftAp ACS on certain country work as expected.
+
+ Steps:
+ Get country, STA band, STA channel from test case name.
+ Set a country code to the DUT.
+ Enable a Wi-Fi network.
+ DUT connects to the Wi-Fi network.
+ DUT enable SoftAp.
+ P20 and previous
+ Enable SoftAp (2G OR 5G).
+ P21 and later:
+ Enable BridgedAp (2G AND 5G)
+ Get SoftAp(or BridgedAp) channel.
+ Get AP channel.
+ Verify Country SoftAp ACS.
+
+ Args:
+ country: String; Two letters country code, e.g., "US".
+ init_sta_band: String; "2g" or "5g".
+ init_sta_chan: Integer; use to setup OpenWrt 2G/5G channel.
+ init_softap_band: String: "2g" or "5g".
+
+ Returns: List of string; contains failure messages.
+ """
+ # Set a country code to the DUT.
+ self.set_country_code_and_verify(self.dut, country)
+ # Get DUT STA frequency.
+ self.actual_sta_freq = self.connect_wifi_network(init_sta_band,
+ init_sta_chan)
+ # DUT Enable SoftAp.
+ freq1, freq2 = self.enable_softap(self.dut)
+ # Verify Country SoftAp ACS.
+ return self.collect_acs_failures(freq1, freq2, country, init_sta_band,
+ init_sta_chan, init_softap_band)
+
+ # Tests
+
+ @test_tracker_info(uuid="003c67f7-f4cc-4f04-ab34-28c71a7602d9")
+ def test_country_us_softap_acs_sta_2g_ch_1_softap_2g(self):
+ """Verify SoftAp ACS on STA 2G CH1 and SoftAp 2G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "2g", 1, "2g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="b3c0a7a4-150f-469c-9191-8d446b2e2593")
+ def test_country_us_softap_acs_sta_5g_ch_36_softap_2g(self):
+ """Verify SoftAp ACS on STA 5G NON-DFS CH36 and SoftAp 2G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "5g", 36, "2g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="7c660706-e63d-4753-bb6e-dacdf4c36cc0")
+ def test_country_us_softap_acs_sta_5g_ch_132_softap_2g(self):
+ """Verify SoftAp ACS on STA 5G DFS CH52 and SoftAp 2G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "5g", 132, "2g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="31973348-852e-4cd7-9a72-6e8f333623c5")
+ def test_country_de_softap_acs_sta_5g_ch_161_softap_2g(self):
+ """Verify SoftAp ACS on STA 5G EU SRD CH149 and SoftAp 2G in DE.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "5g", 161, "2g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="8ebba60c-a32c-46b3-b9da-411b1ef66288")
+ def test_country_us_softap_acs_sta_2g_ch_1_softap_5g(self):
+ """Verify SoftAp ACS on STA 2G CH1 and SoftAp 5G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "2g", 1, "5g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="503ece09-3030-4a69-ae15-320f5104ddd2")
+ def test_country_us_softap_acs_sta_5g_ch_36_softap_5g(self):
+ """Verify SoftAp ACS on STA 5G NON-DFS CH36 and SoftAp 5G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "5g", 36, "5g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="35a5f2f5-067d-4d67-aeb8-58fb253f4b97")
+ def test_country_us_softap_acs_sta_5g_ch_132_softap_5g(self):
+ """Verify SoftAp ACS on STA 5G DFS CH52 and SoftAp 5G in US.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("US", "5g", 132, "5g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="866954a3-72b6-4e7d-853f-9e1659cdf305")
+ def test_country_de_softap_acs_sta_5g_ch_161_softap_5g(self):
+ """Verify SoftAp ACS on STA 5G EU SRD CH149 and SoftAp 5G in DE.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("DE", "5g", 161, "5g")
+ asserts.assert_false(failures, str(failures))
+
+ @test_tracker_info(uuid="866954a3-72b6-4e7d-853f-9e1659cdf305")
+ def test_country_jp_softap_acs_sta_5g_ch_36_softap_5g(self):
+ """Verify SoftAp ACS on STA 5G EU SRD CH149 and SoftAp 5G in DE.
+ Steps: See docstring of validate_country_softap_acs()."""
+ failures = self.validate_country_softap_acs("JP", "5g", 36, "5g")
+ asserts.assert_false(failures, str(failures))
diff --git a/acts_tests/tests/google/wifi/WifiPasspointTest.py b/acts_tests/tests/google/wifi/WifiPasspointTest.py
index 3c78e06..994d8ee 100755
--- a/acts_tests/tests/google/wifi/WifiPasspointTest.py
+++ b/acts_tests/tests/google/wifi/WifiPasspointTest.py
@@ -90,8 +90,8 @@
self.dut.droid.wakeLockRelease()
self.dut.droid.goToSleepNow()
passpoint_configs = self.dut.droid.getPasspointConfigs()
- for config in passpoint_configs:
- wutils.delete_passpoint(self.dut, config)
+ for config in range(len(passpoint_configs)):
+ wutils.delete_passpoint(self.dut, passpoint_config[config])
wutils.reset_wifi(self.dut)
@@ -142,9 +142,10 @@
if not len(passpoint_config):
raise signals.TestFailure("Failed to fetch the list of configured"
"passpoint networks.")
- if not wutils.delete_passpoint(self.dut, passpoint_config[0]):
- raise signals.TestFailure("Failed to delete Passpoint configuration"
- " with FQDN = %s" % passpoint_config[0])
+ for i in range(len(passpoint_config)):
+ if not wutils.delete_passpoint(self.dut, passpoint_config[i]):
+ raise signals.TestFailure("Failed to delete Passpoint configuration"
+ " with FQDN = %s" % passpoint_config[i])
def ui_automator_boingo(self):
"""Run UI automator for boingo passpoint."""
diff --git a/acts_tests/tests/google/wifi/WifiStaApConcurrencyStressTest.py b/acts_tests/tests/google/wifi/WifiStaApConcurrencyStressTest.py
index 2d765d2..21333e3 100755
--- a/acts_tests/tests/google/wifi/WifiStaApConcurrencyStressTest.py
+++ b/acts_tests/tests/google/wifi/WifiStaApConcurrencyStressTest.py
@@ -16,6 +16,7 @@
import time
import pprint
+import acts
from acts import asserts
from acts import signals
@@ -27,6 +28,7 @@
import acts_contrib.test_utils.wifi.wifi_test_utils as wutils
WifiEnums = wutils.WifiEnums
+DEFAULT_TIMEOUT = 10
# Channels to configure the AP for various test scenarios.
WIFI_NETWORK_AP_CHANNEL_2G = 1
@@ -56,13 +58,35 @@
"test_stress_softap_5G_wifi_connection_2G",
"test_stress_softap_2G_wifi_connection_5G",
"test_stress_softap_2G_wifi_connection_5G_DFS",
- "test_stress_softap_5G_wifi_connection_2G_with_location_scan_on")
+ "test_stress_softap_5G_wifi_connection_2G_with_location_scan_on",
+ "test_2g_sta_mode_and_hotspot_5g_on_off_stress_under_airplane_mode")
def setup_class(self):
super().setup_class()
opt_param = ["stress_count"]
self.unpack_userparams(opt_param_names=opt_param)
+ def setup_test(self):
+ super().setup_test()
+ for ad in self.android_devices:
+ ad.droid.wakeLockAcquireBright()
+ ad.droid.wakeUpNow()
+ wutils.wifi_toggle_state(self.dut, True)
+
+ def teardown_test(self):
+ super().teardown_test()
+ for ad in self.android_devices:
+ ad.droid.wakeLockRelease()
+ ad.droid.goToSleepNow()
+ if self.dut.droid.wifiIsApEnabled():
+ wutils.stop_wifi_tethering(self.dut)
+ for ad in self.android_devices:
+ wutils.reset_wifi(ad)
+ self.log.debug("Toggling Airplane mode OFF")
+ asserts.assert_true(
+ acts.utils.force_airplane_mode(self.dut, False),
+ "Can not turn airplane mode off: %s" % self.dut.serial)
+
"""Helper Functions"""
def connect_to_wifi_network_and_verify(self, params):
"""Connection logic for open and psk wifi networks.
@@ -254,3 +278,21 @@
for count in range(self.stress_count):
self.log.info("Iteration %d", count+1)
self.verify_wifi_full_on_off(self.open_2g, softap_config)
+
+ @test_tracker_info(uuid="36c7f847-4b3e-4bb1-a280-cfe2b6afc903")
+ def test_2g_sta_mode_and_hotspot_5g_on_off_stress_under_airplane_mode(self):
+ """Tests connection to 2G network followed by bringing up SoftAp on 5G
+ under airplane mode
+ """
+ self.log.debug("Toggling Airplane mode ON")
+ asserts.assert_true(
+ acts.utils.force_airplane_mode(self.dut, True),
+ "Can not turn on airplane mode on: %s" % self.dut.serial)
+ time.sleep(DEFAULT_TIMEOUT)
+ self.configure_ap(channel_2g=WIFI_NETWORK_AP_CHANNEL_2G)
+ wutils.wifi_toggle_state(self.dut, True)
+ self.connect_to_wifi_network_and_verify((self.open_2g, self.dut))
+ time.sleep(DEFAULT_TIMEOUT)
+ for count in range(self.stress_count):
+ self.log.info("Iteration %d", count+1)
+ self.verify_softap_full_on_off(self.open_2g, WIFI_CONFIG_APBAND_5G)
\ No newline at end of file
diff --git a/acts_tests/tests/google/wifi/WifiStressTest.py b/acts_tests/tests/google/wifi/WifiStressTest.py
index 87417f8..81a3511 100644
--- a/acts_tests/tests/google/wifi/WifiStressTest.py
+++ b/acts_tests/tests/google/wifi/WifiStressTest.py
@@ -34,9 +34,10 @@
WAIT_FOR_AUTO_CONNECT = 40
WAIT_BEFORE_CONNECTION = 30
-
-TIMEOUT = 5
+DEFAULT_TIMEOUT = 10
PING_ADDR = 'www.google.com'
+BAND_2GHZ = 0
+BAND_5GHZ = 1
class WifiStressTest(WifiBaseTest):
"""WiFi Stress test class.
@@ -96,6 +97,10 @@
self.dut.droid.wakeLockRelease()
self.dut.droid.goToSleepNow()
wutils.reset_wifi(self.dut)
+ self.log.debug("Toggling Airplane mode OFF")
+ asserts.assert_true(
+ acts.utils.force_airplane_mode(self.dut, False),
+ "Can not turn airplane mode off: %s" % self.dut.serial)
def teardown_class(self):
wutils.reset_wifi(self.dut)
@@ -535,3 +540,38 @@
wutils.set_attns(self.attenuators, "default")
raise signals.TestPass(details="", extras={"Iterations":"%d" %
self.stress_count, "Pass":"%d" %(count+1)})
+
+ @test_tracker_info(uuid="c880e742-8d20-4134-b717-5b6d45f6c337")
+ def test_2g_sta_wifi_on_off_under_airplane_mode(self):
+ """Toggle WiFi state ON and OFF for N times when airplane mode ON."""
+ self.scan_and_connect_by_ssid(self.dut, self.wpa_2g)
+ self.log.debug("Toggling Airplane mode ON")
+ asserts.assert_true(
+ acts.utils.force_airplane_mode(self.dut, True),
+ "Can not turn on airplane mode on: %s" % self.dut.serial)
+ time.sleep(DEFAULT_TIMEOUT)
+ for count in range(self.stress_count):
+ """Test toggling wifi"""
+ try:
+ self.log.debug("Going from on to off.")
+ wutils.wifi_toggle_state(self.dut, False)
+ self.log.debug("Going from off to on.")
+ startTime = time.time()
+ wutils.wifi_toggle_state(self.dut, True)
+ startup_time = time.time() - startTime
+ self.log.debug("WiFi was enabled on the device in %s s." %
+ startup_time)
+ time.sleep(DEFAULT_TIMEOUT)
+ # Start IPerf traffic from phone to server.
+ # Upload data for 10s.
+ args = "-p {} -t {}".format(self.iperf_server_port, 10)
+ self.log.info("Running iperf client {}".format(args))
+ result, data = self.dut.run_iperf_client(self.iperf_server_address, args)
+ if not result:
+ self.log.debug("Error occurred in iPerf traffic.")
+ self.run_ping(10)
+ except:
+ signals.TestFailure(details="", extras={"Iterations":"%d" %
+ self.stress_count, "Pass":"%d" %count})
+ raise signals.TestPass(details="", extras={"Iterations":"%d" %
+ self.stress_count, "Pass":"%d" %(count+1)})
\ No newline at end of file
diff --git a/acts_tests/tests/google/wifi/WifiWpa3AutoUpdateTest.py b/acts_tests/tests/google/wifi/WifiWpa3AutoUpdateTest.py
new file mode 100644
index 0000000..60d8ebb
--- /dev/null
+++ b/acts_tests/tests/google/wifi/WifiWpa3AutoUpdateTest.py
@@ -0,0 +1,201 @@
+# !/usr/bin/env python3.4
+#
+# Copyright 2017 - The Android Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import re
+from acts.libs.ota import ota_updater
+import acts.signals as signals
+from acts.test_decorators import test_tracker_info
+import acts_contrib.test_utils.wifi.wifi_test_utils as wutils
+from acts_contrib.test_utils.wifi.WifiBaseTest import WifiBaseTest
+import acts.utils as utils
+from WifiAutoUpdateTest import WifiAutoUpdateTest
+
+WifiEnums = wutils.WifiEnums
+SSID = WifiEnums.SSID_KEY
+PWD = WifiEnums.PWD_KEY
+NETID = WifiEnums.NETID_KEY
+# Default timeout used for reboot, toggle WiFi and Airplane mode,
+# for the system to settle down after the operation.
+EAP = WifiEnums.Eap
+Ent = WifiEnums.Enterprise
+WPA3_SECURITY = "SUITE_B_192"
+
+
+class WifiWpa3AutoUpdateTest(WifiAutoUpdateTest):
+ """Tests for APIs in Android's WifiManager class.
+
+ Test Bed Requirement:
+ * One Android device
+ * Several Wi-Fi networks visible to the device, including an open Wi-Fi
+ network.
+ """
+
+ def __init__(self, configs):
+ super().__init__(configs)
+ self.tests = (
+ "test_check_wpa3_wifi_state_after_au",
+ "test_verify_wpa3_networks_after_au",
+ "test_wpa3_configstore_after_au",
+ "test_all_wpa3_networks_connectable_after_au",
+ "test_check_wpa3_wifi_toggling_after_au",
+ "test_wpa3_connection_to_new_networks",
+ "test_reset_wpa3_wifi_after_au")
+
+ def setup_class(self):
+ super(WifiBaseTest, self).setup_class()
+ ota_updater.initialize(self.user_params, self.android_devices)
+ self.dut = self.android_devices[0]
+ self.dut_client = self.android_devices[1]
+ wutils.wifi_test_device_init(self.dut)
+ wutils.wifi_toggle_state(self.dut, True)
+
+ # configure APs
+ req_params = ["ec2_ca_cert", "ec2_client_cert", "ec2_client_key", "rsa3072_ca_cert",
+ "rsa3072_client_cert", "rsa3072_client_key", "wpa3_ec2_network",
+ "wpa3_rsa3072_network", "rsa2048_client_cert", "rsa2048_client_key",
+ "rsa3072_client_cert_expired", "rsa3072_client_cert_corrupted",
+ "rsa3072_client_cert_unsigned", "rsa3072_client_key_unsigned",
+ "wpa3_sae_gcmp_128", "wpa3_sae_gcmp_256","owe_networks", "sae_networks"]
+ self.unpack_userparams(
+ req_param_names=req_params
+ )
+ self.owe_2g = self.owe_networks[0]["2g"]
+ self.owe_5g = self.owe_networks[0]["5g"]
+ self.wpa3_personal_2g = self.sae_networks[0]["2g"]
+ self.wpa3_personal_5g = self.sae_networks[0]["5g"]
+
+ self.config_rsa3072_tls = {
+ Ent.EAP: int(EAP.TLS),
+ Ent.CA_CERT: self.rsa3072_ca_cert,
+ WifiEnums.SSID_KEY: self.wpa3_rsa3072_network[WifiEnums.SSID_KEY],
+ Ent.CLIENT_CERT: self.rsa3072_client_cert,
+ Ent.PRIVATE_KEY_ID: self.rsa3072_client_key,
+ WifiEnums.SECURITY: WPA3_SECURITY,
+ "identity": self.wpa3_rsa3072_network["identity"],
+ "domain_suffix_match": self.wpa3_rsa3072_network["domain"]
+ }
+
+ # saved & connected networks, network suggestions
+ # and new networks
+ self.saved_networks = [self.wpa3_sae_gcmp_256]
+ self.network_suggestions = [self.owe_2g]
+ self.connected_networks = [self.config_rsa3072_tls, self.wpa3_personal_5g]
+ self.new_networks = [self.wpa3_personal_2g]
+ # add pre ota upgrade configuration
+ self.wifi_config_list = []
+ self.pre_default_mac = {}
+ self.pre_random_mac = {}
+ self.pst_default_mac = {}
+ self.pst_random_mac = {}
+ self.add_pre_update_configuration()
+
+ # Run OTA below, if ota fails then abort all tests.
+ try:
+ ota_updater.update(self.dut)
+ except Exception as e:
+ raise signals.TestAbortClass(
+ "Failed up apply OTA update. Aborting tests: %s" % e)
+
+ ### Tests
+
+ @test_tracker_info(uuid="4d17a21c-3db6-4336-84ac-f3317e4a7fca")
+ @WifiBaseTest.wifi_test_wrap
+ def test_check_wpa3_wifi_state_after_au(self):
+ """Check if the state of WiFi is enabled after Auto-update."""
+ super().test_check_wifi_state_after_au()
+
+ @test_tracker_info(uuid="4dd106b0-6390-47d2-9b6d-00f21a0535f1")
+ @WifiBaseTest.wifi_test_wrap
+ def test_verify_wpa3_networks_after_au(self):
+ """Check if the previously added networks are intact.
+
+ Steps:
+ Number of networs should be the same and match each network.
+
+ """
+ super().test_verify_networks_after_au()
+
+ @test_tracker_info(uuid="4e5107d1-17cc-4c4d-aee5-38052dec5ddd")
+ @WifiBaseTest.wifi_test_wrap
+ def test_wpa3_configstore_after_au(self):
+ """Verify DUT automatically connects to wifi networks after ota.
+
+ Steps:
+ 1. Connect to two wifi networks pre ota.
+ 2. Verify DUT automatically connects to 1 after ota.
+ 3. Re-connect to the other wifi network.
+ """
+ wifi_info = self.dut.droid.wifiGetConnectionInfo()
+ self.pst_default_mac[wifi_info[SSID]] = self.get_sta_mac_address()
+ self.pst_random_mac[wifi_info[SSID]] = \
+ self.dut.droid.wifigetRandomizedMacAddress(wifi_info)
+ reconnect_to = self.get_enabled_network(self.wifi_config_list[1],
+ self.wifi_config_list[2])
+ wutils.start_wifi_connection_scan_and_ensure_network_found(
+ self.dut, reconnect_to[SSID])
+
+ if reconnect_to[SSID] == self.connected_networks[0][SSID]:
+ wutils.wifi_connect(self.dut, self.connected_networks[0], num_of_tries=6)
+ else:
+ wutils.wifi_connect(self.dut, self.connected_networks[1], num_of_tries=6)
+ connect_data = self.dut.droid.wifiGetConnectionInfo()
+ connect_ssid = connect_data[SSID]
+ self.log.info("Expected SSID = %s" % reconnect_to[SSID])
+ self.log.info("Connected SSID = %s" % connect_ssid)
+ if connect_ssid != reconnect_to[SSID]:
+ raise signals.TestFailure(
+ "Device failed to reconnect to the correct"
+ " network after reboot.")
+ self.pst_default_mac[wifi_info[SSID]] = self.get_sta_mac_address()
+ self.pst_random_mac[wifi_info[SSID]] = \
+ self.dut.droid.wifigetRandomizedMacAddress(wifi_info)
+
+ for network in self.connected_networks:
+ wutils.wifi_forget_network(self.dut, network[SSID])
+
+ @test_tracker_info(uuid="f1b59dde-b019-46c4-84b8-cf20f4afa08a")
+ @WifiBaseTest.wifi_test_wrap
+ def test_wpa3_connection_to_new_networks(self):
+ """Check if we can connect to new networks after Auto-update.
+
+ Steps:
+ 1. Connect to a wpa3 network.
+ 2. Forget ntworks added in 1.
+ """
+ super().test_connection_to_new_networks()
+
+
+ @test_tracker_info(uuid="542a39c3-eea0-445c-89ae-8c74c6afb0bf")
+ @WifiBaseTest.wifi_test_wrap
+ def test_all_wpa3_networks_connectable_after_au(self):
+ """Check if previously added networks are connectable.
+
+ Steps:
+ 1. Connect to previously added wpa3 network using network id.
+ """
+ super().test_all_networks_connectable_after_au()
+
+ @test_tracker_info(uuid="68a34667-aca2-4630-b2fa-c25f1d234a92")
+ @WifiBaseTest.wifi_test_wrap
+ def test_check_wpa3_wifi_toggling_after_au(self):
+ """Check if WiFi can be toggled ON/OFF after auto-update."""
+ super().test_check_wifi_toggling_after_au()
+
+ @test_tracker_info(uuid="39ba98de-cb49-4475-a218-7470122af885")
+ @WifiBaseTest.wifi_test_wrap
+ def test_reset_wpa3_wifi_after_au(self):
+ """"Check if WiFi can be reset after auto-update."""
+ super().test_reset_wifi_after_au()
diff --git a/acts_tests/tests/google/wifi/aware/performance/ThroughputTest.py b/acts_tests/tests/google/wifi/aware/performance/ThroughputTest.py
index 7ab4506..96d9d48 100644
--- a/acts_tests/tests/google/wifi/aware/performance/ThroughputTest.py
+++ b/acts_tests/tests/google/wifi/aware/performance/ThroughputTest.py
@@ -21,6 +21,7 @@
import time
from acts import asserts
+from acts.test_decorators import test_tracker_info
from acts_contrib.test_utils.net import connectivity_const as cconsts
from acts_contrib.test_utils.wifi.aware import aware_const as aconsts
from acts_contrib.test_utils.wifi.aware import aware_test_utils as autils
@@ -217,7 +218,7 @@
results[i]["tx_rate"], results[i]["rx_rate"])
########################################################################
-
+ @test_tracker_info(uuid="a628ac08-7a71-4646-9258-8fcd4be6c586")
def test_iperf_single_ndp_aware_only_ib(self):
"""Measure throughput using iperf on a single NDP, with Aware enabled and
no infrastructure connection. Use in-band discovery."""
@@ -226,6 +227,7 @@
asserts.explicit_pass(
"test_iperf_single_ndp_aware_only_ib passes", extras=results)
+ @test_tracker_info(uuid="26d88e96-2318-4cff-85bb-7961a0b97802")
def test_iperf_single_ndp_aware_only_oob(self):
"""Measure throughput using iperf on a single NDP, with Aware enabled and
no infrastructure connection. Use out-of-band discovery."""
@@ -398,6 +400,7 @@
self.log.info("iPerf3: Sent = %d bps Received = %d bps",
results[i]["tx_rate"], results[i]["rx_rate"])
+ @test_tracker_info(uuid="b66faaa5-f1cc-44dd-b22a-610f4fcaf2ca")
def test_iperf_max_ndi_aware_only_passphrases(self):
"""Test throughput for multiple NDIs configured with different passphrases.
"""
@@ -434,6 +437,7 @@
latency_result = autils.run_ping6(p_dut, s_ipv6)
self.log.info("The latency results are %s", latency_result)
+ @test_tracker_info(uuid="8a1160fa-8ccf-4015-94dd-a0541793077a")
def test_traffic_latency_single_ndp_ib_aware_only_open(self):
"""Test IPv6 traffic latency performance on NDP with security config is open.
"""