mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-20 15:00:05 +01:00
test: if we fail to receive our udev device, abort with a useful error
This frequently fails when the runners are busy, so let's at least print the errno to have *some* idea of what is failing. Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1257>
This commit is contained in:
parent
7135c2fc0c
commit
6104fe44f1
1 changed files with 6 additions and 1 deletions
|
|
@ -2340,7 +2340,12 @@ udev_wait_for_device_event(struct udev_monitor *udev_monitor,
|
||||||
const char *udev_action;
|
const char *udev_action;
|
||||||
|
|
||||||
udev_device = udev_monitor_receive_device(udev_monitor);
|
udev_device = udev_monitor_receive_device(udev_monitor);
|
||||||
litest_assert_notnull(udev_device);
|
if (!udev_device) {
|
||||||
|
litest_abort_msg(
|
||||||
|
"Failed to receive udev device from monitor: %s (%d)",
|
||||||
|
strerror(errno),
|
||||||
|
errno);
|
||||||
|
}
|
||||||
udev_action = udev_device_get_action(udev_device);
|
udev_action = udev_device_get_action(udev_device);
|
||||||
if (!udev_action || !streq(udev_action, udev_event)) {
|
if (!udev_action || !streq(udev_action, udev_event)) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue