common: remove _require_no_rtinherit
authorDarrick J. Wong <djwong@kernel.org>
Wed, 10 Feb 2021 02:57:06 +0000 (18:57 -0800)
committerEryu Guan <guaneryu@gmail.com>
Sun, 28 Feb 2021 13:23:19 +0000 (21:23 +0800)
All the remaining tests that use _require_no_rtinherit can be adapted to
ignore SCRATCH_RTDEV or to force files to be created on the data device.
This makes the helper unnecessary and increases test coverage, so remove
this helper.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/xfs/205
tests/xfs/306
tests/xfs/318
tests/xfs/444

index 0ec7fe1a91aeccc980e38c216fc9a16b81db8154..7254130ffe22f19b78d9329336cf5ac8d78bd1a6 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -6,16 +6,6 @@
 
 BC=$(which bc 2> /dev/null) || BC=
 
-# Some tests are not relevant or functional when testing XFS realtime
-# subvolumes along with the rtinherit=1 mkfs option.  In these cases,
-# this test will opt-out of the test.
-_require_no_rtinherit()
-{
-       [ "$FSTYP" = "xfs" ] && echo "$MKFS_OPTIONS" |
-               egrep -q "rtinherit([^=]|=1|$)" && \
-               _notrun "rtinherit mkfs option is not supported by this test."
-}
-
 _require_math()
 {
        if [ -z "$BC" ]; then
index da022f19988c2bbdf075048132878248f3b13cce..1f7ce3d89242b3e9125ede2201b53e2604661b16 100755 (executable)
@@ -23,10 +23,13 @@ _supported_fs xfs
 
 # single AG will cause xfs_repair to fail checks.
 _require_scratch_nocheck
-_require_no_rtinherit
 
 rm -f $seqres.full
 
+# Disable the scratch rt device to avoid test failures relating to the rt
+# bitmap consuming all the free space in our small data device.
+unset SCRATCH_RTDEV
+
 fsblksz=1024
 _scratch_mkfs_xfs -d size=$((32768*fsblksz)) -b size=$fsblksz >> $seqres.full 2>&1
 _scratch_mount
index e1993c08fc6397118b9e63010bfa487a3957d201..e98eda4b2429c6424b75d9b1c68aae0a2fdd0e3e 100755 (executable)
@@ -34,12 +34,15 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch_nocheck       # check complains about single AG fs
-_require_no_rtinherit
 _require_xfs_io_command "fpunch"
 _require_command $UUIDGEN_PROG uuidgen
 
 rm -f $seqres.full
 
+# Disable the scratch rt device to avoid test failures relating to the rt
+# bitmap consuming all the free space in our small data device.
+unset SCRATCH_RTDEV
+
 # Create a small fs with a large directory block size. We want to fill up the fs
 # quickly and then create multi-fsb dirblocks over fragmented free space.
 _scratch_mkfs_xfs -d size=20m -n size=64k >> $seqres.full 2>&1
index 90771ade69076c728506d31e95e9d5704e551333..07375b1f80de21479324b5ee581f4c8153f3b5af 100755 (executable)
@@ -32,7 +32,6 @@ _supported_fs xfs
 _require_scratch
 _require_error_injection
 _require_xfs_io_error_injection "rmap_finish_one"
-_require_no_rtinherit
 
 rm -f $seqres.full
 
@@ -43,6 +42,10 @@ echo "Format filesystem"
 _scratch_mkfs >/dev/null 2>&1
 _scratch_mount >> $seqres.full
 
+# This test depends on specific behaviors of the data device, so create all
+# files on it.
+$XFS_IO_PROG -c 'chattr -t' $SCRATCH_MNT
+
 echo "Create files"
 touch $SCRATCH_MNT/file1
 
index f103b793281de78b927931b3196c76ef38a6497f..e4c987f84422f1e9d50d6089ebec8257fa3c8eea 100755 (executable)
@@ -39,11 +39,15 @@ _require_scratch
 _require_test_program "punch-alternating"
 _require_xfs_io_command "falloc"
 _require_xfs_db_write_array
-_require_no_rtinherit
 
 # This is only a v5 filesystem problem
 _require_scratch_xfs_crc
 
+# Disable the scratch rt device to avoid test failures relating to the rt
+# bitmap consuming free space in our small data device and throwing off the
+# filestreams allocator.
+unset SCRATCH_RTDEV
+
 mount_loop() {
        if ! _try_scratch_mount >> $seqres.full 2>&1; then
                echo "scratch mount failed" >> $seqres.full