commit a3db60b7b1ac73ffbafb02a70ace07bcfef8996c
parent 4b38c92f2697979b86e0d81e80d306738e48d77e
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 25 Aug 2021 10:12:58 -0700
auto-t: add force SAE group 19 autotest
The vendor element was taken directly from observed logs of an AP
behaving this way. This causes IWD to force group 19.
Diffstat:
1 file changed, 25 insertions(+), 9 deletions(-)
diff --git a/autotests/testSAE/connection_test.py b/autotests/testSAE/connection_test.py
@@ -25,7 +25,7 @@ class Test(unittest.TestCase):
wd.wait_for_object_condition(device, 'not obj.scanning')
- device.scan()
+ device.debug_scan([2412])
wd.wait_for_object_condition(device, 'obj.scanning')
wd.wait_for_object_condition(device, 'not obj.scanning')
@@ -57,8 +57,21 @@ class Test(unittest.TestCase):
wd.unregister_psk_agent(psk_agent)
def test_SAE(self):
- self.hostapd.set_value('sae_pwe', '0');
- self.hostapd.set_value('sae_groups', '19');
+ self.hostapd.set_value('sae_pwe', '0')
+ self.hostapd.set_value('sae_groups', '19')
+ self.hostapd.set_value('vendor_elements', '')
+ self.hostapd.reload()
+ self.hostapd.wait_for_event("AP-ENABLED")
+ wd = IWD(True)
+ self.validate_connection(wd)
+ wd.clear_storage()
+
+ def test_SAE_force_group_19(self):
+ self.hostapd.set_value('sae_pwe', '0')
+ self.hostapd.set_value('sae_groups', '19')
+ # Vendor data from APs which require group 19 be used first
+ # TODO: (for all tests) verify the expected group was used
+ self.hostapd.set_value('vendor_elements', 'dd0cf4f5e8050500000000000000')
self.hostapd.reload()
self.hostapd.wait_for_event("AP-ENABLED")
wd = IWD(True)
@@ -66,8 +79,9 @@ class Test(unittest.TestCase):
wd.clear_storage()
def test_SAE_Group20(self):
- self.hostapd.set_value('sae_pwe', '0');
- self.hostapd.set_value('sae_groups', '20');
+ self.hostapd.set_value('sae_pwe', '0')
+ self.hostapd.set_value('sae_groups', '20')
+ self.hostapd.set_value('vendor_elements', '')
self.hostapd.reload()
self.hostapd.wait_for_event("AP-ENABLED")
wd = IWD(True)
@@ -75,8 +89,9 @@ class Test(unittest.TestCase):
wd.clear_storage()
def test_SAE_H2E(self):
- self.hostapd.set_value('sae_pwe', '1');
- self.hostapd.set_value('sae_groups', '19');
+ self.hostapd.set_value('sae_pwe', '1')
+ self.hostapd.set_value('sae_groups', '19')
+ self.hostapd.set_value('vendor_elements', '')
self.hostapd.reload()
self.hostapd.wait_for_event("AP-ENABLED")
wd = IWD(True)
@@ -84,8 +99,9 @@ class Test(unittest.TestCase):
wd.clear_storage()
def test_SAE_H2E_Group20(self):
- self.hostapd.set_value('sae_pwe', '1');
- self.hostapd.set_value('sae_groups', '20');
+ self.hostapd.set_value('sae_pwe', '1')
+ self.hostapd.set_value('sae_groups', '20')
+ self.hostapd.set_value('vendor_elements', '')
self.hostapd.reload()
self.hostapd.wait_for_event("AP-ENABLED")
wd = IWD(True)