From: Jouni Malinen Date: Sun, 6 Dec 2015 15:10:06 +0000 (+0200) Subject: tests: Make dbus_wps_oom more robust X-Git-Tag: hostap_2_6~1223 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1d32bc2c1c8640226a15d97492aea2c07d25343a;p=thirdparty%2Fhostap.git tests: Make dbus_wps_oom more robust It was possible for the BSSs object property change signal to be generated during the OOM test case for Get(). If that happened, the signal was not sent out, but the following Get(BSSs) operation succeeded unexpectedly which resulted in a test failure. Make this less likely to happen by waiting 50 ms between the scan and Get(BSSs) operation. This should be sufficient to cover most cases since wpa_supplicant uses 5 ms timeout for D-Bus property changed updates. Signed-off-by: Jouni Malinen --- diff --git a/tests/hwsim/test_dbus.py b/tests/hwsim/test_dbus.py index 399b4aff8..7666dbb96 100644 --- a/tests/hwsim/test_dbus.py +++ b/tests/hwsim/test_dbus.py @@ -480,6 +480,7 @@ def test_dbus_wps_oom(dev, apdev): bssid = apdev[0]['bssid'] dev[0].scan_for_bss(bssid, freq=2412) + time.sleep(0.05) for i in range(1, 3): with alloc_fail_dbus(dev[0], i, "=wpas_dbus_getter_bsss", "Get"): if_obj.Get(WPAS_DBUS_IFACE, "BSSs",