]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: STOP_FETCH_ANQP
authorJouni Malinen <j@w1.fi>
Sat, 13 Dec 2014 23:08:18 +0000 (01:08 +0200)
committerJouni Malinen <j@w1.fi>
Sun, 14 Dec 2014 00:28:03 +0000 (02:28 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_gas.py

index aaa694fe25d534c900fd54890ef93f9bd6036ff5..9e8b6d107f0ec10cd16210d2a5d98b7add665a99 100644 (file)
@@ -260,6 +260,21 @@ def test_gas_comeback_delay(dev, apdev):
         if ev is None:
             raise Exception("Operation timed out")
 
+def test_gas_stop_fetch_anqp(dev, apdev):
+    """Stop FETCH_ANQP operation"""
+    hapd = start_ap(apdev[0])
+
+    dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
+    hapd.set("ext_mgmt_frame_handling", "1")
+    dev[0].request("FETCH_ANQP")
+    dev[0].request("STOP_FETCH_ANQP")
+    hapd.set("ext_mgmt_frame_handling", "0")
+    ev = dev[0].wait_event(["RX-ANQP", "GAS-QUERY-DONE"], timeout=10)
+    if ev is None:
+        raise Exception("GAS-QUERY-DONE timed out")
+    if "RX-ANQP" in ev:
+        raise Exception("Unexpected ANQP response received")
+
 def test_gas_anqp_get(dev, apdev):
     """GAS/ANQP query for both IEEE 802.11 and Hotspot 2.0 elements"""
     hapd = start_ap(apdev[0])