]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test-execute: block /sys not /proc
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Mar 2019 14:27:32 +0000 (15:27 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Fri, 15 Mar 2019 14:46:41 +0000 (15:46 +0100)
As explained in the previous commit, blocking /proc can cause us
to go into a long loop or fail the test.

src/test/test-execute.c
test/meson.build
test/test-execute/exec-inaccessiblepaths-sys.service [moved from test/test-execute/exec-inaccessiblepaths-proc.service with 63% similarity]

index 4d44a28a313c9c37cba32c77e2e66faee7c84f17..f59d267776f408161d44b0d883a736a716587507 100644 (file)
@@ -327,7 +327,7 @@ static void test_exec_inaccessiblepaths(Manager *m) {
                 return;
         }
 
-        test(m, "exec-inaccessiblepaths-proc.service", can_unshare ? 0 : EXIT_FAILURE, CLD_EXITED);
+        test(m, "exec-inaccessiblepaths-sys.service", can_unshare ? 0 : EXIT_FAILURE, CLD_EXITED);
 
         if (path_is_read_only_fs("/") > 0) {
                 log_notice("Root directory is readonly, skipping remaining tests in %s", __func__);
index 870f8bc6a74b53ba0b1ccf8ea5daf5f8cec7d8f9..7255c79dcb8ccc92f1be7ae21a842338ffea2f8a 100644 (file)
@@ -67,7 +67,7 @@ test_data_files = '''
         test-execute/exec-ignoresigpipe-no.service
         test-execute/exec-ignoresigpipe-yes.service
         test-execute/exec-inaccessiblepaths-mount-propagation.service
-        test-execute/exec-inaccessiblepaths-proc.service
+        test-execute/exec-inaccessiblepaths-sys.service
         test-execute/exec-ioschedulingclass-best-effort.service
         test-execute/exec-ioschedulingclass-idle.service
         test-execute/exec-ioschedulingclass-none.service
similarity index 63%
rename from test/test-execute/exec-inaccessiblepaths-proc.service
rename to test/test-execute/exec-inaccessiblepaths-sys.service
index ebdb4843d1b276c95725fee73dddd93cf14a19fd..5ff6f3605b1e1acb0c938ac901e26d2f0fb02385 100644 (file)
@@ -2,6 +2,6 @@
 Description=Test to make sure that mount namespace setup works properly with the 'InaccessiblePaths=/proc' option
 
 [Service]
-InaccessiblePaths=/proc
-ExecStart=/bin/sh -x -c 'test "$$(stat -c %%a /proc)" = "0"'
+InaccessiblePaths=/sys
+ExecStart=/bin/sh -x -c 'test "$$(stat -c %%a /sys)" = "0"'
 Type=oneshot