From: Jouni Malinen Date: Sat, 22 Mar 2014 14:56:42 +0000 (+0200) Subject: tests: QoS Map ctrl_iface error cases X-Git-Tag: hostap_2_2~492 X-Git-Url: http://www.project-moonshot.org/gitweb/?a=commitdiff_plain;h=986eedcdc48dc343e30d76c899d385f2012919b0;p=mech_eap.git tests: QoS Map ctrl_iface error cases Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_qosmap.py b/tests/hwsim/test_ap_qosmap.py index f1b7f7a..fa98b20 100644 --- a/tests/hwsim/test_ap_qosmap.py +++ b/tests/hwsim/test_ap_qosmap.py @@ -107,3 +107,28 @@ def test_ap_qosmap_default_acm(dev, apdev): if tid in [ 4, 5, 6, 7 ]: tid = 3 check_qos_map(apdev[0], dev[0], dscp, tid, ap_tid) + +def test_ap_qosmap_invalid(dev, apdev): + """QoS mapping ctrl_iface error handling""" + ssid = "test-qosmap" + params = { "ssid": ssid } + hapd = hostapd.add_ap(apdev[0]['ifname'], params) + if "FAIL" not in hapd.request("SEND_QOS_MAP_CONF 00:11:22:33:44:55"): + raise Exception("Unexpected SEND_QOS_MAP_CONF success") + if "FAIL" not in hapd.request("SET_QOS_MAP_SET "): + raise Exception("Unexpected SET_QOS_MAP_SET success") + if "FAIL" not in hapd.request("SET_QOS_MAP_SET 1,2,3"): + raise Exception("Unexpected SET_QOS_MAP_SET success") + if "FAIL" not in hapd.request("SET_QOS_MAP_SET 1,-2,3"): + raise Exception("Unexpected SET_QOS_MAP_SET success") + if "FAIL" not in hapd.request("SET_QOS_MAP_SET 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59"): + raise Exception("Unexpected SET_QOS_MAP_SET success") + if "FAIL" not in hapd.request("SET_QOS_MAP_SET 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21"): + raise Exception("Unexpected SET_QOS_MAP_SET success") + + if "FAIL" in hapd.request("SET_QOS_MAP_SET 22,6,8,15,0,7,255,255,16,31,32,39,255,255,40,47,48,55"): + raise Exception("Unexpected SET_QOS_MAP_SET failure") + if "FAIL" not in hapd.request("SEND_QOS_MAP_CONF 00:11:22:33:44:55"): + raise Exception("Unexpected SEND_QOS_MAP_CONF success") + if "FAIL" not in hapd.request("SEND_QOS_MAP_CONF 00:11:22:33:44"): + raise Exception("Unexpected SEND_QOS_MAP_CONF success")