From b7b0b4eb02b6b26a4eb87c002697ae45bcfd241c Mon Sep 17 00:00:00 2001 From: James Prestwood Date: Wed, 12 Jan 2022 10:08:45 -0800 Subject: [PATCH] auto-t: improve testDPP reliablity First disconnect wpa_supplicant to make sure it wont miss frames if it decides to connect. Also alter the order of things for the configurator test so autoconnect doesn't start until after hostapd is up (avoids additional scanning and delays) --- autotests/testDPP/connection_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/autotests/testDPP/connection_test.py b/autotests/testDPP/connection_test.py index 3c3705e4..38d44b25 100644 --- a/autotests/testDPP/connection_test.py +++ b/autotests/testDPP/connection_test.py @@ -35,6 +35,7 @@ class Test(unittest.TestCase): self.wd.wait_for_object_condition(self.device, condition) def test_iwd_as_enrollee_scan_after(self): + self.wpas.disconnect() uri = self.device.dpp_start_enrollee() self.wpas.dpp_configurator_create(uri) @@ -66,10 +67,11 @@ class Test(unittest.TestCase): self.wd.wait_for_object_condition(self.device, condition) def test_iwd_as_configurator(self): - self.device.autoconnect = True - IWD.copy_to_storage('ssidCCMP.psk') - self.hapd.reload() + self.hapd.wait_for_event('AP-ENABLED') + + IWD.copy_to_storage('ssidCCMP.psk') + self.device.autoconnect = True condition = 'obj.state == DeviceState.connected' self.wd.wait_for_object_condition(self.device, condition)