tests: Force hw capability re-fetch at the end of dbus_connect_oom
authorJouni Malinen <jouni@qca.qualcomm.com>
Tue, 17 Nov 2015 17:00:21 +0000 (19:00 +0200)
committerJouni Malinen <j@w1.fi>
Tue, 17 Nov 2015 17:50:34 +0000 (19:50 +0200)
This is needed since the forced OOM may have forced the cached
information to be invalid or dropped. This issue was hit with the
following hwsim test case sequence:
ap_interworking_scan_filtering fst_sta_config_llt_large dbus_connect_oom
wpas_ctrl_enable_disable_network

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/test_dbus.py

index 496b9ae..32d2703 100644 (file)
@@ -1375,6 +1375,17 @@ def test_dbus_connect_oom(dev, apdev):
         except:
             pass
 
+    # Force regulatory update to re-fetch hw capabilities for the following
+    # test cases.
+    try:
+        dev[0].dump_monitor()
+        subprocess.call(['iw', 'reg', 'set', 'US'])
+        ev = dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=1)
+    finally:
+        dev[0].dump_monitor()
+        subprocess.call(['iw', 'reg', 'set', '00'])
+        ev = dev[0].wait_event(["CTRL-EVENT-REGDOM-CHANGE"], timeout=1)
+
 def test_dbus_while_not_connected(dev, apdev):
     """D-Bus invalid operations while not connected"""
     (bus,wpas_obj,path,if_obj) = prepare_dbus(dev[0])