summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-50.sh
diff options
context:
space:
mode:
authorDaan De Meyer <daan.j.demeyer@gmail.com>2023-06-20 13:54:07 +0200
committerDaan De Meyer <daan.j.demeyer@gmail.com>2023-06-21 12:48:48 +0200
commitcdad1f14070d83c477cc120ee76b6ca7ebb4bb07 (patch)
tree026d494e1411517304f2785b09368a9321f7977d /test/units/testsuite-50.sh
parenttest: Add touch into minimal verity test image (diff)
downloadsystemd-cdad1f14070d83c477cc120ee76b6ca7ebb4bb07.tar.xz
systemd-cdad1f14070d83c477cc120ee76b6ca7ebb4bb07.zip
test: Add RootEphemeral= integration test
Diffstat (limited to 'test/units/testsuite-50.sh')
-rwxr-xr-xtest/units/testsuite-50.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh
index cdb7c0043b..9222fc7010 100755
--- a/test/units/testsuite-50.sh
+++ b/test/units/testsuite-50.sh
@@ -528,6 +528,18 @@ systemd-confext status
systemd-confext unmerge
rm -rf /run/confexts/
+unsquashfs -no-xattrs -d /tmp/img "${image}.raw"
+systemd-run --unit=test-root-ephemeral \
+ -p RootDirectory=/tmp/img \
+ -p RootEphemeral=yes \
+ -p Type=exec \
+ bash -c "touch /abc && sleep infinity"
+test -n "$(ls -A /var/lib/systemd/ephemeral-trees)"
+systemctl stop test-root-ephemeral
+# shellcheck disable=SC2016
+timeout 10 bash -c 'while ! test -z "$(ls -A /var/lib/systemd/ephemeral-trees)"; do sleep .5; done'
+test ! -f /tmp/img/abc
+
echo OK >/testok
exit 0