]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: skip one more test when PID1 is not systemd
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 16 May 2022 22:06:39 +0000 (07:06 +0900)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 17 May 2022 08:50:33 +0000 (10:50 +0200)
Fixes #23332.

src/test/test-execute.c

index 6fce05bb58f31eeea18b19a7799ce64f7bff30fa..82e4cf5e54d413c9dfacf89249bbc852e2cb4dcd 100644 (file)
@@ -1107,6 +1107,12 @@ static void test_exec_condition(Manager *m) {
 }
 
 static void test_exec_umask_namespace(Manager *m) {
+        /* exec-specifier-credentials-dir.service creates /run/credentials and enables implicit
+         * InaccessiblePath= for the directory for all later services with mount namespace. */
+        if (!is_inaccessible_available()) {
+                log_notice("Testing without inaccessible, skipping %s", __func__);
+                return;
+        }
         test(m, "exec-umask-namespace.service", can_unshare ? 0 : EXIT_NAMESPACE, CLD_EXITED);
 }