From: Franck Bui Date: Fri, 13 Apr 2018 13:32:25 +0000 (+0200) Subject: tmpfiles: add more tests X-Git-Tag: v240~864^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9f36a8fb381afd99c1a8c46f71521cbb99472b6c;p=thirdparty%2Fsystemd.git tmpfiles: add more tests --- diff --git a/test/TEST-22-TMPFILES/test-02.sh b/test/TEST-22-TMPFILES/test-02.sh new file mode 100755 index 00000000000..fe8b9032983 --- /dev/null +++ b/test/TEST-22-TMPFILES/test-02.sh @@ -0,0 +1,95 @@ +#! /bin/bash +# +# Basic tests for types creating directories +# + +set -e +set -x + +rm -fr /tmp/{d,D,e} +mkdir /tmp/{d,D,e} + +# +# 'd' +# +mkdir /tmp/d/2 +chmod 777 /tmp/d/2 + +systemd-tmpfiles --create - </tmp/F/truncated +echo "This should be truncated" >/tmp/F/truncated-with-content + +systemd-tmpfiles --create - </tmp/F/rw-fs/foo +! systemd-tmpfiles --create - </tmp/F/rw-fs/foo +! systemd-tmpfiles --create - < fails. +! systemd-tmpfiles --create - <