commit 4af66b8cac47cab5e8318ac4b731f216e8c627ff
parent 81e48eaba5010fd7700224ad51fbbecd558c081d
Author: James Prestwood <prestwoj@gmail.com>
Date: Wed, 26 Oct 2022 14:53:50 -0700
auto-t: test AP mode using TKIP
This limits all supported ciphers to TKIP and verifies the AP
starts and can authenticate clients.
Diffstat:
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/autotests/testAP-no-support/connection_test.py b/autotests/testAP-no-support/connection_test.py
@@ -5,17 +5,42 @@ import sys
sys.path.append('../util')
import iwd
-from iwd import IWD
+from iwd import IWD, NetworkType, PSKAgent
class Test(unittest.TestCase):
- def test_connection_success(self):
- wd = IWD()
+ def test_no_ap_mode(self):
+ wd = IWD(True)
dev = wd.list_devices(1)[0]
with self.assertRaises(iwd.NotSupportedEx):
dev.start_ap('TestAP2', 'Password2')
+ def test_only_tkip_support(self):
+ wd = IWD(True)
+
+ devices = wd.list_devices(2)
+
+ dev_sta = devices[0]
+ dev_ap = devices[1]
+
+ dev_ap.start_ap('TestAP2', 'Password2')
+
+ ordered_network = dev_sta.get_ordered_network('TestAP2')
+
+ if ordered_network.type != NetworkType.psk:
+ raise Exception("Network type mismatch")
+
+ psk_agent = PSKAgent('Password2')
+ wd.register_psk_agent(psk_agent)
+
+ ordered_network.network_object.connect()
+
+ condition = 'obj.state == DeviceState.connected'
+ wd.wait_for_object_condition(dev_sta, condition)
+
+ wd.unregister_psk_agent(psk_agent)
+
@classmethod
def setUpClass(cls):
pass
diff --git a/autotests/testAP-no-support/hw.conf b/autotests/testAP-no-support/hw.conf
@@ -1,6 +1,9 @@
[SETUP]
-num_radios=1
-radio_confs=rad0
+num_radios=2
+start_iwd=0
[rad0]
iftype_disable=ap
+
+[rad1]
+cipher_disable=ccmp,bip_cmac,gcmp,gcmp_256,ccmp_256,bip_gmac.bip_gmac_256,bip_cmac_256