]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Fix wpas_ctrl_country and dbus_country with valid db.txt
authorJouni Malinen <j@w1.fi>
Sat, 12 Dec 2015 10:45:30 +0000 (12:45 +0200)
committerJouni Malinen <j@w1.fi>
Sat, 12 Dec 2015 10:45:30 +0000 (12:45 +0200)
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 <j@w1.fi>
tests/hwsim/test_dbus.py
tests/hwsim/test_wpas_ctrl.py

index 7666dbb9669c5f1f71aad0b5781dded79598b515..61b7ddd7c1ee42995f4697673b261b2b35c69c6c 100644 (file)
@@ -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):
index 1b398e3124ffc1bcee49ccdcffc9277c19528e78..1b99036874c9bf1ea8b66aebf47e7946896bc0f1 100644 (file)
@@ -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'])