From 8f5abdb874c4b85c5bfb646fed9cd797362cc64c Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 28 May 2016 23:28:15 +0300 Subject: [PATCH] tests: More coverage in ap_reassociation_to_same_bss The extra wait forces the special reattach-scan case to be reached in wpa_supplicant_scan(). Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_roam.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/hwsim/test_ap_roam.py b/tests/hwsim/test_ap_roam.py index 4456384eb..cfa5a9de5 100644 --- a/tests/hwsim/test_ap_roam.py +++ b/tests/hwsim/test_ap_roam.py @@ -103,6 +103,12 @@ def test_ap_reassociation_to_same_bss(dev, apdev): dev[0].wait_connected(timeout=10, error="Reattach timed out") hwsim_utils.test_connectivity(dev[0], hapd) + # Wait for previous scan results to expire to trigger new scan + time.sleep(5) + dev[0].request("REATTACH") + dev[0].wait_connected(timeout=10, error="Reattach timed out") + hwsim_utils.test_connectivity(dev[0], hapd) + def test_ap_roam_set_bssid(dev, apdev): """Roam control""" hostapd.add_ap(apdev[0], { "ssid": "test-open" })