summaryrefslogtreecommitdiff
path: root/src/test/test-execute.c
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2022-05-17 07:06:39 +0900
committerDaan De Meyer <daan.j.demeyer@gmail.com>2022-05-17 10:50:33 +0200
commitbfd671061cce0c09aeb168c555b17b004b8bf515 (patch)
tree389cdaabbfb8d14f5964d999cc24588a2869cc66 /src/test/test-execute.c
parent9b7c8253f9d396edcee0dac4e8155ae1dac93bc4 (diff)
downloadsystemd-bfd671061cce0c09aeb168c555b17b004b8bf515.tar.gz
test-execute: skip one more test when PID1 is not systemd
Fixes #23332.
Diffstat (limited to 'src/test/test-execute.c')
-rw-r--r--src/test/test-execute.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c
index 6fce05bb58..82e4cf5e54 100644
--- a/src/test/test-execute.c
+++ b/src/test/test-execute.c
@@ -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);
}