From: Denis Kenzior <denkenz@gmail.com>
To: iwd@lists.01.org
Subject: Re: [PATCH 2/2] auto-t: work around race between ANQP and dbus Connect()
Date: Thu, 28 May 2020 15:53:44 +0000 [thread overview]
Message-ID: <1f365826-2861-8848-b67a-4f25ebc407ab@gmail.com> (raw)
In-Reply-To: <20200527204559.2571-2-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]
Hi James,
On 5/27/20 3:45 PM, James Prestwood wrote:
> 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)
> +
So you know this, but the issue with sleep is that you're completely at
the mercy of the scheduler and the speed of qemu. This might work for
you most of the time, but then it will occasionally fail. Or it might
fail reliably on a slower machine running qemu.
In general I think we need to go in and eliminate all sleeps in the test
scripts. Or at least as many as we can.
> ordered_network = device.get_ordered_network('Hotspot')
>
> self.assertEqual(ordered_network.type, NetworkType.eap)
>
Regards,
-Denis
next prev parent reply other threads:[~2020-05-28 15:53 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 ` [PATCH 2/2] auto-t: work around race between ANQP and dbus Connect() James Prestwood
2020-05-28 15:53 ` Denis Kenzior [this message]
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=1f365826-2861-8848-b67a-4f25ebc407ab@gmail.com \
--to=denkenz@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.