From a567aae4a1bd7bdca03bf801dbc40289847a0b26 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 11 Sep 2014 15:56:37 +0300 Subject: [PATCH] tests: Roaming policy change with the bssid parameter Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_roam.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/hwsim/test_ap_roam.py b/tests/hwsim/test_ap_roam.py index 6a2467c3e..b22ffa477 100644 --- a/tests/hwsim/test_ap_roam.py +++ b/tests/hwsim/test_ap_roam.py @@ -53,3 +53,19 @@ def test_ap_reassociation_to_same_bss(dev, apdev): if ev is None: raise Exception("Reassociation (reattach) with the AP timed out") hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname']) + +def test_ap_roam_set_bssid(dev, apdev): + """Roam control""" + hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" }) + hostapd.add_ap(apdev[1]['ifname'], { "ssid": "test-open" }) + id = dev[0].connect("test-open", key_mgmt="NONE", bssid=apdev[1]['bssid'], + scan_freq="2412") + if dev[0].get_status_field('bssid') != apdev[1]['bssid']: + raise Exception("Unexpected BSS") + # for now, these are just verifying that the code path to indicate + # within-ESS roaming changes can be executed; the actual results of those + # operations are not currently verified (that would require a test driver + # that does BSS selection) + dev[0].set_network(id, "bssid", "") + dev[0].set_network(id, "bssid", apdev[0]['bssid']) + dev[0].set_network(id, "bssid", apdev[1]['bssid'])