summaryrefslogtreecommitdiffstats
path: root/src/libudev/test-udev-device-thread.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libudev/test-udev-device-thread.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/libudev/test-udev-device-thread.c b/src/libudev/test-udev-device-thread.c
index c082fdc..fdf0818 100644
--- a/src/libudev/test-udev-device-thread.c
+++ b/src/libudev/test-udev-device-thread.c
@@ -6,6 +6,7 @@
#include <stdlib.h>
#include "libudev.h"
+#include "tests.h"
#define handle_error_errno(error, msg) \
({ \
@@ -29,8 +30,12 @@ int main(int argc, char *argv[]) {
int r;
loopback = udev_device_new_from_syspath(NULL, "/sys/class/net/lo");
- if (!loopback)
+ if (!loopback) {
+ if (errno == ENODEV)
+ return log_tests_skipped_errno(errno, "Loopback device not found");
+
return handle_error_errno(errno, "Failed to create loopback device object");
+ }
entry = udev_device_get_properties_list_entry(loopback);
udev_list_entry_foreach(e, entry)