All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.01.org
Subject: [PATCH v5 16/26] auto-t: Increase all test timeouts
Date: Thu, 10 Sep 2020 16:12:37 -0700	[thread overview]
Message-ID: <20200910231248.4995-16-prestwoj@gmail.com> (raw)
In-Reply-To: <20200910231248.4995-1-prestwoj@gmail.com>

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

Slower systems may not be able to make some timeouts that tests
mandated. All timeouts were increased significantly to allow tests
to pass on slow systems.
---
 autotests/testAPRoam/connection_test.py           | 4 ++--
 autotests/testBSSBlacklist/connection_test.py     | 4 ++--
 autotests/testFT-8021x-roam/connection_test.py    | 8 ++++----
 autotests/testFT-FILS-SHA256/connection_test.py   | 4 ++--
 autotests/testFT-FILS-SHA384/connection_test.py   | 4 ++--
 autotests/testFT-PSK-over-DS/connection_test.py   | 4 ++--
 autotests/testFT-PSK-roam/connection_test.py      | 4 ++--
 autotests/testFT-SAE-roam/connection_test.py      | 8 ++++----
 autotests/testHiddenNetworks/validation.py        | 6 +++---
 autotests/testKnownNetworks/known_network_test.py | 4 ++--
 autotests/testPreauth-roam/connection_test.py     | 4 ++--
 autotests/testRSSIAgent/connection_test.py        | 2 +-
 autotests/testSAE/autoconnect_test.py             | 2 +-
 autotests/testScan/requested_scan_test.py         | 4 ++--
 autotests/util/iwd.py                             | 8 ++++----
 autotests/util/testutil.py                        | 2 +-
 tools/test-runner                                 | 2 +-
 17 files changed, 37 insertions(+), 37 deletions(-)

diff --git a/autotests/testAPRoam/connection_test.py b/autotests/testAPRoam/connection_test.py
index c8c2ca9f..308bbc28 100644
--- a/autotests/testAPRoam/connection_test.py
+++ b/autotests/testAPRoam/connection_test.py
@@ -60,10 +60,10 @@ class Test(unittest.TestCase):
                  (bss_radio[2].addresses[0], '8f0000005103060603000000')])
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 15)
+        wd.wait_for_object_condition(device, condition)
 
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(bss_hostapd[1].list_sta())
diff --git a/autotests/testBSSBlacklist/connection_test.py b/autotests/testBSSBlacklist/connection_test.py
index 825439d4..0a51b8cb 100644
--- a/autotests/testBSSBlacklist/connection_test.py
+++ b/autotests/testBSSBlacklist/connection_test.py
@@ -99,10 +99,10 @@ class Test(unittest.TestCase):
         # Now we wait... AutoConnect should take over
 
         condition = 'obj.state == DeviceState.connecting'
-        wd.wait_for_object_condition(device, condition, 15)
+        wd.wait_for_object_condition(device, condition)
 
         condition = 'obj.state == DeviceState.connected'
-        wd.wait_for_object_condition(device, condition, 15)
+        wd.wait_for_object_condition(device, condition)
 
         # Same as before, make sure we didn't connect to the blacklisted AP.
         self.assertNotIn(device.address, bss_hostapd[0].list_sta())
