From be90370bd53fc9c2de5a89aac85933992d23c6f2 Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Sat, 12 Dec 2015 12:45:30 +0200 Subject: [PATCH] tests: Fix wpas_ctrl_country and dbus_country with valid db.txt init=CORE was previously used due to invalid db.txt data for 00. For now, allow both it and the new init=USER after fixed db.txt. Signed-off-by: Jouni Malinen --- tests/hwsim/test_dbus.py | 4 +++- tests/hwsim/test_wpas_ctrl.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 7666dbb96..61b7ddd7c 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -2273,7 +2273,9 @@ def _test_dbus_country(dev, apdev): ev = dev[0].wait_global_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=1) if ev is None: raise Exception("regdom change event not seen") - if "init=CORE type=WORLD" not in ev: + # init=CORE was previously used due to invalid db.txt data for 00. For + # now, allow both it and the new init=USER after fixed db.txt. + if "init=CORE type=WORLD" not in ev and "init=USER type=WORLD" not in ev: raise Exception("Unexpected event contents: " + ev) def test_dbus_scan_interval(dev, apdev): diff --git a/tests/hwsim/test_wpas_ctrl.py b/tests/hwsim/test_wpas_ctrl.py index 1b398e312..1b9903687 100644 --- a/tests/hwsim/test_wpas_ctrl.py +++ b/tests/hwsim/test_wpas_ctrl.py @@ -1158,7 +1158,9 @@ def test_wpas_ctrl_country(dev, apdev): ev = dev[0].wait_global_event(["CTRL-EVENT-REGDOM-CHANGE"], 10) if ev is None: raise Exception("regdom change event not seen") - if "init=CORE type=WORLD" not in ev: + # init=CORE was previously used due to invalid db.txt data for 00. For + # now, allow both it and the new init=USER after fixed db.txt. + if "init=CORE type=WORLD" not in ev and "init=USER type=WORLD" not in ev: raise Exception("Unexpected event contents: " + ev) finally: subprocess.call(['iw', 'reg', 'set', '00'])