3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

auto-t: update testPSK-roam with changed FT behavior

This commit is contained in:
James Prestwood 2022-12-14 13:26:58 -08:00 committed by Denis Kenzior
parent a1d30fe1cb
commit 428f1914ef

View File

@ -65,7 +65,7 @@ class Test(unittest.TestCase):
device.roam(self.bss_hostapd[1].bssid)
# Roam should fail...
device.wait_for_event('ft-over-air-roam-failed')
device.wait_for_event('ft-roam-failed')
# ... but IWD should remain connected
self.assertTrue(device.state == DeviceState.connected)
@ -80,42 +80,6 @@ class Test(unittest.TestCase):
condition = 'obj.state == DeviceState.disconnected'
wd.wait_for_object_condition(device, condition)
# Network sets over-DS bit, but fails to authenticate. IWD should still be
# able to roam using FT-over-Air.
def test_fallback_to_over_air(self):
self.bss_hostapd[0].set_value('wpa_key_mgmt', 'FT-PSK')
self.bss_hostapd[0].set_value('ft_over_ds', '1')
self.bss_hostapd[0].reload()
self.bss_hostapd[0].wait_for_event("AP-ENABLED")
self.bss_hostapd[1].set_value('wpa_key_mgmt', 'FT-PSK')
self.bss_hostapd[1].set_value('ft_over_ds', '1')
self.bss_hostapd[1].reload()
self.bss_hostapd[1].wait_for_event("AP-ENABLED")
wd = IWD(True)
device = wd.list_devices(1)[0]
# Drop action frames, this will prevent FT-over-DS authentication
self.rule1.enabled = True
self.connect(wd, device, self.bss_hostapd[0])
device.roam(self.bss_hostapd[1].bssid)
self.rule1.enabled = False
# FT-over-DS should fail, and over-Air should take over leading to a
# successful roam
device.wait_for_event('try-ft-over-air')
self.verify_roam(wd, device, self.bss_hostapd[0], self.bss_hostapd[1])
self.bss_hostapd[1].deauthenticate(device.address)
condition = 'obj.state == DeviceState.disconnected'
wd.wait_for_object_condition(device, condition)
def tearDown(self):
os.system('ip link set "' + self.bss_hostapd[0].ifname + '" down')
os.system('ip link set "' + self.bss_hostapd[1].ifname + '" down')