diff --git a/autotests/testFT-8021x-roam/connection_test.py b/autotests/testFT-8021x-roam/connection_test.py
index 65c73492..084bac64 100644
--- a/autotests/testFT-8021x-roam/connection_test.py
+++ b/autotests/testFT-8021x-roam/connection_test.py
@@ -75,12 +75,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
@@ -151,12 +151,12 @@ class Test(unittest.TestCase):
         rule0.drop = False
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 20)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
diff --git a/autotests/testFT-FILS-SHA256/connection_test.py b/autotests/testFT-FILS-SHA256/connection_test.py
index 16f46210..d87afce0 100644
--- a/autotests/testFT-FILS-SHA256/connection_test.py
+++ b/autotests/testFT-FILS-SHA256/connection_test.py
@@ -105,12 +105,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
diff --git a/autotests/testFT-FILS-SHA384/connection_test.py b/autotests/testFT-FILS-SHA384/connection_test.py
index 16f46210..d87afce0 100644
--- a/autotests/testFT-FILS-SHA384/connection_test.py
+++ b/autotests/testFT-FILS-SHA384/connection_test.py
@@ -105,12 +105,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
diff --git a/autotests/testFT-PSK-over-DS/connection_test.py b/autotests/testFT-PSK-over-DS/connection_test.py
index 2cfdf245..188eca63 100644
--- a/autotests/testFT-PSK-over-DS/connection_test.py
+++ b/autotests/testFT-PSK-over-DS/connection_test.py
@@ -81,12 +81,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
diff --git a/autotests/testFT-PSK-roam/connection_test.py b/autotests/testFT-PSK-roam/connection_test.py
index f40fdf58..37dd80d0 100644
--- a/autotests/testFT-PSK-roam/connection_test.py
+++ b/autotests/testFT-PSK-roam/connection_test.py
@@ -83,12 +83,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[1].list_sta())
diff --git a/autotests/testFT-SAE-roam/connection_test.py b/autotests/testFT-SAE-roam/connection_test.py
index 3e209560..dcea148c 100644
--- a/autotests/testFT-SAE-roam/connection_test.py
+++ b/autotests/testFT-SAE-roam/connection_test.py
@@ -86,12 +86,12 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 10)
+        wd.wait_for_object_condition(device, condition)
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         rule1.signal = -2000
 
@@ -112,10 +112,10 @@ class Test(unittest.TestCase):
         rule2.signal = -1000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 15)
+        wd.wait_for_object_condition(device, condition)
 
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(self.bss_hostapd[2].list_sta())
diff --git a/autotests/testHiddenNetworks/validation.py b/autotests/testHiddenNetworks/validation.py
index 780af8b3..7ff7075a 100644
--- a/autotests/testHiddenNetworks/validation.py
+++ b/autotests/testHiddenNetworks/validation.py
@@ -20,12 +20,12 @@ class TestConnectAutoConnect(unittest.TestCase):
             device.connect_hidden_network(ssid)
 
         condition = 'obj.state == DeviceState.connected'
-        wd.wait_for_object_condition(device, condition, 30)
+        wd.wait_for_object_condition(device, condition)
 
     def check_autoconnect_hidden_network(self, wd, device, ssid, throws):
         if throws is None:
             condition = 'obj.state == DeviceState.connected'
-            wd.wait_for_object_condition(device, condition, 30)
+            wd.wait_for_object_condition(device, condition)
 
             condition = 'obj.connected_network is not None'
             wd.wait_for_object_condition(device, condition)
@@ -37,7 +37,7 @@ class TestConnectAutoConnect(unittest.TestCase):
             device.disconnect()
 
         condition = 'obj.state == DeviceState.disconnected'
-        wd.wait_for_object_condition(device, condition, 30)
+        wd.wait_for_object_condition(device, condition)
 
     def validate_connection(self, wd, ssid, autoconnect, throws, use_agent,
                                                             wait_periodic_scan):
diff --git a/autotests/testKnownNetworks/known_network_test.py b/autotests/testKnownNetworks/known_network_test.py
index b2b3d105..a94a2151 100644
--- a/autotests/testKnownNetworks/known_network_test.py
+++ b/autotests/testKnownNetworks/known_network_test.py
@@ -56,7 +56,7 @@ class Test(unittest.TestCase):
 
         IWD.copy_to_storage('known_networks/ssidPSK.psk')
         condition = 'len(obj.list_known_networks()) == 5'
-        wd.wait_for_object_condition(wd, condition, 1)
+        wd.wait_for_object_condition(wd, condition)
 
         expected = ['ssidNew', 'ssidOpen', 'ssidPSK', 'ssidEAP-TLS',
                     'Hotspot Network']
@@ -65,7 +65,7 @@ class Test(unittest.TestCase):
 
         IWD.remove_from_storage('ssidPSK.psk')
         condition = 'len(obj.list_known_networks()) == 4'
-        wd.wait_for_object_condition(wd, condition, 1)
+        wd.wait_for_object_condition(wd, condition)
 
         for net in known_networks:
             net.forget()
diff --git a/autotests/testPreauth-roam/connection_test.py b/autotests/testPreauth-roam/connection_test.py
index ed043c3f..839e04b0 100644
--- a/autotests/testPreauth-roam/connection_test.py
+++ b/autotests/testPreauth-roam/connection_test.py
@@ -91,14 +91,14 @@ class Test(unittest.TestCase):
         rule0.signal = -8000
 
         condition = 'obj.state == DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 15)
