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('