From: Jouni Malinen Date: Tue, 11 Mar 2014 18:08:18 +0000 (+0200) Subject: tests: Verify reassociate-to-same-BSS commands X-Git-Tag: hostap_2_2~594 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99cd77a8c50413d44f1ebead917310468a8406de;p=thirdparty%2Fhostap.git tests: Verify reassociate-to-same-BSS commands Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_roam.py b/tests/hwsim/test_ap_roam.py index 11e209783..6a2467c3e 100644 --- a/tests/hwsim/test_ap_roam.py +++ b/tests/hwsim/test_ap_roam.py @@ -36,3 +36,20 @@ def test_ap_roam_wpa2_psk(dev, apdev): hwsim_utils.test_connectivity(dev[0].ifname, apdev[1]['ifname']) dev[0].roam(apdev[0]['bssid']) hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname']) + +def test_ap_reassociation_to_same_bss(dev, apdev): + """Reassociate to the same BSS""" + hostapd.add_ap(apdev[0]['ifname'], { "ssid": "test-open" }) + dev[0].connect("test-open", key_mgmt="NONE") + + dev[0].request("REASSOCIATE") + ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10) + if ev is None: + raise Exception("Reassociation with the AP timed out") + hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname']) + + dev[0].request("REATTACH") + ev = dev[0].wait_event(["CTRL-EVENT-CONNECTED"], timeout=10) + if ev is None: + raise Exception("Reassociation (reattach) with the AP timed out") + hwsim_utils.test_connectivity(dev[0].ifname, apdev[0]['ifname'])