From 89a79ca2b9a1c94f7409236126b42f4d4fd75d3b Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Tue, 17 Nov 2015 19:00:21 +0200 Subject: [PATCH] tests: Force hw capability re-fetch at the end of dbus_connect_oom 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 --- tests/hwsim/test_dbus.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 496b9aeb0..32d270353 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -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])