From: Jouni Malinen Date: Tue, 16 Oct 2018 09:44:48 +0000 (+0300) Subject: tests: ap_vht_csa_vht40 to check for unexpected disconnection X-Git-Tag: hostap_2_7~120 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ad369d77baeeb89c6a8670c60106efd23eb5d142;p=thirdparty%2Fhostap.git tests: ap_vht_csa_vht40 to check for unexpected disconnection This test case had an error that hit an unexpected disconnection. Add an explicit check to verify that this does not happen anymore. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_ap_vht.py b/tests/hwsim/test_ap_vht.py index a6dcd152e..e6c39b659 100644 --- a/tests/hwsim/test_ap_vht.py +++ b/tests/hwsim/test_ap_vht.py @@ -743,7 +743,9 @@ def test_ap_vht_csa_vht40(dev, apdev): raise Exception("Channel switch event not seen") if "freq=5765" not in ev: raise Exception("Channel mismatch: " + ev) - time.sleep(0.5) + ev = dev[0].wait_event(["CTRL-EVENT-DISCONNECTED"], timeout=0.5) + if ev is not None: + raise Exception("Unexpected disconnection event from station") hwsim_utils.test_connectivity(dev[0], hapd) dev[1].connect("vht", key_mgmt="NONE", scan_freq="5765")