hwdb: fix screen rotation for EXO Wings 2in1 w1125 (#36283)
[systemd.io.git] / test / test-execute / exec-temporaryfilesystem-ro.service
blob0a4b0f25521c39e5f0cb5975f711f10d40a2b174
1 # SPDX-License-Identifier: LGPL-2.1-or-later
2 [Unit]
3 Description=Test for TemporaryFileSystem with read-only mode
5 [Service]
6 Type=oneshot
8 # Check directories exist
9 ExecStart=sh -c 'test -d /var/test-exec-temporaryfilesystem/rw && test -d /var/test-exec-temporaryfilesystem/ro'
11 # Check TemporaryFileSystem= are empty
12 ExecStart=sh -c 'for i in $$(ls -A /var); do test $$i = test-exec-temporaryfilesystem || false; done'
14 # Check default mode
15 ExecStart=sh -x -c 'test "$$(stat -c %%a /var)" = "755"'
17 # Cannot create a file in /var
18 ExecStart=sh -c '! touch /var/hoge'
20 # Create a file in /var/test-exec-temporaryfilesystem/rw
21 ExecStart=sh -c 'touch /var/test-exec-temporaryfilesystem/rw/thisisasimpletest-temporaryfilesystem'
23 # Then, the file can be access through /tmp
24 ExecStart=sh -c 'test -f /tmp/thisisasimpletest-temporaryfilesystem'
26 # Also, through /var/test-exec-temporaryfilesystem/ro
27 ExecStart=sh -c 'test -f /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
29 # The file cannot modify through /var/test-exec-temporaryfilesystem/ro
30 ExecStart=sh -c '! touch /var/test-exec-temporaryfilesystem/ro/thisisasimpletest-temporaryfilesystem'
32 # Cleanup
33 ExecStart=sh -c 'rm /tmp/thisisasimpletest-temporaryfilesystem'
35 TemporaryFileSystem=/var:ro
36 BindPaths=/tmp:/var/test-exec-temporaryfilesystem/rw
37 BindReadOnlyPaths=/tmp:/var/test-exec-temporaryfilesystem/ro