summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@gmail.com>2022-07-06 01:29:04 -0400
committerKent Overstreet <kent.overstreet@gmail.com>2022-07-07 23:52:08 -0400
commit388690c97320591d826d0ce995f8602783d38560 (patch)
tree689dc8c31eb144eaa90f4f6d0b3e082b71d2b2a4
parentdd2dc3fee02b79aca699c82e0ff912abf19e1263 (diff)
Always pass -t option to mount
Mount occasionally returns and error while actually succeeding if we don't specify the filesystem type. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
-rwxr-xr-xlib/testrunner2
-rw-r--r--tests/bcachefs/nfs.ktest2
-rw-r--r--tests/bcachefs/quota.ktest4
-rw-r--r--tests/bcachefs/single_device.ktest45
-rw-r--r--tests/bcachefs/subvol.ktest2
-rw-r--r--tests/bcachefs/units.ktest2
-rw-r--r--tests/xfstests.sh2
7 files changed, 28 insertions, 31 deletions
diff --git a/lib/testrunner b/lib/testrunner
index 35bbf14..7797a8f 100755
--- a/lib/testrunner
+++ b/lib/testrunner
@@ -212,5 +212,3 @@ if [[ $ret = 0 ]]; then
else
echo "TEST FAILED"
fi
-
-exit 0
diff --git a/tests/bcachefs/nfs.ktest b/tests/bcachefs/nfs.ktest
index 51a3785..2717884 100644
--- a/tests/bcachefs/nfs.ktest
+++ b/tests/bcachefs/nfs.ktest
@@ -19,7 +19,7 @@ test_nfs()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /export2
+ mount -t bcachefs /dev/sdb /export2
echo "/export1 *(rw,insecure,no_root_squash,no_subtree_check)" >> /etc/exports
echo "/export2 *(rw,insecure,no_root_squash,no_subtree_check)" >> /etc/exports
diff --git a/tests/bcachefs/quota.ktest b/tests/bcachefs/quota.ktest
index 261600f..5ae7dc0 100644
--- a/tests/bcachefs/quota.ktest
+++ b/tests/bcachefs/quota.ktest
@@ -51,7 +51,7 @@ test_usrquota()
/dev/sdb >/dev/null
fi
- mount -o usrquota,grpquota,prjquota /dev/sdb /mnt
+ mount -t bcachefs -o usrquota,grpquota,prjquota /dev/sdb /mnt
repquota -s /mnt
@@ -105,7 +105,7 @@ test_prjquota()
--errors=panic \
/dev/sdb >/dev/null
- mount -o usrquota,grpquota,prjquota /dev/sdb /mnt
+ mount -t bcachefs -o usrquota,grpquota,prjquota /dev/sdb /mnt
repquota -vP /mnt
mkdir /mnt/q1
diff --git a/tests/bcachefs/single_device.ktest b/tests/bcachefs/single_device.ktest
index c5dc792..20e24e0 100644
--- a/tests/bcachefs/single_device.ktest
+++ b/tests/bcachefs/single_device.ktest
@@ -330,7 +330,7 @@ test_fcollapse()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
dd if=/dev/zero of=/mnt/foo bs=4k count=4 oflag=direct
@@ -495,7 +495,7 @@ test_lz4_buffered()
--errors=panic \
--compression=lz4 \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
echo starting copy
cp -rx / /mnt
@@ -532,7 +532,7 @@ disabled_test_background_compression()
--errors=panic \
--background_compression=zstd \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
echo zstd > /sys/fs/bcachefs/*/options/background_compression
run_fio_randrw
}
@@ -613,7 +613,7 @@ run_copygc_torture()
--data_checksum=none \
"$@" /dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
fill_device /mnt/fiotest
@@ -761,7 +761,7 @@ test_quota()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount -o usrquota,grpquota,prjquota /dev/sdb /mnt
+ mount -t bcachefs -o usrquota,grpquota,prjquota /dev/sdb /mnt
loops=$((($ktest_priority + 1) * 4))
@@ -783,7 +783,7 @@ test_nfs()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /export2
+ mount -t bcachefs /dev/sdb /export2
echo "/export1 *(ro,insecure,all_squash,no_subtree_check)" >> /etc/exports
echo "/export2 *(ro,insecure,all_squash,no_subtree_check)" >> /etc/exports
@@ -814,7 +814,7 @@ test_suspend()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
if false; then
run_dbench
@@ -836,7 +836,7 @@ test_writelog()
bcachefs format -f --btree_node_size=16k --errors=panic /dev/mapper/log
dmsetup message log 0 mark mkfs
- mount /dev/mapper/log /mnt
+ mount -t bcachefs /dev/mapper/log /mnt
fs_mark -v -n 10000 -s 4096 -k -S 0 -D 1000 -N 1000 -d /mnt -t 10
umount /mnt
@@ -856,7 +856,7 @@ test_writelog()
prev=$(( $e + 1 ))
dmsetup create snap --table "0 $(blockdev --getsz /dev/sdb) snapshot /dev/sdb /dev/sdd N 8"
- mount -o ro /dev/mapper/snap /mnt
+ mount -t bcachefs -o ro /dev/mapper/snap /mnt
umount /mnt
dmsetup remove snap
done
@@ -962,7 +962,7 @@ test_offline_resize_lv_ext4()
mkfs.ext4 $dev
- mount $dev /mnt
+ mount -t bcachefs $dev /mnt
df -h /mnt
cat /proc/mounts
@@ -971,7 +971,7 @@ test_offline_resize_lv_ext4()
df -h /mnt
umount /mnt
- mount $dev /mnt
+ mount -t bcachefs $dev /mnt
df -h /mnt
umount /mnt
@@ -1050,10 +1050,10 @@ migrate_from_fs()
if [[ $fstype = ext4 ]]; then
run_quiet "" mkfs.$fstype -F /dev/sdb
- mount -o user_xattr /dev/sdb /mnt
+ mount -t $fstype -o user_xattr /dev/sdb /mnt
else
run_quiet "" mkfs.$fstype -f /dev/sdb
- mount /dev/sdb /mnt
+ mount -t $fstype /dev/sdb /mnt
fi
cp -a /usr /mnt
@@ -1134,7 +1134,7 @@ d_test_init_faults()
/dev/sdb
# put some data on the filesystem
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
run_fio_randrw
# dbench would be better, create a directory structure
@@ -1164,7 +1164,7 @@ d_test_meta_write_faults()
meta_write_fault_fn()
{
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
(sleep 2; set_faults "$1 enable") &
# Should fail due to read only cache set
@@ -1183,7 +1183,7 @@ test_long_name()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
local i=1
local n="1"
@@ -1202,7 +1202,7 @@ test_many_files()
run_quiet "" bcachefs format -f \
--errors=panic \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
for i in {1..1000}; do
touch /mnt/$i
@@ -1210,7 +1210,7 @@ test_many_files()
umount /mnt
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
umount /mnt
}
@@ -1221,7 +1221,7 @@ disabled_test_invalid_keys()
run_quiet "" bcachefs format -f \
--errors=continue \
/dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
for i in {1..1000}; do
touch /mnt/$i
@@ -1229,7 +1229,7 @@ disabled_test_invalid_keys()
umount /mnt
- mount -o fix_errors /dev/sdb /mnt
+ mount -t bcachefs -o fix_errors /dev/sdb /mnt
umount /mnt
echo 0 > /sys/module/bcachefs/parameters/inject_invalid_keys
@@ -1364,9 +1364,8 @@ test_mount_twice()
mkdir -p /mnt/1 /mnt/2
#run_quiet "" bcachefs format -f /dev/sdb
mkfs.ext2 /dev/sdb
- mount /dev/sdb /mnt/1
- mount /dev/sdb /mnt/2
- exit
+ mount -t ext2 /dev/sdb /mnt/1
+ mount -t ext2 /dev/sdb /mnt/2
umount /mnt/1
umount /mnt/2
diff --git a/tests/bcachefs/subvol.ktest b/tests/bcachefs/subvol.ktest
index 39c8cde..8d3b00c 100644
--- a/tests/bcachefs/subvol.ktest
+++ b/tests/bcachefs/subvol.ktest
@@ -30,7 +30,7 @@ test_snapshots_simple()
umount /mnt
sleep 0.2
bcachefs fsck -n /dev/sdb
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
echo "deleting snap-$i"
bcachefs subvolume delete /mnt/snap-$i
diff --git a/tests/bcachefs/units.ktest b/tests/bcachefs/units.ktest
index 100b2c5..44412da 100644
--- a/tests/bcachefs/units.ktest
+++ b/tests/bcachefs/units.ktest
@@ -27,7 +27,7 @@ run_test()
/dev/sdb >/dev/null
#--bucket=$btree_node_size \
#--btree_node_size=$btree_node_size \
- mount /dev/sdb /mnt
+ mount -t bcachefs /dev/sdb /mnt
ln -sf /sys/fs/bcachefs/*/perf_test p
for i in $@; do
diff --git a/tests/xfstests.sh b/tests/xfstests.sh
index ffa9685..257e8df 100644
--- a/tests/xfstests.sh
+++ b/tests/xfstests.sh
@@ -61,7 +61,7 @@ EOF
wipefs -af /dev/sdb
mkfs.$FSTYP $MKFS_OPTIONS -q /dev/sdb
- mount /dev/sdb /mnt/test
+ mount -t $FSTYP /dev/sdb /mnt/test
cd "$ktest_dir/tests/xfstests"
./check "$@"