3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2025-04-17 16:47:53 +02:00

auto-t: set autoconnect=True for tests that need it

After the default behavior was changed to disable autoconnect there
were several tests which still needed it to be turned on.
This commit is contained in:
James Prestwood 2021-08-12 13:38:12 -07:00 committed by Denis Kenzior
parent a15b781feb
commit 836f0d9a08
9 changed files with 12 additions and 4 deletions
autotests

@ -81,10 +81,8 @@ class Test(unittest.TestCase):
rule0.drop = False
# Next try autoconnecting to a network with a blacklisted BSS. Since an
# explicit disconnect call would disable autoconnect we reset
# hostapd which will disconnect IWD.
bss_hostapd[1].reload()
device.disconnect()
device.autoconnect = True
condition = 'not obj.connected'
wd.wait_for_object_condition(ordered_network.network_object, condition)

@ -28,6 +28,8 @@ class TestConnectAutoConnect(unittest.TestCase):
wd.wait_for_object_condition(device, condition)
def check_autoconnect(self, wd, device, ssid, throws):
device.autoconnect = True
if throws is None:
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)

@ -48,11 +48,13 @@ class TestConnectAutoConnect(unittest.TestCase):
devices = wd.list_devices(1)
self.assertIsNotNone(devices)
device = devices[0]
device.autoconnect = autoconnect
if autoconnect:
self.check_autoconnect_hidden_network(wd, device, ssid, throws)
else:
if wait_periodic_scan:
device.autoconnect = True
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)
condition = 'not obj.scanning'

@ -33,6 +33,7 @@ class Test(unittest.TestCase):
devices = wd.list_devices(1)
device = devices[0]
device.autoconnect = True
# We are dependent on a periodic scan here. We want to wait for this
# because this is the first opportunity IWD has to do ANQP. Once ANQP

@ -23,6 +23,7 @@ class Test(unittest.TestCase):
devices = wd.list_devices(1)
device = devices[0]
device.autoconnect = True
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)

@ -17,6 +17,7 @@ class Test(unittest.TestCase):
devices = wd.list_devices(1)
self.assertIsNotNone(devices)
device = devices[0]
device.autoconnect = True
condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_condition(device, condition)

@ -28,6 +28,7 @@ class Test(unittest.TestCase):
devices = wd.list_devices(1)
self.assertIsNotNone(devices)
device = devices[0]
device.autoconnect = True
# Device initiates a passive periodic scan.
condition = 'obj.scanning'

@ -30,6 +30,7 @@ class Test(unittest.TestCase):
devices = wd.list_devices(1)
self.assertIsNotNone(devices)
device = devices[0]
device.autoconnect = True
condition = 'obj.scanning'
wd.wait_for_object_condition(device, condition)

@ -24,6 +24,7 @@ class Test(unittest.TestCase):
def validate_quick_scan(self, wd):
devices = wd.list_devices(1)
device = devices[0]
device.autoconnect = True
# Device initiates a passive quick scan and scans only for the known
# frequencies (listed in .known_network.freq file).