test: keep waiting for a udev device on EAGAIN

This shouldn't happen because we turn off O_NONBLOCK on the udev
monitor's fd but sometimes this call fails with EAGAIN. If that happens,
keep busy-looping until we get some other error or success.

Part-of: <https://gitlab.freedesktop.org/libinput/libinput/-/merge_requests/1257>
This commit is contained in:
Peter Hutterer 2025-07-02 16:38:39 +10:00 committed by Marge Bot
parent 6104fe44f1
commit ce23e644aa

View file

@ -2341,6 +2341,9 @@ udev_wait_for_device_event(struct udev_monitor *udev_monitor,
udev_device = udev_monitor_receive_device(udev_monitor);
if (!udev_device) {
if (errno == EAGAIN)
continue;
litest_abort_msg(
"Failed to receive udev device from monitor: %s (%d)",
strerror(errno),