mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
auto-t: harden testHotspot
This test occationally failed, and it uses the old style of waiting for connected on the network object instead of the device object. The hwsim rule was also moved ahead of the IWD() initializer which ensures that IWD doesn't scan before the rule can be set/processed.
This commit is contained in:
parent
e81b1b77c8
commit
8b41413170
@ -23,10 +23,8 @@ class Test(unittest.TestCase):
|
||||
rule0 = hwsim.rules.create()
|
||||
rule0.source = bss_radio.addresses[0]
|
||||
rule0.bidirectional = True
|
||||
# Force the case where ANQP does not finish before Connect() comes in
|
||||
rule0.delay = 100
|
||||
|
||||
wd = IWD(True, '/tmp')
|
||||
wd = IWD(True)
|
||||
|
||||
hapd = HostapdCLI(config='ssidHotspot.conf')
|
||||
|
||||
@ -53,12 +51,15 @@ class Test(unittest.TestCase):
|
||||
condition = 'not obj.connected'
|
||||
wd.wait_for_object_condition(ordered_network.network_object, condition)
|
||||
|
||||
# Force the case where ANQP does not finish before Connect() comes in
|
||||
rule0.delay = 100
|
||||
|
||||
ordered_network.network_object.connect()
|
||||
|
||||
rule0.delay = 1
|
||||
|
||||
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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user