mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 09:39:25 +01:00
auto-t: fix several DPP tests after station state changes
After the station state changes in DPP setting autoconnect=True was causing DPP to stop prior to being able to scan for the network. Instead we can start autoconnect earlier so we aren't toggling the property while DPP is running.
This commit is contained in:
parent
a63fd6abb9
commit
f9a55e3728
@ -38,20 +38,18 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
def test_iwd_as_enrollee_scan_after(self):
|
def test_iwd_as_enrollee_scan_after(self):
|
||||||
self.wpas.disconnect()
|
self.wpas.disconnect()
|
||||||
|
self.device.autoconnect = True
|
||||||
uri = self.device.dpp_start_enrollee()
|
uri = self.device.dpp_start_enrollee()
|
||||||
|
|
||||||
self.wpas.dpp_configurator_create(uri)
|
self.wpas.dpp_configurator_create(uri)
|
||||||
self.wpas.dpp_configurator_start('ssidCCMP', 'secret123')
|
self.wpas.dpp_configurator_start('ssidCCMP', 'secret123')
|
||||||
|
|
||||||
self.hapd.reload()
|
|
||||||
|
|
||||||
with self.assertRaises(Exception):
|
with self.assertRaises(Exception):
|
||||||
self.device.get_ordered_network('ssidCCMP', scan_if_needed=False)
|
self.device.get_ordered_network('ssidCCMP', scan_if_needed=False)
|
||||||
|
|
||||||
|
self.hapd.reload()
|
||||||
self.hapd.wait_for_event('AP-ENABLED')
|
self.hapd.wait_for_event('AP-ENABLED')
|
||||||
|
|
||||||
self.device.autoconnect = True
|
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device, condition)
|
self.wd.wait_for_object_condition(self.device, condition)
|
||||||
|
|
||||||
|
@ -160,10 +160,8 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
def test_pkex_iwd_to_iwd(self):
|
def test_pkex_iwd_to_iwd(self):
|
||||||
self.start_iwd_pkex_configurator(self.device[0])
|
self.start_iwd_pkex_configurator(self.device[0])
|
||||||
|
|
||||||
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
|
||||||
|
|
||||||
self.device[1].autoconnect = True
|
self.device[1].autoconnect = True
|
||||||
|
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device[1], condition)
|
self.wd.wait_for_object_condition(self.device[1], condition)
|
||||||
@ -176,10 +174,8 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
def test_pkex_configurator_with_agent(self):
|
def test_pkex_configurator_with_agent(self):
|
||||||
self.start_iwd_pkex_configurator(self.device[0], agent=True)
|
self.start_iwd_pkex_configurator(self.device[0], agent=True)
|
||||||
|
|
||||||
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
|
||||||
|
|
||||||
self.device[1].autoconnect = True
|
self.device[1].autoconnect = True
|
||||||
|
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device[1], condition)
|
self.wd.wait_for_object_condition(self.device[1], condition)
|
||||||
@ -198,8 +194,8 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
self.start_iwd_pkex_configurator(self.device[0])
|
self.start_iwd_pkex_configurator(self.device[0])
|
||||||
|
|
||||||
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
|
||||||
self.device[1].autoconnect = False
|
self.device[1].autoconnect = False
|
||||||
|
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device[1], condition)
|
self.wd.wait_for_object_condition(self.device[1], condition)
|
||||||
@ -240,8 +236,9 @@ class Test(unittest.TestCase):
|
|||||||
|
|
||||||
self.start_iwd_pkex_configurator(self.device[0], profile='ssidHidden.psk')
|
self.start_iwd_pkex_configurator(self.device[0], profile='ssidHidden.psk')
|
||||||
|
|
||||||
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
|
||||||
self.device[1].autoconnect = False
|
self.device[1].autoconnect = False
|
||||||
|
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
||||||
|
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device[1], condition)
|
self.wd.wait_for_object_condition(self.device[1], condition)
|
||||||
@ -257,8 +254,8 @@ class Test(unittest.TestCase):
|
|||||||
self.hapd_hidden.wait_for_event('AP-ENABLED')
|
self.hapd_hidden.wait_for_event('AP-ENABLED')
|
||||||
self.start_iwd_pkex_configurator(self.device[0], profile='ssidHidden.psk')
|
self.start_iwd_pkex_configurator(self.device[0], profile='ssidHidden.psk')
|
||||||
|
|
||||||
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
|
||||||
self.device[1].autoconnect = False
|
self.device[1].autoconnect = False
|
||||||
|
self.device[1].dpp_pkex_enroll('secret123', identifier="test")
|
||||||
|
|
||||||
condition = 'obj.state == DeviceState.connected'
|
condition = 'obj.state == DeviceState.connected'
|
||||||
self.wd.wait_for_object_condition(self.device[1], condition)
|
self.wd.wait_for_object_condition(self.device[1], condition)
|
||||||
|
Loading…
Reference in New Issue
Block a user