From 378c18e5f024ac5a8aef4cb40d7c9aa9633d144c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 7 Apr 2024 16:30:35 +0200 Subject: Adding upstream version 2.38.1. Signed-off-by: Daniel Baumann --- tests/ts/mount/fstab-none | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100755 tests/ts/mount/fstab-none (limited to 'tests/ts/mount/fstab-none') diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none new file mode 100755 index 0000000..e2ed0af --- /dev/null +++ b/tests/ts/mount/fstab-none @@ -0,0 +1,37 @@ +#!/bin/bash + +TS_TOPDIR="${0%/*}/../.." +TS_DESC="none" + +. $TS_TOPDIR/functions.sh +ts_init "$*" + +ts_check_test_command "$TS_CMD_MOUNT" +ts_check_test_command "$TS_CMD_UMOUNT" +ts_check_test_command "$TS_CMD_FINDMNT" + +ts_skip_nonroot + +ts_fstab_add "none" "$TS_MOUNTPOINT" "tmpfs" "rw,nosuid,nodev,relatime" + +mkdir -p $TS_MOUNTPOINT + +$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG +[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT" + +$TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null +[ $? -eq 0 ] || ts_die "Not found target (mount failed?)" + +$TS_CMD_FINDMNT --source "none" --mountpoint "$TS_MOUNTPOINT" &> /dev/null +[ $? -eq 0 ] || ts_die "Not found source and target" + +$TS_CMD_UMOUNT $TS_MOUNTPOINT || ts_die "Cannot umount $TS_MOUNTPOINT" + +# for old systems with mtab and /sbin/mount.tmpfs +/bin/umount --fake "$TS_MOUNTPOINT" &> /dev/null + +ts_fstab_clean + +ts_log "Success" +ts_finalize + -- cgit v1.2.3