test: add an additional final libinput_dispatch()
authorPeter Hutterer <peter.hutterer@who-t.net>
Wed, 30 Jan 2019 04:26:31 +0000 (14:26 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Thu, 31 Jan 2019 05:09:44 +0000 (15:09 +1000)
After the test device was removed, run one more libinput_dispatch(). This may
catch some errors that happen due to the device removal that were ignored for
now.

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

index 58622c5454f5d5db83913cae864dbbb0ec80c9ae..b000a216c5ba2dbc5a2152b55a7d0008f1eb4c46 100644 (file)
@@ -1597,8 +1597,10 @@ litest_delete_device(struct litest_device *d)
                libinput_path_remove_device(d->libinput_device);
                libinput_device_unref(d->libinput_device);
        }
-       if (d->owns_context)
+       if (d->owns_context) {
+               libinput_dispatch(d->libinput);
                libinput_unref(d->libinput);
+       }
        close(libevdev_get_fd(d->evdev));
        libevdev_free(d->evdev);
        libevdev_uinput_destroy(d->uinput);