]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-loop-block: return -77 on skip in more places 35593/head
authorLuca Boccassi <luca.boccassi@gmail.com>
Wed, 13 Nov 2024 14:20:34 +0000 (14:20 +0000)
committerLuca Boccassi <luca.boccassi@gmail.com>
Thu, 12 Dec 2024 23:11:29 +0000 (23:11 +0000)
src/test/test-loop-block.c

index e69c0d5caf4a2d2c311fe94be93d7e5a6ca2d9e8..921049c3fbf389f49295f8fe9f766273b1fe58f2 100644 (file)
@@ -224,15 +224,11 @@ static int run(int argc, char *argv[]) {
         dissected = dissected_image_unref(dissected);
 #endif
 
-        if (geteuid() != 0 || have_effective_cap(CAP_SYS_ADMIN) <= 0) {
-                log_tests_skipped("not running privileged");
-                return 0;
-        }
+        if (geteuid() != 0 || have_effective_cap(CAP_SYS_ADMIN) <= 0)
+                return log_tests_skipped("not running privileged");
 
-        if (detect_container() > 0) {
-                log_tests_skipped("Test not supported in a container, requires udev/uevent notifications");
-                return 0;
-        }
+        if (detect_container() > 0)
+                return log_tests_skipped("Test not supported in a container, requires udev/uevent notifications");
 
         assert_se(loop_device_make(fd, O_RDWR, 0, UINT64_MAX, 0, LO_FLAGS_PARTSCAN, LOCK_EX, &loop) >= 0);