From: Lennart Poettering Date: Fri, 7 Feb 2025 12:46:11 +0000 (+0100) Subject: ci: test new logic X-Git-Tag: v258-rc1~1299^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a34ce4842b5deafd3ea6654e482d27684efc2f91;p=thirdparty%2Fsystemd.git ci: test new logic --- diff --git a/test/units/TEST-74-AUX-UTILS.mount.sh b/test/units/TEST-74-AUX-UTILS.mount.sh index ecfdb0640fa..85539452a0c 100755 --- a/test/units/TEST-74-AUX-UTILS.mount.sh +++ b/test/units/TEST-74-AUX-UTILS.mount.sh @@ -39,3 +39,21 @@ systemd-mount --type=overlay --options="lowerdir=/etc,upperdir=$WORK_DIR/upper,w touch "$WORK_DIR/overlay/foo" test -e "$WORK_DIR/upper/foo" systemd-umount "$WORK_DIR/overlay" + +# Validate that we cannot mount through a symlink or .. +mkdir "$WORK_DIR"/flurb +ln -s flurb "$WORK_DIR"/knarb +systemd-mount --canonicalize=no --tmpfs "$WORK_DIR"/flurb/shlum +systemd-umount "$WORK_DIR/"/flurb/shlum +(! systemd-mount --canonicalize=no --tmpfs "$WORK_DIR"/knarb/shlum) +systemd-mount --canonicalize=yes --tmpfs "$WORK_DIR"/knarb/shlum +systemd-umount "$WORK_DIR/"/flurb/shlum +(! systemd-mount --canonicalize=no --tmpfs "$WORK_DIR"/flurb/../flurb/shlum) +systemd-mount --canonicalize=yes --tmpfs "$WORK_DIR"/flurb/../flurb/shlum +systemd-umount "$WORK_DIR/"/flurb/shlum + +# Validate that we can correctly create dir and reg files inodes if needed +systemd-mount --tmpfs "$WORK_DIR"/flurb/shlum/some/more/dirs +systemd-umount "$WORK_DIR/"/flurb/shlum/some/more/dirs +systemd-mount /bin/ls "$WORK_DIR"/flurb/shlum/some/more/dirs/file -o bind +systemd-umount "$WORK_DIR/"/flurb/shlum/some/more/dirs/file