From 742b5ccbfb8f6a0cd557e7416b9cac952ef57ec8 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Fri, 29 May 2015 07:29:07 +1000 Subject: [PATCH] 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 Reviewed-by: Hans de Goede --- test/litest.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/litest.c b/test/litest.c index 53c441b5..349eca08 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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