test: increase the udev init timeout
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 30 Jun 2015 22:54:32 +0000 (08:54 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 30 Jun 2015 22:56:54 +0000 (08:56 +1000)
Hitting this limit too often on congested VMs, so let's increase the sleep
sleep (so the system can get done what needs to be done) and get the whole
timeout from 600ms to 2000ms.

Note: if we really hit 2000ms we may still fail on some tests with the check's
default 3 second timeout.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
test/litest.c

index 82df550..003a5bc 100644 (file)
@@ -1088,10 +1088,10 @@ litest_wait_for_udev(int fd)
        litest_assert_ptr_notnull(device);
        while (device && !udev_device_get_property_value(device, "ID_INPUT")) {
                loop_count++;
-               litest_assert_int_lt(loop_count, 300);
+               litest_assert_int_lt(loop_count, 200);
 
                udev_device_unref(device);
-               msleep(2);
+               msleep(10);
                device = udev_device_new_from_devnum(udev, 'c', st.st_rdev);
        }