From 6104fe44f12480761c60e3d18cf59a23b8b9b816 Mon Sep 17 00:00:00 2001 From: Peter Hutterer Date: Wed, 2 Jul 2025 15:29:23 +1000 Subject: [PATCH] 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: --- test/litest.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/litest.c b/test/litest.c index 3947accc..759c5510 100644 --- a/test/litest.c +++ b/test/litest.c @@ -2340,7 +2340,12 @@ udev_wait_for_device_event(struct udev_monitor *udev_monitor, const char *udev_action; 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); if (!udev_action || !streq(udev_action, udev_event)) { continue;