+        wd.wait_for_object_condition(device, condition)
 
         # TODO: verify that the PMK from preauthentication was used
 
         # Check that iwd is on BSS 1 once out of roaming state and doesn't
         # go through 'disconnected', 'autoconnect', 'connecting' in between
         condition = 'obj.state != DeviceState.roaming'
-        wd.wait_for_object_condition(device, condition, 5)
+        wd.wait_for_object_condition(device, condition)
 
         self.assertEqual(device.state, iwd.DeviceState.connected)
         self.assertTrue(bss_hostapd[1].list_sta())
diff --git a/autotests/testRSSIAgent/connection_test.py b/autotests/testRSSIAgent/connection_test.py
index f8140850..ab0bc3a5 100644
--- a/autotests/testRSSIAgent/connection_test.py
+++ b/autotests/testRSSIAgent/connection_test.py
@@ -71,7 +71,7 @@ class Test(unittest.TestCase):
                 rule.signal = centre
                 agent.level = -1
                 condition = 'obj.level == ' + str(level)
-                wd.wait_for_object_condition(agent, condition, 3)
+                wd.wait_for_object_condition(agent, condition)
 
                 self.assertTrue(agent.calls > 0)
                 self.assertEqual(agent.device_path, device.device_path)
diff --git a/autotests/testSAE/autoconnect_test.py b/autotests/testSAE/autoconnect_test.py
index 0613d91e..48b4b6cd 100644
--- a/autotests/testSAE/autoconnect_test.py
+++ b/autotests/testSAE/autoconnect_test.py
@@ -24,7 +24,7 @@ class Test(unittest.TestCase):
         devices[3].disconnect()
 
         condition = 'obj.state == DeviceState.connected'
-        wd.wait_for_object_condition(device, condition, 30)
+        wd.wait_for_object_condition(device, condition)
 
         condition = 'obj.connected_network is not None'
         wd.wait_for_object_condition(device, condition)
diff --git a/autotests/testScan/requested_scan_test.py b/autotests/testScan/requested_scan_test.py
index 11282ce1..3858b4f5 100644
--- a/autotests/testScan/requested_scan_test.py
+++ b/autotests/testScan/requested_scan_test.py
@@ -36,9 +36,9 @@ class Test(unittest.TestCase):
         device = devices[0]
 
         condition = 'obj.scanning'
-        wd.wait_for_object_condition(device, condition, 20)
+        wd.wait_for_object_condition(device, condition)
         condition = 'not obj.scanning'
-        wd.wait_for_object_condition(device, condition, 20)
+        wd.wait_for_object_condition(device, condition)
 
         device.scan()
 
diff --git a/autotests/util/iwd.py b/autotests/util/iwd.py
index ec5e662f..e74a6faf 100755
--- a/autotests/util/iwd.py
+++ b/autotests/util/iwd.py
@@ -867,8 +867,8 @@ class IWD(AsyncOpAbstract):
 
         tries = 0
         while not self._bus.name_has_owner(IWD_SERVICE):
-            if ctx.args.gdb == 'None':
-                if tries > 100:
+            if not ctx.args.gdb:
+                if tries > 200:
                     if start_iwd_daemon:
                         ctx.stop_process(self._iwd_proc)
                         self._iwd_proc = None
@@ -913,7 +913,7 @@ class IWD(AsyncOpAbstract):
                                IWD_AGENT_MANAGER_INTERFACE)
         return self._agent_manager_if
 
-    def wait_for_object_condition(self, obj, condition_str, max_wait = 15):
+    def wait_for_object_condition(self, obj, condition_str, max_wait = 50):
         self._wait_timed_out = False
         def wait_timeout_cb():
             self._wait_timed_out = True
@@ -982,7 +982,7 @@ class IWD(AsyncOpAbstract):
     def remove_from_storage(file_name):
         os.system('rm -rf ' + IWD_STORAGE_DIR + '/\'' + file_name + '\'')
 
-    def list_devices(self, wait_to_appear = 0, max_wait = 15):
+    def list_devices(self, wait_to_appear = 0, max_wait = 50):
         if not wait_to_appear:
             return list(self._devices.values())
 
