test: add another wait loop for udev

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>
This commit is contained in:
Peter Hutterer 2015-05-29 07:29:07 +10:00
parent a4313f13e3
commit 742b5ccbfb

View 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