From: Jouni Malinen Date: Sat, 20 Dec 2014 11:37:08 +0000 (+0200) Subject: tests: Report ROAM failure in pmksa_cache_opportunistic_multiple_sta X-Git-Tag: hostap_2_4~738 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cac5526390ef28e9ee39c404ed96743f2d0960d9;p=thirdparty%2Fhostap.git tests: Report ROAM failure in pmksa_cache_opportunistic_multiple_sta There is no need to wait for the timeout if the ROAM command itself failed. This could happen if an earlier test case had left hidden SSIDs in the cfg80211 BSS table. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_pmksa_cache.py b/tests/hwsim/test_pmksa_cache.py index 14a83cdc2..e0e23ee19 100644 --- a/tests/hwsim/test_pmksa_cache.py +++ b/tests/hwsim/test_pmksa_cache.py @@ -521,7 +521,8 @@ def test_pmksa_cache_opportunistic_multiple_sta(dev, apdev): for sta in [ dev[2], dev[0], wpas, dev[1] ]: sta.dump_monitor() sta.scan_for_bss(bssid2, freq="2412") - sta.request("ROAM " + bssid2) + if "OK" not in sta.request("ROAM " + bssid2): + raise Exception("ROAM command failed") ev = sta.wait_event(["CTRL-EVENT-EAP-STARTED", "CTRL-EVENT-CONNECTED"], timeout=10) if ev is None: