]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: ANQP-QUERY-DONE event
authorJouni Malinen <j@w1.fi>
Mon, 19 Jan 2015 23:41:48 +0000 (01:41 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 20 Jan 2015 00:26:21 +0000 (02:26 +0200)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_gas.py

index 67c5ceabfba2bc07a753effd9690e9a6426aa015..df11a31cd842b548becd4a9e3a2aa651f9047cc5 100644 (file)
@@ -304,6 +304,12 @@ def test_gas_anqp_get(dev, apdev):
     if ev is None or "WAN Metrics" not in ev:
         raise Exception("Did not receive WAN Metrics")
 
+    ev = dev[0].wait_event(["ANQP-QUERY-DONE"], timeout=10)
+    if ev is None:
+        raise Exception("ANQP-QUERY-DONE event not seen")
+    if "result=SUCCESS" not in ev:
+        raise Exception("Unexpected result: " + ev)
+
     if "OK" not in dev[0].request("HS20_ANQP_GET " + bssid + " 3,4"):
         raise Exception("ANQP_GET command failed")
 
@@ -564,10 +570,16 @@ def test_gas_malformed(dev, apdev):
 
     # Station drops invalid frames, but the last of the responses is valid from
     # GAS view point even though it has an extra octet in the end and the ANQP
-    # part of the response is not valid. This is reported as successfulyl
+    # part of the response is not valid. This is reported as successfully
     # completed GAS exchange.
     expect_gas_result(dev[0], "SUCCESS")
 
+    ev = dev[0].wait_event(["ANQP-QUERY-DONE"], timeout=5)
+    if ev is None:
+        raise Exception("ANQP-QUERY-DONE not reported")
+    if "result=INVALID_FRAME" not in ev:
+        raise Exception("Unexpected result: " + ev)
+
 def init_gas(hapd, bssid, dev):
     anqp_get(dev, bssid, 263)
     query = gas_rx(hapd)