summaryrefslogtreecommitdiffstats
path: root/tests/ts/mount
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xtests/ts/mount/fallback10
-rwxr-xr-xtests/ts/mount/fslists2
-rwxr-xr-xtests/ts/mount/fstab-all37
-rwxr-xr-xtests/ts/mount/fstab-bind2
-rwxr-xr-xtests/ts/mount/fstab-broken6
-rwxr-xr-xtests/ts/mount/fstab-btrfs8
-rwxr-xr-xtests/ts/mount/fstab-devname4
-rwxr-xr-xtests/ts/mount/fstab-devname2label2
-rwxr-xr-xtests/ts/mount/fstab-devname2uuid2
-rwxr-xr-xtests/ts/mount/fstab-label6
-rwxr-xr-xtests/ts/mount/fstab-label2devname4
-rwxr-xr-xtests/ts/mount/fstab-label2uuid4
-rwxr-xr-xtests/ts/mount/fstab-loop4
-rwxr-xr-xtests/ts/mount/fstab-none2
-rwxr-xr-xtests/ts/mount/fstab-symlink2
-rwxr-xr-xtests/ts/mount/fstab-uuid6
-rwxr-xr-xtests/ts/mount/fstab-uuid2devname4
-rwxr-xr-xtests/ts/mount/fstab-uuid2label4
-rwxr-xr-xtests/ts/mount/special43
-rwxr-xr-xtests/ts/mount/umount-recursive2
20 files changed, 95 insertions, 59 deletions
diff --git a/tests/ts/mount/fallback b/tests/ts/mount/fallback
index e2a1de7..cbdf449 100755
--- a/tests/ts/mount/fallback
+++ b/tests/ts/mount/fallback
@@ -22,7 +22,7 @@ test_mount_fallback() {
mkdir -p "$MY_SOURCE"
mkdir -p "$TS_MOUNTPOINT"
- "$TS_HELPER_ENOSYS" $2 -- "$TS_CMD_MOUNT" --bind "$MY_SOURCE" "$TS_MOUNTPOINT" \
+ "$TS_CMD_ENOSYS" $2 -- "$TS_CMD_MOUNT" --bind "$MY_SOURCE" "$TS_MOUNTPOINT" \
>> "$TS_OUTPUT" 2>> "$TS_ERRLOG"
[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
@@ -49,7 +49,7 @@ mkdir -p "$MOUNTPOINT"
ts_init_subtest "later-fsopen"
-$TS_HELPER_ENOSYS -s fsopen -- "$TS_CMD_MOUNT" -t foo,bar,ext2 "$DEVICE" "$MOUNTPOINT" \
+$TS_CMD_ENOSYS -s fsopen -- "$TS_CMD_MOUNT" -t foo,bar,ext2 "$DEVICE" "$MOUNTPOINT" \
>> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
mkdir -p ${MOUNTPOINT}/subdir
@@ -58,7 +58,7 @@ ts_finalize_subtest
ts_init_subtest "subdir"
-$TS_HELPER_ENOSYS -s fsopen -s open_tree -- \
+$TS_CMD_ENOSYS -s fsopen -s open_tree -- \
"$TS_CMD_MOUNT" -o X-mount.subdir=subdir "$DEVICE" "$MOUNTPOINT" \
>> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
@@ -69,12 +69,12 @@ ts_finalize_subtest
ts_init_subtest "mount_setattr"
"$TS_CMD_MOUNT" "$DEVICE" "$MOUNTPOINT" >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
-$TS_HELPER_ENOSYS -s mount_setattr -- \
+$TS_CMD_ENOSYS -s mount_setattr -- \
"$TS_CMD_MOUNT" -o remount,ro "$MOUNTPOINT" \
>> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_FINDMNT --kernel --mountpoint "$MOUNTPOINT" --options "ro" &> /dev/null
[ "$?" == "0" ] || ts_die "Cannot find read-only in $MOUNTPOINT in /proc/self/mountinfo"
-$TS_HELPER_ENOSYS -s mount_setattr -- \
+$TS_CMD_ENOSYS -s mount_setattr -- \
"$TS_CMD_MOUNT" --make-slave "$MOUNTPOINT" \
>> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_FINDMNT -n --kernel --mountpoint "$MOUNTPOINT" -o PROPAGATION >> $TS_OUTPUT
diff --git a/tests/ts/mount/fslists b/tests/ts/mount/fslists
index 230186a..6ac72c3 100755
--- a/tests/ts/mount/fslists
+++ b/tests/ts/mount/fslists
@@ -61,7 +61,7 @@ ts_finalize_subtest
ts_init_subtest "more-types-fstab"
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_fstab_add $DEVICE $TS_MOUNTPOINT "foo,bar,ext2"
-$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_fstab_clean
ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $TS_MOUNTPOINT
diff --git a/tests/ts/mount/fstab-all b/tests/ts/mount/fstab-all
index 83e1b63..ad9a7d0 100755
--- a/tests/ts/mount/fstab-all
+++ b/tests/ts/mount/fstab-all
@@ -68,16 +68,15 @@ MOUNTPOINT=$TS_MOUNTPOINT
[ -d "${MOUNTPOINT}D" ] || mkdir -p ${MOUNTPOINT}D
# generic fstab
-MY_FSTAB="$TS_OUTDIR/${TS_TESTNAME}.fstab"
-rm -rf $MY_FSTAB
-echo "${TS_DEVICE}1 ${MOUNTPOINT}A ext2 rw,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}2 ${MOUNTPOINT}B ext2 rw,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}3 ${MOUNTPOINT}C ext2 ro,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}4 ${MOUNTPOINT}D ext4 rw,defaults 0 0" >> $MY_FSTAB
+rm -rf "${TS_FSTAB}"
+echo "${TS_DEVICE}1 ${MOUNTPOINT}A ext2 rw,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}2 ${MOUNTPOINT}B ext2 rw,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}3 ${MOUNTPOINT}C ext2 ro,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}4 ${MOUNTPOINT}D ext4 rw,defaults 0 0" >> "${TS_FSTAB}"
ts_init_subtest "basic"
-$TS_CMD_MOUNT --all --fstab $MY_FSTAB >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab "${TS_FSTAB}" >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
@@ -86,7 +85,7 @@ ts_finalize_subtest
ts_init_subtest "filter-type"
-$TS_CMD_MOUNT --all --fstab $MY_FSTAB -t ext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab "${TS_FSTAB}" -t ext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}D
@@ -95,7 +94,7 @@ ts_finalize_subtest
ts_init_subtest "filter-notype"
-$TS_CMD_MOUNT --all --fstab $MY_FSTAB -t noext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab "${TS_FSTAB}" -t noext4 >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C}
@@ -104,7 +103,7 @@ ts_finalize_subtest
ts_init_subtest "filter-option"
-$TS_CMD_MOUNT --all --fstab $MY_FSTAB -O ro >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab "${TS_FSTAB}" -O ro >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}C
@@ -113,7 +112,7 @@ ts_finalize_subtest
ts_init_subtest "override-option"
-$TS_CMD_MOUNT --all --fstab $MY_FSTAB -o ro >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab "${TS_FSTAB}" -o ro >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
@@ -123,7 +122,7 @@ ts_finalize_subtest
ts_init_subtest "relative-path"
cd "$TS_OUTDIR" > /dev/null
-$TS_CMD_MOUNT --all --fstab $(basename "$MY_FSTAB") >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT --all --fstab $(basename "${TS_FSTAB}") >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
udevadm settle
$TS_CMD_UMOUNT ${MOUNTPOINT}{A,B,C,D}
@@ -135,16 +134,14 @@ ts_finalize_subtest
ts_init_subtest "prefix"
MY_ROOT="$TS_OUTDIR/${TS_TESTNAME}-rootdir"
[ -d "${MY_ROOT}" ] || mkdir -p ${MY_ROOT}
-# sub-test specific fstab
-MY_FSTAB="$TS_OUTDIR/${TS_TESTNAME}.fstab"
-rm -rf $MY_FSTAB
-echo "${TS_DEVICE}1 /foo/A ext2 rw,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}2 /foo/B ext2 rw,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}3 /foo/C ext2 rw,defaults 0 0" >> $MY_FSTAB
-echo "${TS_DEVICE}4 /foo/D ext4 rw,defaults 0 0" >> $MY_FSTAB
+rm -rf "${TS_FSTAB}"
+echo "${TS_DEVICE}1 /foo/A ext2 rw,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}2 /foo/B ext2 rw,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}3 /foo/C ext2 rw,defaults 0 0" >> "${TS_FSTAB}"
+echo "${TS_DEVICE}4 /foo/D ext4 rw,defaults 0 0" >> "${TS_FSTAB}"
# mount all to prefix
$TS_CMD_MOUNT --all \
- --fstab $MY_FSTAB \
+ --fstab "${TS_FSTAB}" \
--target-prefix $MY_ROOT \
-o X-mount.mkdir >> $TS_OUTPUT 2>> $TS_ERRLOG
[ $? == 0 ] || ts_log "mount failed"
diff --git a/tests/ts/mount/fstab-bind b/tests/ts/mount/fstab-bind
index 2c799df..cae016d 100755
--- a/tests/ts/mount/fstab-bind
+++ b/tests/ts/mount/fstab-bind
@@ -20,7 +20,7 @@ ts_fstab_add $MY_SOURCE "$TS_MOUNTPOINT" "none" "bind,default,noauto"
mkdir -p $MY_SOURCE
mkdir -p $TS_MOUNTPOINT
-$TS_CMD_MOUNT $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
$TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null
diff --git a/tests/ts/mount/fstab-broken b/tests/ts/mount/fstab-broken
index 19edc5f..ec4c342 100755
--- a/tests/ts/mount/fstab-broken
+++ b/tests/ts/mount/fstab-broken
@@ -34,11 +34,11 @@ mkdir -p $MNT
ts_fstab_lock
ts_fstab_open
-echo "tmpd $MNT tmpfs" >> /etc/fstab
+echo "tmpd $MNT tmpfs" >> "$TS_FSTAB"
ts_fstab_close
ts_init_subtest "mount"
-$TS_CMD_MOUNT $MNT &> /dev/null
+$TS_CMD_MOUNT -T "$TS_FSTAB" $MNT &> /dev/null
[ "$?" = "0" ] || ts_log "error: mount $MNT"
$TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null
if [ "$?" != "0" ]; then
@@ -57,7 +57,7 @@ ts_finalize_subtest
ts_init_subtest "mount-all"
-$TS_CMD_MOUNT -a &> /dev/null
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a &> /dev/null
[ "$?" = "0" ] || ts_log "error: mount -a"
$TS_CMD_FINDMNT --kernel --mountpoint "$MNT" &> /dev/null
if [ "$?" != "0" ]; then
diff --git a/tests/ts/mount/fstab-btrfs b/tests/ts/mount/fstab-btrfs
index a1003ab..8e76dbb 100755
--- a/tests/ts/mount/fstab-btrfs
+++ b/tests/ts/mount/fstab-btrfs
@@ -94,8 +94,8 @@ ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOLID" "btrfs" "subvolid=$NON_DEFA
ts_fstab_addline "$TS_MOUNTPOINT_SUBVOLID" "$TS_MOUNTPOINT_BIND" "auto" "bind"
ts_fstab_close
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_UMOUNT "$TS_MOUNTPOINT_BIND" >> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_UMOUNT "$TS_MOUNTPOINT_DEFAULT" >> $TS_OUTPUT 2>> $TS_ERRLOG
@@ -124,8 +124,8 @@ ts_fstab_addline "$DEVICE" "$TS_MOUNTPOINT_SUBVOLID" "auto" "subvolid=$NON_DEFAU
ts_fstab_addline "$TS_MOUNTPOINT_SUBVOL/bind-mnt" "$TS_MOUNTPOINT_BIND" "auto" "bind"
ts_fstab_close
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_UMOUNT "$TS_MOUNTPOINT_BIND" >> $TS_OUTPUT 2>> $TS_ERRLOG
$TS_CMD_UMOUNT "$TS_MOUNTPOINT_DEFAULT" >> $TS_OUTPUT 2>> $TS_ERRLOG
diff --git a/tests/ts/mount/fstab-devname b/tests/ts/mount/fstab-devname
index 5b64a32..6ac03b5 100755
--- a/tests/ts/mount/fstab-devname
+++ b/tests/ts/mount/fstab-devname
@@ -42,13 +42,13 @@ MOUNTPOINT=$TS_MOUNTPOINT
ts_fstab_add $DEVICE
ts_init_subtest "mountpoint"
-$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE || >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "device-name"
-$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-devname2label b/tests/ts/mount/fstab-devname2label
index 1d85621..44066e1 100755
--- a/tests/ts/mount/fstab-devname2label
+++ b/tests/ts/mount/fstab-devname2label
@@ -41,7 +41,7 @@ ts_device_has "LABEL" $LABEL $DEVICE \
ts_fstab_add "LABEL=$LABEL"
ts_udevadm_settle "$DEVICE" "LABEL"
-$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
diff --git a/tests/ts/mount/fstab-devname2uuid b/tests/ts/mount/fstab-devname2uuid
index 8105fa0..5039591 100755
--- a/tests/ts/mount/fstab-devname2uuid
+++ b/tests/ts/mount/fstab-devname2uuid
@@ -39,7 +39,7 @@ UUID=$(ts_uuid_by_devname "$DEVICE") || ts_die "Cannot find UUID on $DEVICE"
ts_fstab_add "UUID=$UUID"
ts_udevadm_settle "$DEVICE" "UUID"
-$TS_CMD_MOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_die "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE || ts_die "Cannot umount $DEVICE"
diff --git a/tests/ts/mount/fstab-label b/tests/ts/mount/fstab-label
index 4b23e7f..a3cc06d 100755
--- a/tests/ts/mount/fstab-label
+++ b/tests/ts/mount/fstab-label
@@ -42,19 +42,19 @@ ts_fstab_add "LABEL=$LABEL"
ts_udevadm_settle "$DEVICE" "LABEL"
ts_init_subtest "no-option"
-$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "L-option"
-$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "LABEL-option"
-$TS_CMD_MOUNT LABEL=$LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" LABEL=$LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-label2devname b/tests/ts/mount/fstab-label2devname
index 75ca05e..fddbfa0 100755
--- a/tests/ts/mount/fstab-label2devname
+++ b/tests/ts/mount/fstab-label2devname
@@ -44,13 +44,13 @@ ts_udevadm_settle "$DEVICE" "LABEL"
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_init_subtest "L-option"
-$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "LABEL-option"
-$TS_CMD_MOUNT "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-label2uuid b/tests/ts/mount/fstab-label2uuid
index 4bfcae4..927cde9 100755
--- a/tests/ts/mount/fstab-label2uuid
+++ b/tests/ts/mount/fstab-label2uuid
@@ -46,13 +46,13 @@ ts_udevadm_settle "$DEVICE" "LABEL" "UUID"
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_init_subtest "L-option"
-$TS_CMD_MOUNT -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -L $LABEL >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "LABEL-option"
-$TS_CMD_MOUNT "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" "LABEL=$LABEL" >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-loop b/tests/ts/mount/fstab-loop
index 7cc589f..0541e3a 100755
--- a/tests/ts/mount/fstab-loop
+++ b/tests/ts/mount/fstab-loop
@@ -39,10 +39,10 @@ ts_fstab_lock
ts_fstab_open
ts_fstab_addline "$IMG" "$TS_MOUNTPOINT-1" "ext2" "loop"
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_fstab_addline "$IMG" "$TS_MOUNTPOINT-2" "ext2" "loop"
-$TS_CMD_MOUNT -a >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -a >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_fstab_close
diff --git a/tests/ts/mount/fstab-none b/tests/ts/mount/fstab-none
index 6a4d05b..95daa6c 100755
--- a/tests/ts/mount/fstab-none
+++ b/tests/ts/mount/fstab-none
@@ -17,7 +17,7 @@ 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
+$TS_CMD_MOUNT -T "$TS_FSTAB" $TS_MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
[ "$?" = "0" ] || ts_log "error: mount $TS_MOUNTPOINT"
$TS_CMD_FINDMNT --mountpoint "$TS_MOUNTPOINT" &> /dev/null
diff --git a/tests/ts/mount/fstab-symlink b/tests/ts/mount/fstab-symlink
index 4d3e37b..6d419f9 100755
--- a/tests/ts/mount/fstab-symlink
+++ b/tests/ts/mount/fstab-symlink
@@ -46,7 +46,7 @@ ln -s $DEVICE $LINKNAME
ts_fstab_add $LINKNAME $TS_MOUNTPOINT "auto" "defaults,user"
# variant A) -- UID=0
-$TS_CMD_MOUNT $LINKNAME >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $LINKNAME >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_die "A) Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $LINKNAME || ts_die "A) Cannot umount $LINKNAME"
diff --git a/tests/ts/mount/fstab-uuid b/tests/ts/mount/fstab-uuid
index 03917b7..f51bb29 100755
--- a/tests/ts/mount/fstab-uuid
+++ b/tests/ts/mount/fstab-uuid
@@ -42,19 +42,19 @@ ts_fstab_add "UUID=$UUID"
ts_udevadm_settle "$DEVICE" "UUID"
ts_init_subtest "no-option"
-$TS_CMD_MOUNT $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" $MOUNTPOINT >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "U-option"
-$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "UUID-option"
-$TS_CMD_MOUNT UUID=$UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" UUID=$UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-uuid2devname b/tests/ts/mount/fstab-uuid2devname
index 9bf165e..2b338ac 100755
--- a/tests/ts/mount/fstab-uuid2devname
+++ b/tests/ts/mount/fstab-uuid2devname
@@ -42,13 +42,13 @@ ts_udevadm_settle "$DEVICE" "UUID"
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_init_subtest "U-option"
-$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "UUID-option"
-$TS_CMD_MOUNT "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/fstab-uuid2label b/tests/ts/mount/fstab-uuid2label
index de10ff0..02eb6b9 100755
--- a/tests/ts/mount/fstab-uuid2label
+++ b/tests/ts/mount/fstab-uuid2label
@@ -45,13 +45,13 @@ ts_udevadm_settle "$DEVICE" "LABEL" "UUID"
[ -d "$TS_MOUNTPOINT" ] || mkdir -p $TS_MOUNTPOINT
ts_init_subtest "U-option"
-$TS_CMD_MOUNT -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" -U $UUID >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_finalize_subtest
ts_init_subtest "UUID-option"
-$TS_CMD_MOUNT "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
+$TS_CMD_MOUNT -T "$TS_FSTAB" "UUID=$UUID" >> $TS_OUTPUT 2>> $TS_ERRLOG
ts_is_mounted $DEVICE || ts_log "Cannot find $DEVICE in /proc/mounts"
$TS_CMD_UMOUNT $DEVICE >> $TS_OUTPUT 2>>$TS_ERRLOG
ts_finalize_subtest
diff --git a/tests/ts/mount/special b/tests/ts/mount/special
index 359d8aa..1771f5a 100755
--- a/tests/ts/mount/special
+++ b/tests/ts/mount/special
@@ -23,6 +23,7 @@ MOUNTER="/sbin/mount.mytest"
ts_init "$*"
ts_check_test_command "$TS_CMD_MOUNT"
+ts_check_test_command "$TS_CMD_UMOUNT"
ts_skip_nonroot
@@ -55,7 +56,45 @@ ts_init_subtest "username"
$TS_CMD_MOUNT -t mytest -ouser=name,abc /foo /bar &> $TS_OUTPUT
ts_finalize_subtest
-rm -f $MOUNTER
-ts_finalize
+ts_init_subtest "missing-options"
+grep -q 'nodev[[:space:]]*tmpfs' /proc/filesystems
+if [ "$?" == "0" ]; then
+cat > $MOUNTER <<EOF
+#!/bin/bash
+# This util-linux regression test component
+# It's safe to remove me...
+#
+exec $TS_CMD_MOUNT -t tmpfs -i "\$1" "\$2" -o x-foo=123
+EOF
+ chmod +x $MOUNTER
+
+ mountpoint="$TS_OUTDIR/mnt"
+ mkdir -p "$mountpoint"
+ export LIBMOUNT_UTAB=$TS_OUTDIR/utab
+ rm -f $LIBMOUNT_UTAB
+ echo -n "" > $LIBMOUNT_UTAB
+
+ $TS_CMD_MOUNT -t mytest -o x-bar=BAR /foo "$mountpoint" &> $TS_OUTPUT
+ udevadm settle
+
+ grep -q "$mountpoint" /proc/mounts
+ if [ "$?" == "0" ]; then
+ cat "$LIBMOUNT_UTAB" \
+ | grep "$mountpoint" \
+ | sed -e "s|$mountpoint|/mountpoint|g" \
+ -e 's/ID=[[:digit:]]* //g' \
+ &> $TS_OUTPUT
+ $TS_CMD_UMOUNT "$mountpoint"
+ unset LIBMOUNT_UTAB
+ rm -f $MOUNTER
+ ts_finalize_subtest
+ else
+ ts_skip_subtest "tmpfs not mounted"
+ fi
+else
+ ts_skip_subtest "tmpfs unsupported"
+fi
+
+ts_finalize
diff --git a/tests/ts/mount/umount-recursive b/tests/ts/mount/umount-recursive
index 8b1fd47..94e3680 100755
--- a/tests/ts/mount/umount-recursive
+++ b/tests/ts/mount/umount-recursive
@@ -86,7 +86,7 @@ $TS_CMD_MOUNT ${TS_DEVICE}4 $TS_MOUNTPOINT/mntB/mntD >> $TS_OUTPUT 2>> $TS_ERRLO
ts_log "E) Mount child-bind"
mkdir -p $TS_MOUNTPOINT/bindC
-$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB/mntC $TS_MOUNTPOINT/bindC &> /dev/nul
+$TS_CMD_MOUNT --bind $TS_MOUNTPOINT/mntB/mntC $TS_MOUNTPOINT/bindC &> /dev/null
ts_log "F) Mount mountpoint-bind"
$TS_CMD_MOUNT --bind $TS_MOUNTPOINT $TS_MOUNTPOINT &> /dev/null