All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 2/2] auto-t: work around race between ANQP and dbus Connect()
Date: Wed, 27 May 2020 13:45:59 -0700	[thread overview]
Message-ID: <20200527204559.2571-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20200527204559.2571-1-prestwoj@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1302 bytes --]

ANQP is performed as the scan results come in but scanning is still
signaled as done regardless of if ANQP has finished. Autoconnect
will wait for ANQP to complete, but as far as an explicit DBus call
we are just assuming ANQP finished. For now, we can work around this
in the autotest and wait a bit before issuing Connect(). The real
fix would either be to delay setting scanning as done, or have
network/station wait for ANQP to complete before checking the
network settings.
---
 autotests/testHotspot/hotspot_test.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/autotests/testHotspot/hotspot_test.py b/autotests/testHotspot/hotspot_test.py
index 0f18fae1..389038fd 100644
--- a/autotests/testHotspot/hotspot_test.py
+++ b/autotests/testHotspot/hotspot_test.py
@@ -11,6 +11,7 @@ from iwd import PSKAgent
 from iwd import NetworkType
 from hostapd import HostapdCLI
 import testutil
+from time import sleep
 
 class Test(unittest.TestCase):
 
@@ -33,6 +34,8 @@ class Test(unittest.TestCase):
         condition = 'not obj.scanning'
         wd.wait_for_object_condition(device, condition)
 
+        sleep(1)
+
         ordered_network = device.get_ordered_network('Hotspot')
 
         self.assertEqual(ordered_network.type, NetworkType.eap)
-- 
2.21.1

  reply	other threads:[~2020-05-27 20:45 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-27 20:45 [PATCH 1/2] anqp: refactor to use frame-xchg James Prestwood
2020-05-27 20:45 ` James Prestwood [this message]
2020-05-28 15:53   ` [PATCH 2/2] auto-t: work around race between ANQP and dbus Connect() Denis Kenzior
2020-05-28 15:42 ` [PATCH 1/2] anqp: refactor to use frame-xchg Denis Kenzior
2020-05-28 17:01   ` James Prestwood
2020-05-28 17:40     ` Denis Kenzior
2020-05-29 16:19       ` James Prestwood
2020-05-29 16:13         ` 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=20200527204559.2571-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.