From ce23e644aa05b211999e1ddc95a56360861af13d Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Jul 2025 16:38:39 +1000 Subject: [PATCH] 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: --- test/litest.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/litest.c b/test/litest.c index 759c5510..eba26d42 100644 --- a/test/litest.c +++ b/test/litest.c @@ -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),