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 <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-12-06 17:10:06 +02:00
parent bc321e1597
commit 1d32bc2c1c

View file

@ -480,6 +480,7 @@ def test_dbus_wps_oom(dev, apdev):
bssid = apdev[0]['bssid'] bssid = apdev[0]['bssid']
dev[0].scan_for_bss(bssid, freq=2412) dev[0].scan_for_bss(bssid, freq=2412)
time.sleep(0.05)
for i in range(1, 3): for i in range(1, 3):
with alloc_fail_dbus(dev[0], i, "=wpas_dbus_getter_bsss", "Get"): with alloc_fail_dbus(dev[0], i, "=wpas_dbus_getter_bsss", "Get"):
if_obj.Get(WPAS_DBUS_IFACE, "BSSs", if_obj.Get(WPAS_DBUS_IFACE, "BSSs",