mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 13:02:44 +01:00
auto-t: test AP fails to start with unsupported ciphers
If the profile lists unsupported ciphers it should fail to start with NotSupported.
This commit is contained in:
parent
ba067fcf94
commit
13b7aa9715
3
autotests/testAP-no-support/TestAP2.ap
Normal file
3
autotests/testAP-no-support/TestAP2.ap
Normal file
@ -0,0 +1,3 @@
|
||||
[Security]
|
||||
Passphrase=secret123
|
||||
PairwiseCiphers=CCMP
|
@ -26,6 +26,9 @@ class Test(unittest.TestCase):
|
||||
|
||||
dev_ap.start_ap('TestAP2', 'Password2')
|
||||
|
||||
self.assertTrue(dev_ap.group_cipher == 'TKIP')
|
||||
self.assertTrue(dev_ap.pairwise_ciphers == 'TKIP')
|
||||
|
||||
ordered_network = dev_sta.get_ordered_network('TestAP2')
|
||||
|
||||
if ordered_network.type != NetworkType.psk:
|
||||
@ -41,9 +44,19 @@ class Test(unittest.TestCase):
|
||||
|
||||
wd.unregister_psk_agent(psk_agent)
|
||||
|
||||
def test_no_ccmp_support(self):
|
||||
wd = IWD(True)
|
||||
|
||||
dev = wd.list_devices(2)[1]
|
||||
|
||||
# Should fail to start since the radio doesn't support CCMP but the
|
||||
# profile only lists CCMP as allowed.
|
||||
with self.assertRaises(iwd.NotSupportedEx):
|
||||
dev.start_ap('TestAP2')
|
||||
|
||||
@classmethod
|
||||
def setUpClass(cls):
|
||||
pass
|
||||
IWD.copy_to_ap('TestAP2.ap')
|
||||
|
||||
@classmethod
|
||||
def tearDownClass(cls):
|
||||
|
Loading…
Reference in New Issue
Block a user