From: Jouni Malinen Date: Sun, 13 Apr 2014 21:45:25 +0000 (+0300) Subject: tests: Try to work around bogus errors in wpas_ctrl_country X-Git-Tag: hostap_2_2~266 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2b46e698116443b2962fa0654cc3420bcbc6c3a0;p=thirdparty%2Fhostap.git tests: Try to work around bogus errors in wpas_ctrl_country It seems like it is possible for a CTRL-EVENT-REGDOM-CHANGE event from a previous test case to "leak" through to the execution of this test case. That can result in the validation steps here failing, so wait a bit and clear the pending events before starting the test. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py index a04b8bf0a..11a04e5bd 100644 --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py @@ -774,6 +774,11 @@ def test_wpas_ctrl_enable_disable_network(dev, apdev): def test_wpas_ctrl_country(dev, apdev): """wpa_supplicant SET/GET country code""" try: + # work around issues with possible pending regdom event from the end of + # the previous test case + time.sleep(0.2) + dev[0].dump_monitor() + if "OK" not in dev[0].request("SET country FI"): raise Exception("Failed to set country code") if dev[0].request("GET country") != "FI":