diff --git a/autotests/util/testutil.py b/autotests/util/testutil.py
index 0a94e23a..f9cfbf29 100644
--- a/autotests/util/testutil.py
+++ b/autotests/util/testutil.py
@@ -82,7 +82,7 @@ def test_connected(if0=None, if1=None, group=True):
             rec.append(False)
 
         while not all(rec):
-            r, w, x = select.select([sock0, sock1], [], [], 1.0)
+            r, w, x = select.select([sock0, sock1], [], [], 10)
             if not r:
                 raise Exception('timeout waiting for packets: ' + repr(rec))
 
diff --git a/tools/test-runner b/tools/test-runner
index d09f08d2..d7f831ac 100755
--- a/tools/test-runner
+++ b/tools/test-runner
@@ -43,7 +43,7 @@ config = None
 intf_id = 0
 rad_id = 0
 
-TEST_MAX_TIMEOUT = 45
+TEST_MAX_TIMEOUT = 120
 
 dbus.mainloop.glib.DBusGMainLoop(set_as_default=True)
 
-- 
2.26.2

  parent reply	other threads:[~2020-09-10 23:12 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-10 23:12 [PATCH v5 01/26] auto-t: prepare autotests for test-runner re-write James Prestwood
2020-09-10 23:12 ` [PATCH v5 02/26] auto-t: introduce pure python " James Prestwood
2020-09-10 23:12 ` [PATCH v5 03/26] auto-t: hostapd.py: update to work with test-runner rewrite James Prestwood
2020-09-10 23:12 ` [PATCH v5 04/26] auto-t: testutil.py: " James Prestwood
2020-09-10 23:12 ` [PATCH v5 05/26] auto-t: ofono.py: fix timeout cleanup and wait for service James Prestwood
2020-09-10 23:12 ` [PATCH v5 06/26] auto-t: iwd.py: update to work with test-runner rewrite James Prestwood
2020-09-10 23:12 ` [PATCH v5 07/26] auto-t: remove wiphy.py James Prestwood
2020-09-10 23:12 ` [PATCH v5 08/26] auto-t: fix hidden network test James Prestwood
2020-09-10 23:12 ` [PATCH v5 09/26] auto-t: fix testSAE autoconnect_test.py James Prestwood
2020-09-10 23:12 ` [PATCH v5 10/26] auto-t: skip ofono tests if ofonod isn't running James Prestwood
2020-09-10 23:12 ` [PATCH v5 11/26] auto-t: replace hard-coded interfaces James Prestwood
2020-09-10 23:12 ` [PATCH v5 12/26] auto-t: remove device.wait_for_connected James Prestwood
2020-09-10 23:12 ` [PATCH v5 13/26] tools: post test-runner rewrite cleanup James Prestwood
2020-09-10 23:12 ` [PATCH v5 14/26] doc: update test runner docs James Prestwood
2020-09-10 23:12 ` [PATCH v5 15/26] auto-t: hwsim: wait for method return James Prestwood
2020-09-10 23:12 ` James Prestwood [this message]
2020-09-10 23:12 ` [PATCH v5 17/26] auto-t: fix SAE FT test and update James Prestwood
2020-09-10 23:12 ` [PATCH v5 18/26] auto-t: update testClientNonInteractive to use TestContext James Prestwood
2020-09-10 23:12 ` [PATCH v5 19/26] auto-t: update testAgent " James Prestwood
2020-09-10 23:12 ` [PATCH v5 20/26] auto-t: fix testBSSBlacklist James Prestwood
2020-09-10 23:12 ` [PATCH v5 21/26] auto-t: fix testAP James Prestwood
2020-09-10 23:12 ` [PATCH v5 22/26] auto-t: fix testAPRoam James Prestwood
2020-09-10 23:12 ` [PATCH v5 23/26] auto-t: harden testHotspot James Prestwood
2020-09-10 23:12 ` [PATCH v5 24/26] auto-t: fix testWPA2 to wait for device object James Prestwood
2020-09-10 23:12 ` [PATCH v5 25/26] auto-t: fix testPreauth-roam James Prestwood
2020-09-10 23:12 ` [PATCH v5 26/26] auto-t: fix testFT-PSK-roam James Prestwood
2020-09-10 23:21 ` [PATCH v5 01/26] auto-t: prepare autotests for test-runner re-write 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=20200910231248.4995-16-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.