diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-12 03:50:40 +0000 |
commit | fc53809803cd2bc2434e312b19a18fa36776da12 (patch) | |
tree | b4b43bd6538f51965ce32856e9c053d0f90919c8 /src/libudev/test-udev-device-thread.c | |
parent | Adding upstream version 255.5. (diff) | |
download | systemd-fc53809803cd2bc2434e312b19a18fa36776da12.tar.xz systemd-fc53809803cd2bc2434e312b19a18fa36776da12.zip |
Adding upstream version 256.upstream/256
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/libudev/test-udev-device-thread.c')
-rw-r--r-- | src/libudev/test-udev-device-thread.c | 7 |
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) |