test: add another wait loop for udev
authorPeter Hutterer <peter.hutterer@who-t.net>
Thu, 28 May 2015 21:29:07 +0000 (07:29 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Fri, 29 May 2015 02:23:05 +0000 (12:23 +1000)
Wait after deleting a device so udev can catch up with everything and the
various hooks to make sure it's happy with any newly created devices after
this.

The sleep is in the delete path to also cover the tests where we manually
create uinput devices rather than using the litest hooks.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
test/litest.c

index 53c441b50758656285cebe040cc5cb28253d9fa9..349eca08411653c01d3b9f80b4d0f124446a166f 100644 (file)
@@ -1122,6 +1122,11 @@ litest_delete_device(struct litest_device *d)
        free(d->private);
        memset(d,0, sizeof(*d));
        free(d);
+
+       /* zzz so udev can catch up with things, so we don't accidentally open
+        * an old device in the next test and then get all upset when things blow
+        * up */
+       msleep(10);
 }
 
 void