From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH v2 5/5] auto-t: fix several DPP tests after station state changes
Date: Wed, 24 Jul 2024 08:46:41 -0700 [thread overview]
Message-ID: <20240724154641.1461593-5-prestwoj@gmail.com> (raw)
In-Reply-To: <20240724154641.1461593-1-prestwoj@gmail.com>
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.
---
autotests/testDPP/connection_test.py | 6 ++----
autotests/testDPP/pkex_test.py | 15 ++++++---------
2 files changed, 8 insertions(+), 13 deletions(-)
diff --git a/autotests/testDPP/connection_test.py b/autotests/testDPP/connection_test.py
index f72a412d..e4f07af7 100644
--- a/autotests/testDPP/connection_test.py
+++ b/autotests/testDPP/connection_test.py
@@ -38,20 +38,18 @@ class Test(unittest.TestCase):
def test_iwd_as_enrollee_scan_after(self):
self.wpas.disconnect()
+ self.device.autoconnect = True
uri = self.device.dpp_start_enrollee()
self.wpas.dpp_configurator_create(uri)
self.wpas.dpp_configurator_start('ssidCCMP', 'secret123')
- self.hapd.reload()
-
with self.assertRaises(Exception):
self.device.get_ordered_network('ssidCCMP', scan_if_needed=False)
+ self.hapd.reload()
self.hapd.wait_for_event('AP-ENABLED')
- self.device.autoconnect = True
-
condition = 'obj.state == DeviceState.connected'
self.wd.wait_for_object_condition(self.device, condition)
diff --git a/autotests/testDPP/pkex_test.py b/autotests/testDPP/pkex_test.py
index 3d3ea6d1..a651c6f6 100644
--- a/autotests/testDPP/pkex_test.py
+++ b/autotests/testDPP/pkex_test.py
@@ -160,10 +160,8 @@ class Test(unittest.TestCase):
def test_pkex_iwd_to_iwd(self):
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].dpp_pkex_enroll('secret123', identifier="test")
condition = 'obj.state == DeviceState.connected'
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):
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].dpp_pkex_enroll('secret123', identifier="test")
condition = 'obj.state == DeviceState.connected'
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.device[1].dpp_pkex_enroll('secret123', identifier="test")
self.device[1].autoconnect = False
+ self.device[1].dpp_pkex_enroll('secret123', identifier="test")
condition = 'obj.state == DeviceState.connected'
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.device[1].dpp_pkex_enroll('secret123', identifier="test")
self.device[1].autoconnect = False
+ self.device[1].dpp_pkex_enroll('secret123', identifier="test")
+
condition = 'obj.state == DeviceState.connected'
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.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].dpp_pkex_enroll('secret123', identifier="test")
condition = 'obj.state == DeviceState.connected'
self.wd.wait_for_object_condition(self.device[1], condition)
--
2.34.1
next prev parent reply other threads:[~2024-07-24 15:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-24 15:46 [PATCH v2 1/5] dpp: factor out PKEX/DPP start prep into function James Prestwood
2024-07-24 15:46 ` [PATCH v2 2/5] station: add station_get_autoconnect James Prestwood
2024-07-24 15:46 ` [PATCH v2 3/5] dpp: explicitly disconnect station if enrollee is started James Prestwood
2024-07-24 15:46 ` [PATCH v2 4/5] auto-t: add DPP tests for state change checks James Prestwood
2024-07-24 15:46 ` James Prestwood [this message]
2024-07-24 20:27 ` [PATCH v2 1/5] dpp: factor out PKEX/DPP start prep into function Denis Kenzior
-- strict thread matches above, loose matches on Subject: below --
2024-07-22 18:29 James Prestwood
2024-07-22 18:29 ` [PATCH v2 5/5] auto-t: fix several DPP tests after station state changes James Prestwood
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240724154641.1461593-5-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox