From cd8cd01cc1d618097b345ff6deb5742e23bfedac Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 27 Dec 2016 16:38:20 +0200 Subject: [PATCH] tests: Additional SA_QUERY coverage Signed-off-by: Jouni Malinen --- tests/hwsim/test_ap_pmf.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_ap_pmf.py b/tests/hwsim/test_ap_pmf.py index 435d6aca0..16956cdee 100644 --- a/tests/hwsim/test_ap_pmf.py +++ b/tests/hwsim/test_ap_pmf.py @@ -40,8 +40,12 @@ def test_ap_pmf_required(dev, apdev): key_mgmt="WPA-PSK WPA-PSK-SHA256", proto="WPA2", scan_freq="2412") hwsim_utils.test_connectivity(dev[1], hapd) - hapd.request("SA_QUERY " + dev[0].p2p_interface_addr()) - hapd.request("SA_QUERY " + dev[1].p2p_interface_addr()) + if "OK" not in hapd.request("SA_QUERY " + dev[0].own_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_sta_pmf(apdev[0]['bssid'], dev[0].p2p_interface_addr()) wt.require_sta_pmf_mandatory(apdev[0]['bssid'], dev[1].p2p_interface_addr())