From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 2/2] auto-t: make testSAQuery more reliable
Date: Tue, 14 Jul 2020 11:49:08 -0700 [thread overview]
Message-ID: <20200714184908.2776-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20200714184908.2776-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1322 bytes --]
First, looking for DeviceState.connected gives a much better indication
if we are actually connected vs the connected property on the network
object. Second, its good practice to also check that hostapd sees that
the station is connected.
---
autotests/testSAQuery/connection_test.py | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/autotests/testSAQuery/connection_test.py b/autotests/testSAQuery/connection_test.py
index 13c45ee9..de0fe2cd 100644
--- a/autotests/testSAQuery/connection_test.py
+++ b/autotests/testSAQuery/connection_test.py
@@ -13,7 +13,7 @@ from hostapd import HostapdCLI, hostapd_map
class Test(unittest.TestCase):
def test_connection_success(self):
- hostapd = HostapdCLI(list(hostapd_map.values())[0])
+ hostapd = HostapdCLI(config='ssidCCMP.conf')
wd = IWD()
@@ -53,8 +53,10 @@ class Test(unittest.TestCase):
# IWD should now try and re-connect to the AP
- condition = 'obj.connected'
- wd.wait_for_object_condition(ordered_network.network_object, condition)
+ condition = 'obj.state == DeviceState.connected'
+ wd.wait_for_object_condition(device, condition)
+
+ hostapd.wait_for_event('AP-STA-CONNECTED')
device.disconnect()
--
2.21.1
next prev parent reply other threads:[~2020-07-14 18:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-14 18:49 [PATCH 1/2] auto-t: fix hostapd.ungraceful_restart James Prestwood
2020-07-14 18:49 ` James Prestwood [this message]
2020-07-15 19:44 ` Denis Kenzior
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=20200714184908.2776-2-prestwoj@gmail.com \
--to=prestwoj@gmail.com \
--cc=iwd@lists.01.org \
/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