summaryrefslogtreecommitdiffstats
path: root/test/units/testsuite-74.mount.sh
diff options
context:
space:
mode:
authorLuca Boccassi <bluca@debian.org>2023-08-16 03:00:47 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2023-08-21 11:45:15 +0200
commit2322c6c7355a4546930f10fb35e983835c86daeb (patch)
treef08e099ba423e90ee0ad7298597109c849ff88a8 /test/units/testsuite-74.mount.sh
parentnetwork: ndisc - Allow to use ICMP6 rate limit from received RA (diff)
downloadsystemd-2322c6c7355a4546930f10fb35e983835c86daeb.tar.xz
systemd-2322c6c7355a4546930f10fb35e983835c86daeb.zip
sd-mount: allow creating tmpfs
Mount units can do it, but the command line tool cannot, as it needs a valid 'what'. If --tmpfs/-T if passed, parse the argument as 'where' and send a literal 'tmpfs' as the 'what' if not specified.
Diffstat (limited to 'test/units/testsuite-74.mount.sh')
-rwxr-xr-xtest/units/testsuite-74.mount.sh9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/units/testsuite-74.mount.sh b/test/units/testsuite-74.mount.sh
index c4ecfdcada..41c5c8652a 100755
--- a/test/units/testsuite-74.mount.sh
+++ b/test/units/testsuite-74.mount.sh
@@ -140,3 +140,12 @@ systemctl status "$WORK_DIR/mnt"
touch "$WORK_DIR/mnt/hello"
[[ "$(stat -c "%U:%G" "$WORK_DIR/mnt/hello")" == "testuser:testuser" ]]
systemd-umount LABEL=owner-vfat
+
+# tmpfs
+mkdir -p "$WORK_DIR/mnt/foo/bar"
+systemd-mount --tmpfs "$WORK_DIR/mnt/foo"
+test ! -d "$WORK_DIR/mnt/foo/bar"
+touch "$WORK_DIR/mnt/foo/baz"
+systemd-umount "$WORK_DIR/mnt/foo"
+test -d "$WORK_DIR/mnt/foo/bar"
+test ! -e "$WORK_DIR/mnt/foo/baz"