From fc031b7ea70306ec91dc0c510abb34b2b57d1a3e Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Wed, 7 Feb 2018 13:45:48 +0200 Subject: [PATCH] tests: Make owe_transition_mode_multi_bss more robust Fix bssid2 value to make scanning more reliable for the second OWE BSS. In addition, reorder the STA status checks to happen before the data connectivity check to get more accurate failure reason into the log if the test case fails. Signed-off-by: Jouni Malinen --- tests/hwsim/test_owe.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/hwsim/test_owe.py b/tests/hwsim/test_owe.py index 4efc3d24a..980926743 100644 --- a/tests/hwsim/test_owe.py +++ b/tests/hwsim/test_owe.py @@ -234,6 +234,7 @@ def run_owe_transition_mode_multi_bss(dev, apdev): ifname2 = apdev[0]['ifname'] + '-2' hapd1 = hostapd.add_bss(apdev[0], ifname1, 'owe-bss-1.conf') hapd2 = hostapd.add_bss(apdev[0], ifname2, 'owe-bss-2.conf') + hapd2.bssidx = 1 bssid = hapd1.own_addr() bssid2 = hapd2.own_addr() @@ -247,10 +248,13 @@ def run_owe_transition_mode_multi_bss(dev, apdev): dev[0].scan_for_bss(bssid2, freq="2412") dev[0].scan_for_bss(bssid, freq="2412") dev[0].connect("transition-mode-open", key_mgmt="OWE") - hwsim_utils.test_connectivity(dev[0], hapd2) + val = dev[0].get_status_field("bssid") + if val != bssid2: + raise Exception("Unexpected bssid: " + val) val = dev[0].get_status_field("key_mgmt") if val != "OWE": raise Exception("Unexpected key_mgmt: " + val) + hwsim_utils.test_connectivity(dev[0], hapd2) def test_owe_unsupported_group(dev, apdev): """Opportunistic Wireless Encryption and unsupported group"""