diff options
author | Alan Jenkins <alan.christopher.jenkins@gmail.com> | 2018-08-29 23:36:37 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2018-09-01 10:22:14 +0200 |
commit | ad8e66dcc485425da925a9ef99e911c6e9d8ee5b (patch) | |
tree | b0b8a61dd5f778e27e9e77e29b05366581883391 /test/test-execute/exec-temporaryfilesystem-rw.service | |
parent | namespace: don't try to remount superblocks (diff) | |
download | systemd-ad8e66dcc485425da925a9ef99e911c6e9d8ee5b.tar.xz systemd-ad8e66dcc485425da925a9ef99e911c6e9d8ee5b.zip |
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).
Diffstat (limited to 'test/test-execute/exec-temporaryfilesystem-rw.service')
-rw-r--r-- | test/test-execute/exec-temporaryfilesystem-rw.service | 3 |
1 files changed, 3 insertions, 0 deletions
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 |