[PATCH 7/7] tests: wmm_ac: add reassociation test

Ilan Peer ilan.peer
Sun Dec 28 18:15:03 PST 2014


From: Eliad Peller <eliad at wizery.com>

make sure the tspecs are kept on reassociation
(to the same bss)

Signed-off-by: Eliad Peller <eliadx.peller at intel.com>
---
 tests/hwsim/test_wpas_wmm_ac.py | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/tests/hwsim/test_wpas_wmm_ac.py b/tests/hwsim/test_wpas_wmm_ac.py
index d3c4007..03aa3c2 100644
--- a/tests/hwsim/test_wpas_wmm_ac.py
+++ b/tests/hwsim/test_wpas_wmm_ac.py
@@ -263,3 +263,20 @@ def test_tspec_ap_roam_open(dev, apdev):
     dev[0].scan(type="ONLY", freq="2462")
     dev[0].roam(apdev[0]['bssid'])
     hwsim_utils.test_connectivity(dev[0], hapd0)
+
+def test_tspec_reassoc(dev, apdev):
+    """Reassoc while having tspecs"""
+    hapd0 = add_wmm_ap(apdev[0], ["VO", "VI"])
+    dev[0].connect("wmm_ac", key_mgmt="NONE")
+    hwsim_utils.test_connectivity(dev[0], hapd0)
+    dev[0].add_ts(5, 6)
+    last_tspecs = dev[0].tspecs()
+
+    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], hapd0)
+    if dev[0].tspecs() != last_tspecs:
+        raise Exception("TSPECs weren't saved on reassoc")
-- 
1.8.3.2




More information about the Hostap mailing list