commit 41ce56bf0ddee8384ff9eae578752af9b6f06634
parent fb76a4ef13cc766619700be3f9b7eb47e16ad9fc
Author: James Prestwood <prestwoj@gmail.com>
Date: Mon, 22 Aug 2022 10:01:45 -0700
auto-t: fix unreliable behavior in testPSK-roam
The packet loss test had a few problems. First being that the RSSI for
the original BSS was not low enough to change the rank. This meant any
roam was just lucky that the intended BSS was first in the results.
The second problem is timing related, and only happens on UML. Disabling
the rules after the roaming condition sometimes allows IWD to fully
roam and connect before the next state change checks.
Diffstat:
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/autotests/testPSK-roam/connection_test.py b/autotests/testPSK-roam/connection_test.py
@@ -55,16 +55,16 @@ class Test(unittest.TestCase):
condition = 'obj.state == DeviceState.roaming'
wd.wait_for_object_condition(device, condition)
- if pkt_loss:
- self.rule1.enabled = False
- self.rule2.enabled = False
-
# Check that iwd is on BSS 1 once out of roaming state and doesn't
# go through 'disconnected', 'autoconnect', 'connecting' in between
from_condition = 'obj.state == DeviceState.roaming'
to_condition = 'obj.state == DeviceState.connected'
wd.wait_for_object_change(device, from_condition, to_condition)
+ if pkt_loss:
+ self.rule1.enabled = False
+ self.rule2.enabled = False
+
self.bss_hostapd[1].wait_for_event('AP-STA-CONNECTED %s' % device.address)
testutil.test_iface_operstate(device.name)
@@ -197,7 +197,7 @@ class Test(unittest.TestCase):
cls.rule2 = hwsim.rules.create()
cls.rule2.source = rad0.addresses[0]
- cls.rule2.signal = -4000
+ cls.rule2.signal = -7000
# Set interface addresses to those expected by hostapd config files
os.system('ip link set dev "' + cls.bss_hostapd[0].ifname + '" down')