diff options
author | Haochen Tong <i@hexchain.org> | 2023-06-14 17:55:56 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2023-06-15 13:12:24 +0200 |
commit | adeff822348e7b3dbdcc3dbdf274609fd1209091 (patch) | |
tree | 52bb1aefa9ffd5a89cf702d62e08feba190a7f59 /src/test/test-execute.c | |
parent | kernel-install: skip to read /etc/machine-info in test (diff) | |
download | systemd-adeff822348e7b3dbdcc3dbdf274609fd1209091.tar.xz systemd-adeff822348e7b3dbdcc3dbdf274609fd1209091.zip |
execute: fix the condition of private mounts for user namespacing
Follow-up for: 6ef721cbc7dadee4ae878ecf0076d87e57233908
Diffstat (limited to '')
-rw-r--r-- | src/test/test-execute.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/test/test-execute.c b/src/test/test-execute.c index a63afa873b..b2721a0c7b 100644 --- a/src/test/test-execute.c +++ b/src/test/test-execute.c @@ -448,9 +448,9 @@ static void test_exec_privatedevices(Manager *m) { } test(m, "exec-privatedevices-yes-capability-mknod.service", can_unshare || MANAGER_IS_SYSTEM(m) ? 0 : EXIT_NAMESPACE, CLD_EXITED); - test(m, "exec-privatedevices-no-capability-mknod.service", 0, CLD_EXITED); + test(m, "exec-privatedevices-no-capability-mknod.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_FAILURE, CLD_EXITED); test(m, "exec-privatedevices-yes-capability-sys-rawio.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_NAMESPACE, CLD_EXITED); - test(m, "exec-privatedevices-no-capability-sys-rawio.service", 0, CLD_EXITED); + test(m, "exec-privatedevices-no-capability-sys-rawio.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_FAILURE, CLD_EXITED); } static void test_exec_protecthome(Manager *m) { @@ -480,7 +480,7 @@ static void test_exec_protectkernelmodules(Manager *m) { return; } - test(m, "exec-protectkernelmodules-no-capabilities.service", 0, CLD_EXITED); + test(m, "exec-protectkernelmodules-no-capabilities.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_FAILURE, CLD_EXITED); test(m, "exec-protectkernelmodules-yes-capabilities.service", MANAGER_IS_SYSTEM(m) ? 0 : EXIT_NAMESPACE, CLD_EXITED); test(m, "exec-protectkernelmodules-yes-mount-propagation.service", can_unshare ? 0 : MANAGER_IS_SYSTEM(m) ? EXIT_FAILURE : EXIT_NAMESPACE, CLD_EXITED); } @@ -1118,12 +1118,12 @@ static void test_exec_unsetenvironment(Manager *m) { } static void test_exec_specifier(Manager *m) { - test(m, "exec-specifier.service", can_unshare || MANAGER_IS_SYSTEM(m) ? 0 : EXIT_FAILURE, CLD_EXITED); + test(m, "exec-specifier.service", 0, CLD_EXITED); if (MANAGER_IS_SYSTEM(m)) test(m, "exec-specifier-system.service", 0, CLD_EXITED); else test(m, "exec-specifier-user.service", 0, CLD_EXITED); - test(m, "exec-specifier@foo-bar.service", can_unshare || MANAGER_IS_SYSTEM(m) ? 0 : EXIT_FAILURE, CLD_EXITED); + test(m, "exec-specifier@foo-bar.service", 0, CLD_EXITED); test(m, "exec-specifier-interpolation.service", 0, CLD_EXITED); } |