From 9f36a8fb381afd99c1a8c46f71521cbb99472b6c Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 13 Apr 2018 15:32:25 +0200 Subject: [PATCH] tmpfiles: add more tests --- test/TEST-22-TMPFILES/test-02.sh | 95 +++++++++++++ test/TEST-22-TMPFILES/test-03.sh | 236 +++++++++++++++++++++++++++++++ test/TEST-22-TMPFILES/test-04.sh | 44 ++++++ test/TEST-22-TMPFILES/test.sh | 2 + 4 files changed, 377 insertions(+) create mode 100755 test/TEST-22-TMPFILES/test-02.sh create mode 100755 test/TEST-22-TMPFILES/test-03.sh create mode 100755 test/TEST-22-TMPFILES/test-04.sh diff --git a/test/TEST-22-TMPFILES/test-02.sh b/test/TEST-22-TMPFILES/test-02.sh new file mode 100755 index 0000000000..fe8b903298 --- /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 - <