From 1ad6f0d5e67c60b6ded4ae6526be376404b85b90 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Mon, 27 Jun 2016 12:51:20 +0300 Subject: [PATCH] tests: GAS query deleted at deinit Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 67f4fb91d..bb0e38d20 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -860,6 +860,25 @@ def test_gas_no_pending(dev, apdev): if status_code != 60: raise Exception("Unexpected status code {} (expected 60)".format(status_code)) +def test_gas_delete_at_deinit(dev, apdev): + """GAS query deleted at deinit""" + hapd = start_ap(apdev[0]) + hapd.set("gas_comeback_delay", "1000") + bssid = apdev[0]['bssid'] + + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add("wlan5") + wpas.scan_for_bss(apdev[0]['bssid'], freq="2412", force_scan=True) + wpas.request("ANQP_GET " + bssid + " 258") + + wpas.global_request("INTERFACE_REMOVE " + wpas.ifname) + ev = wpas.wait_event(["GAS-QUERY-DONE"], timeout=2) + del wpas + if ev is None: + raise Exception("GAS-QUERY-DONE not seen") + if "result=DELETED_AT_DEINIT" not in ev: + raise Exception("Unexpected result code: " + ev) + def test_gas_missing_payload(dev, apdev): """No action code in the query frame""" bssid = apdev[0]['bssid']