3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-25 09:39:25 +01:00

auto-t: replace waiting for network with device

Many tests waited on the network object 'connected' property after
issuing a Connect command. This is not correct as 'connected' is
set quite early in the connection process. The correct way of doing
this is waiting for the device state to change to connected.

This common code was replaced, hopefully putting to rest any random
failures that happen occasionally.
This commit is contained in:
James Prestwood 2020-09-14 14:02:33 -07:00 committed by Denis Kenzior
parent 4676dd7efd
commit d232edde72
62 changed files with 161 additions and 160 deletions

View File

@ -25,8 +25,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(dev, condition)
wd.unregister_psk_agent(psk_agent)

View File

@ -24,8 +24,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -77,8 +77,8 @@ class Test(unittest.TestCase):
# successfully to bss_hostapd[0]
self.assertIn(device.address, bss_hostapd[0].list_sta())
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
wd.unregister_psk_agent(psk_agent)

View File

@ -134,8 +134,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertIn(device.address, bss_hostapd[0].list_sta())

View File

@ -20,8 +20,8 @@ class Test(unittest.TestCase):
ordered_network = device.get_ordered_network(ssid)
condition = 'obj.connected'
self.wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
self.wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -24,8 +24,8 @@ class TestConnectAutoConnect(unittest.TestCase):
else:
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
def check_autoconnect(self, wd, device, ssid, throws):
if throws is None:

View File

@ -36,16 +36,16 @@ class Test(unittest.TestCase):
wpa_net.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(wpa_net.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
open_net = device.get_ordered_network('ssidOpen')
self.assertEqual(open_net.type, NetworkType.open)
open_net.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(open_net.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -40,8 +40,8 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -46,16 +46,16 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -38,8 +38,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
wd.unregister_psk_agent(psk_agent)

View File

@ -35,8 +35,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -34,8 +34,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -34,8 +34,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -36,8 +36,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -40,16 +40,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -43,16 +43,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -32,8 +32,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -44,16 +44,16 @@ class Test(unittest.TestCase):
auth.stop()
raise
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -43,8 +43,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(hostapd.ifname, device.name)

View File

@ -43,8 +43,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(hapd.ifname, device.name)

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -43,16 +43,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -40,8 +40,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -33,8 +33,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -43,16 +43,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -43,16 +43,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -43,16 +43,16 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
hostapd.eapol_reauth(device.address)
hostapd.wait_for_event('CTRL-EVENT-EAP-STARTED')
hostapd.wait_for_event('CTRL-EVENT-EAP-SUCCESS')
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -34,8 +34,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -42,8 +42,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)
@ -62,8 +62,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

View File

@ -42,8 +42,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)
@ -62,8 +62,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

View File

@ -55,8 +55,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())
@ -82,7 +82,9 @@ class Test(unittest.TestCase):
condition = 'obj.state != DeviceState.roaming'
wd.wait_for_object_condition(device, condition)
self.assertEqual(device.state, iwd.DeviceState.connected)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[1].list_sta())
testutil.test_iface_operstate(device.name)
@ -132,8 +134,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())

View File

@ -60,8 +60,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())
@ -85,8 +85,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())
@ -112,7 +112,9 @@ class Test(unittest.TestCase):
condition = 'obj.state != DeviceState.roaming'
wd.wait_for_object_condition(device, condition)
self.assertEqual(device.state, iwd.DeviceState.connected)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[1].list_sta())
testutil.test_iface_operstate(device.name)

View File

@ -60,8 +60,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())
@ -85,8 +85,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())

View File

@ -59,8 +59,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())

View File

@ -145,8 +145,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())

View File

@ -65,8 +65,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
self.assertTrue(self.bss_hostapd[0].list_sta())
self.assertFalse(self.bss_hostapd[1].list_sta())

View File

@ -10,7 +10,6 @@ from iwd import PSKAgent
from iwd import NetworkType
from hwsim import Hwsim
import testutil
from time import sleep
from hostapd import HostapdCLI
class Test(unittest.TestCase):
@ -35,10 +34,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
sleep(1)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hostapd.ifname)

View File

@ -21,8 +21,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -29,8 +29,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -43,8 +43,8 @@ class TestMFP(unittest.TestCase):
else:
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -37,8 +37,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

View File

@ -37,8 +37,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected(device.name, hapd.ifname)

View File

@ -34,8 +34,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -53,8 +53,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -51,8 +51,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
# Test with 5 signal strength levels first, then with 3

View File

@ -43,9 +43,9 @@ class Test(unittest.TestCase):
for n in networks:
n.network_object.connect(wait=False)
for n in networks:
condition = 'obj.connected'
wd.wait_for_object_condition(n.network_object, condition)
for d in devices:
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(d, condition)
for d in devices:
condition = 'obj.state == DeviceState.connected'

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
wd.wait(2)

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
wd.wait(2)

View File

@ -46,8 +46,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
# TODO: for some reason hostapd does not respond to SA query if done
# too soon after connection.
@ -60,8 +60,8 @@ class Test(unittest.TestCase):
sleep(4)
# Since disassociate was spoofed we should still be connected
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -40,8 +40,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
# Make AP go down ungracefully, when hostapd comes back up it should
# send an unprotected disassociate frame so the client will re-auth.

View File

@ -38,8 +38,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
testutil.test_iface_operstate()
testutil.test_ifaces_connected()

View File

@ -37,8 +37,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()

View File

@ -37,8 +37,8 @@ class Test(unittest.TestCase):
ordered_network.network_object.connect()
condition = 'obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)
device.disconnect()