From: Jouni Malinen Date: Wed, 10 Dec 2014 23:49:32 +0000 (+0200) Subject: tests: Additional ANQP_GET and HS20_ANQP_GET error coverage X-Git-Tag: hostap_2_4~830 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ea68ed56b9f21b037c986e7a5aa968d9b323efb0;p=thirdparty%2Fhostap.git tests: Additional ANQP_GET and HS20_ANQP_GET error coverage Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_gas.py b/tests/hwsim/test_gas.py index 7a9b88159..de5ef6d5a 100644 --- a/tests/hwsim/test_gas.py +++ b/tests/hwsim/test_gas.py @@ -266,6 +266,33 @@ def test_gas_anqp_get(dev, apdev): if ev is None or "WAN Metrics" not in ev: raise Exception("Did not receive WAN Metrics") + cmds = [ "", + "foo", + "00:11:22:33:44:55 258,hs20:-1", + "00:11:22:33:44:55 258,hs20:0", + "00:11:22:33:44:55 258,hs20:32", + "00:11:22:33:44:55 hs20:-1", + "00:11:22:33:44:55 hs20:0", + "00:11:22:33:44:55 hs20:32", + "00:11:22:33:44:55", + "00:11:22:33:44:55 ", + "00:11:22:33:44:55 0" ] + for cmd in cmds: + if "FAIL" not in dev[0].request("ANQP_GET " + cmd): + raise Exception("Invalid ANQP_GET accepted") + + cmds = [ "", + "foo", + "00:11:22:33:44:55 -1", + "00:11:22:33:44:55 0", + "00:11:22:33:44:55 32", + "00:11:22:33:44:55", + "00:11:22:33:44:55 ", + "00:11:22:33:44:55 0" ] + for cmd in cmds: + if "FAIL" not in dev[0].request("HS20_ANQP_GET " + cmd): + raise Exception("Invalid HS20_ANQP_GET accepted") + def expect_gas_result(dev, result, status=None): ev = dev.wait_event(["GAS-QUERY-DONE"], timeout=10) if ev is None: