From d61ed3ac3c886ebb0ab362bbf2c82593cf131699 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Thu, 13 Mar 2014 20:58:14 +0200 Subject: [PATCH] tests: GAS with unknown advertisement protocol id Signed-off-by: Jouni Malinen --- tests/hwsim/test_gas.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index be3ec9a4c..5b790a702 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -575,3 +575,28 @@ def test_gas_comeback_resp_additional_delay(dev, apdev): resp['payload'] = anqp_comeback_resp(dialog_token, status_code=0) + struct.pack('(GAS-RESPONSE-INFO) addr=([0-9a-f:]*) dialog_token=([0-9]*) status_code=([0-9]*) resp_len=([\-0-9]*)' + res = re.split(exp, ev) + if len(res) < 6: + raise Exception("Could not parse GAS-RESPONSE-INFO") + if res[2] != bssid: + raise Exception("Unexpected BSSID in response") + status = res[4] + if status != "59": + raise Exception("Unexpected GAS-RESPONSE-INFO status")