tests: Additional SA_QUERY coverage

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2016-12-27 16:38:20 +02:00
parent e6c65001f8
commit cd8cd01cc1

View file

@ -40,8 +40,12 @@ def test_ap_pmf_required(dev, apdev):
key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2", key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2",
scan_freq="2412") scan_freq="2412")
hwsim_utils.test_connectivity(dev[1], hapd) hwsim_utils.test_connectivity(dev[1], hapd)
hapd.request("SA_QUERY " + dev[0].p2p_interface_addr()) if "OK" not in hapd.request("SA_QUERY " + dev[0].own_addr()):
hapd.request("SA_QUERY " + dev[1].p2p_interface_addr()) raise Exception("SA_QUERY failed")
if "OK" not in hapd.request("SA_QUERY " + dev[1].own_addr()):
raise Exception("SA_QUERY failed")
if "FAIL" not in hapd.request("SA_QUERY foo"):
raise Exception("Invalid SA_QUERY accepted")
wt.require_ap_pmf_mandatory(apdev[0]['bssid']) wt.require_ap_pmf_mandatory(apdev[0]['bssid'])
wt.require_sta_pmf(apdev[0]['bssid'], dev[0].p2p_interface_addr()) wt.require_sta_pmf(apdev[0]['bssid'], dev[0].p2p_interface_addr())
wt.require_sta_pmf_mandatory(apdev[0]['bssid'], dev[1].p2p_interface_addr()) wt.require_sta_pmf_mandatory(apdev[0]['bssid'], dev[1].p2p_interface_addr())