FSTests Archive on lore.kernel.org
 help / color / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org, guaneryu@gmail.com
Cc: linux-xfs@vger.kernel.org, fstests@vger.kernel.org, guan@eryu.me
Subject: [PATCH 2/2] common: remove _require_no_rtinherit
Date: Tue, 09 Feb 2021 18:57:06 -0800
Message-ID: <161292582611.3504701.17311358222740363123.stgit@magnolia> (raw)
In-Reply-To: <161292581498.3504701.4053663562108530233.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

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>
---
 common/rc     |   10 ----------
 tests/xfs/205 |    5 ++++-
 tests/xfs/306 |    5 ++++-
 tests/xfs/318 |    5 ++++-
 tests/xfs/444 |    6 +++++-
 5 files changed, 17 insertions(+), 14 deletions(-)


diff --git a/common/rc b/common/rc
index ad54b3de..25cbac0b 100644
--- 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
diff --git a/tests/xfs/205 b/tests/xfs/205
index da022f19..1f7ce3d8 100755
--- a/tests/xfs/205
+++ b/tests/xfs/205
@@ -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
diff --git a/tests/xfs/306 b/tests/xfs/306
index e1993c08..e98eda4b 100755
--- a/tests/xfs/306
+++ b/tests/xfs/306
@@ -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
diff --git a/tests/xfs/318 b/tests/xfs/318
index 90771ade..07375b1f 100755
--- a/tests/xfs/318
+++ b/tests/xfs/318
@@ -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
 
diff --git a/tests/xfs/444 b/tests/xfs/444
index f103b793..e4c987f8 100755
--- a/tests/xfs/444
+++ b/tests/xfs/444
@@ -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


      parent reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-10  2:56 [PATCHSET 0/2] fstests: remove _require_no_rtinherit from xfs tests Darrick J. Wong
2021-02-10  2:57 ` [PATCH 1/2] xfs: fix filestreams tests when rtinherit=1 Darrick J. Wong
2021-02-10  2:57 ` Darrick J. Wong [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161292582611.3504701.17311358222740363123.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=guan@eryu.me \
    --cc=guaneryu@gmail.com \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

FSTests Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/fstests/0 fstests/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 fstests fstests/ https://lore.kernel.org/fstests \
		fstests@vger.kernel.org
	public-inbox-index fstests

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.fstests


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git