From fee39910ee93837cb938f8fcfdf40401a8ddf018 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 27 Jun 2015 17:13:24 +0300 Subject: [PATCH] tests: Check GAS and ANQP completion events in gas_fragment Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index d0ba9d14f..023d33e2c 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -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"""