From ad8e66dcc485425da925a9ef99e911c6e9d8ee5b Mon Sep 17 00:00:00 2001 From: Alan Jenkins Date: Wed, 29 Aug 2018 22:36:37 +0100 Subject: namespace: fix mode for TemporaryFileSystem= ... when no mount options are passed. Change the code, to avoid the following failure in the newly added tests: exec-temporaryfilesystem-rw.service: Executing: /usr/bin/sh -x -c '[ "$(stat -c %a /var)" == 755 ]' ++ stat -c %a /var + '[' 1777 == 755 ']' Received SIGCHLD from PID 30364 (sh). Child 30364 (sh) died (code=exited, status=1/FAILURE) (And I spotted an opportunity to use TAKE_PTR() at the end). --- test/test-execute/exec-temporaryfilesystem-rw.service | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/test-execute/exec-temporaryfilesystem-rw.service') diff --git a/test/test-execute/exec-temporaryfilesystem-rw.service b/test/test-execute/exec-temporaryfilesystem-rw.service index 379ad066fb..bb830595bc 100644 --- a/test/test-execute/exec-temporaryfilesystem-rw.service +++ b/test/test-execute/exec-temporaryfilesystem-rw.service @@ -10,6 +10,9 @@ ExecStart=test -d /var/test-exec-temporaryfilesystem/rw -a -d /var/test-exec-tem # Check TemporaryFileSystem= are empty ExecStart=sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done' +# Check default mode +ExecStart=sh -x -c 'test "$$(stat -c %%a /var)" = "755"' + # Create a file in /var ExecStart=touch /var/hoge -- cgit v1.2.3