From de8c4144fa9e88d0bef7760b882fa6faa8c46f23 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sun, 25 May 2014 18:50:01 +0300 Subject: [PATCH] tests: No pending query for GAS comeback Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 8ad07b28c..fd7104536 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -365,6 +365,15 @@ def parse_gas(payload): (status_code, comeback_delay) = struct.unpack(' 8 and status_code == 0: raise Exception("Unexpected success status code {} for dialog token {}".format(status_code, dialog_token)) + +def test_gas_no_pending(dev, apdev): + """GAS and no pending query for comeback request""" + hapd = start_ap(apdev[0]) + bssid = apdev[0]['bssid'] + + wpas = WpaSupplicant(global_iface='/tmp/wpas-wlan5') + wpas.interface_add("wlan5") + if "OK" not in wpas.request("P2P_SET listen_channel 1"): + raise Exception("Failed to set listen channel") + if "OK" not in wpas.p2p_listen(): + raise Exception("Failed to start listen state") + if "FAIL" in wpas.request("SET ext_mgmt_frame_handling 1"): + raise Exception("Failed to enable external management frame handling") + + msg = struct.pack('