test_sd_device_enumerator_filter_subsystem hangs forever in OBS builds,
as it waits for the udev queue to be drained. But this is not a booted
system, with systemd and udev, so nothing will do that.
Skip the test in that case.
#include <fcntl.h>
#include <unistd.h>
+#include "sd-daemon.h"
#include "sd-event.h"
#include "capability-util.h"
return;
}
+ /* The rest of this test depends on a full booted system with a working udev and so on */
+ if (!sd_booted())
+ return (void) log_tests_skipped("Test requires fully booted system with udev/etc, skipping to avoid hanging forever.");
+
_cleanup_(sd_event_unrefp) sd_event *event = NULL;
ASSERT_OK(sd_event_default(&event));
ASSERT_OK(sd_event_add_inotify(event, NULL, "/run/udev" , IN_DELETE, on_inotify, NULL));