]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Check GAS and ANQP completion events in gas_fragment
authorJouni Malinen <j@w1.fi>
Sat, 27 Jun 2015 14:13:24 +0000 (17:13 +0300)
committerJouni Malinen <j@w1.fi>
Sat, 27 Jun 2015 14:13:24 +0000 (17:13 +0300)
Signed-off-by: Jouni Malinen <j@w1.fi>
tests/hwsim/test_gas.py

index d0ba9d14ffa1d94cdbc6fb7180f8984712ac0521..023d33e2cbc35230533c97261b798d26dfec84a1 100644 (file)
@@ -240,10 +240,20 @@ def test_gas_fragment(dev, apdev):
 
     dev[0].scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True)
     dev[0].request("FETCH_ANQP")
+    ev = dev[0].wait_event(["GAS-QUERY-DONE"], timeout=1)
+    if ev is None:
+        raise Exception("No GAS-QUERY-DONE event")
+    if "result=SUCCESS" not in ev:
+        raise Exception("Unexpected GAS result: " + ev)
     for i in range(0, 13):
         ev = dev[0].wait_event(["RX-ANQP", "RX-HS20-ANQP"], timeout=5)
         if ev is None:
             raise Exception("Operation timed out")
+    ev = dev[0].wait_event(["ANQP-QUERY-DONE"], timeout=1)
+    if ev is None:
+        raise Exception("No ANQP-QUERY-DONE event")
+    if "result=SUCCESS" not in ev:
+        raise Exception("Unexpected ANQP result: " + ev)
 
 def test_gas_comeback_delay(dev, apdev):
     """GAS fragmentation"""