eiwd

no dbus iwd with iwctl functionality
git clone https://git.daat.foo/repos/eiwd.git
Log | Files | Refs | Submodules | README | LICENSE

commit 6e2aba3907877ae6e43012e397883e2c78f2d964
parent 0036cb976fe8e0197e5ac11dfccd7fa8fdb59599
Author: James Prestwood <prestwoj@gmail.com>
Date:   Thu, 10 Sep 2020 16:12:37 -0700

auto-t: Increase all test timeouts

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.

Diffstat:
Mautotests/testAPRoam/connection_test.py | 4++--
Mautotests/testBSSBlacklist/connection_test.py | 4++--
Mautotests/testFT-8021x-roam/connection_test.py | 8++++----
Mautotests/testFT-FILS-SHA256/connection_test.py | 4++--
Mautotests/testFT-FILS-SHA384/connection_test.py | 4++--
Mautotests/testFT-PSK-over-DS/connection_test.py | 4++--
Mautotests/testFT-PSK-roam/connection_test.py | 4++--
Mautotests/testFT-SAE-roam/connection_test.py | 8++++----
Mautotests/testHiddenNetworks/validation.py | 6+++---
Mautotests/testKnownNetworks/known_network_test.py | 4++--
Mautotests/testPreauth-roam/connection_test.py | 4++--
Mautotests/testRSSIAgent/connection_test.py | 2+-
Mautotests/testSAE/autoconnect_test.py | 2+-
Mautotests/testScan/requested_scan_test.py | 4++--
Mautotests/util/iwd.py | 8++++----
Mautotests/util/testutil.py | 2+-
Mtools/test-runner | 2+-
17 files changed, 37 insertions(+), 37 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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)