From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH 10/16] auto-t: fix hidden network test
Date: Thu, 27 Aug 2020 10:32:23 -0700 [thread overview]
Message-ID: <20200827173229.26466-10-prestwoj@gmail.com> (raw)
In-Reply-To: <20200827173229.26466-1-prestwoj@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]
This test was never 100% reliable, and after the test-runner re-write
it became extremely unreliable. The issue came down to the very common
block of code thats present in many tests where we wait for obj.scanning
then not obj.scanning. This is fine when a dbus scan() is explicitly
done before, otherwise it could lead to problems. Without a dbus scan
explicitly called we are assuming a periodic scan will happen. If it
already happen the initial wait for obj.scanning will never return and
time out.
This probably needs to be changed in several tests, but for this specific
case we can remove the waits completely. Since
check_autoconnect_hidden_network has a 30 second wait on
DeviceState.connected this will ultimately time out if anything goes
wrong. There isn't any great reason to wait for scanning (for this test
specifically).
A minor style change was also made when initializing IWD. The values
passed in this test are now the default, so no arguments need to be
passed.
---
autotests/testHiddenNetworks/validation.py | 8 +-------
1 file changed, 1 insertion(+), 7 deletions(-)
diff --git a/autotests/testHiddenNetworks/validation.py b/autotests/testHiddenNetworks/validation.py
index 9c433623..991a5b32 100644
--- a/autotests/testHiddenNetworks/validation.py
+++ b/autotests/testHiddenNetworks/validation.py
@@ -50,11 +50,6 @@ class TestConnectAutoConnect(unittest.TestCase):
device = devices[0]
if autoconnect:
- condition = 'obj.scanning'
- wd.wait_for_object_condition(device, condition)
- condition = 'not obj.scanning'
- wd.wait_for_object_condition(device, condition)
-
self.check_autoconnect_hidden_network(wd, device, ssid, throws)
else:
if wait_periodic_scan:
@@ -71,7 +66,6 @@ class TestConnectAutoConnect(unittest.TestCase):
def validate(self, ssid, autoconnect, throws = None, use_agent = False,
wait_periodic_scan = False):
- wd = IWD(True, '/tmp')
-
+ wd = IWD()
self.validate_connection(wd, ssid, autoconnect, throws, use_agent,
wait_periodic_scan)
--
2.21.1
next prev parent reply other threads:[~2020-08-27 17:32 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-27 17:32 [PATCH 01/16] hwsim: return radio ID on create James Prestwood
2020-08-27 17:32 ` [PATCH 02/16] auto-t: prepare autotests for test-runner re-write James Prestwood
2020-08-27 17:32 ` [PATCH 03/16] auto-t: introduce pure python " James Prestwood
2020-08-27 17:32 ` [PATCH 04/16] auto-t: hostapd.py: update to work with test-runner rewrite James Prestwood
2020-08-27 17:32 ` [PATCH 05/16] auto-t: testutil.py: " James Prestwood
2020-08-27 17:32 ` [PATCH 06/16] auto-t: ofono.py: fix timeout cleanup and wait for service James Prestwood
2020-08-27 17:32 ` [PATCH 07/16] auto-t: iwd.py: update to work with test-runner rewrite James Prestwood
2020-08-27 17:32 ` [PATCH 08/16] auto-t: iwd.py: fix multiple timeout cleanup issues James Prestwood
2020-08-27 17:32 ` [PATCH 09/16] auto-t: remove wiphy.py James Prestwood
2020-08-27 17:32 ` James Prestwood [this message]
2020-08-27 17:32 ` [PATCH 11/16] auto-t: fix testSAE autoconnect_test.py James Prestwood
2020-08-27 17:32 ` [PATCH 12/16] auto-t: skip ofono tests if ofonod isn't running James Prestwood
2020-08-27 17:32 ` [PATCH 13/16] auto-t: replace hard-coded interfaces James Prestwood
2020-08-27 17:32 ` [PATCH 14/16] auto-t: remove device.wait_for_connected James Prestwood
2020-08-27 17:32 ` [PATCH 15/16] tools: post test-runner rewrite cleanup James Prestwood
2020-08-27 17:32 ` [PATCH 16/16] doc: update test runner docs James Prestwood
2020-08-27 20:08 ` [PATCH 01/16] hwsim: return radio ID on create Denis Kenzior
2020-08-27 20:21 ` 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=20200827173229.26466-10-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