All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCHSET 0/2] fstests: remove _require_no_rtinherit from xfs tests
@ 2021-02-10  2:56 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 ` [PATCH 2/2] common: remove _require_no_rtinherit Darrick J. Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-02-10  2:56 UTC (permalink / raw)
  To: djwong, guaneryu; +Cc: linux-xfs, fstests, guan

Hi all,

The _require_no_rtinherit helper is rather bogus -- it disables a test
if the fs was formatted with -drtinherit=1 to avoid failure reports.
The failure reports themselves are usually due to the test requiring
some feature of the data device (e.g. filestreams, AGFL fiddling), and
have nothing to do with realtime at all.  Since we /also/ have a means
for working around rtinherit=1, we should do that instead of skipping
the test.

If you're going to start using this mess, you probably ought to just
pull from my git trees, which are linked below.

This is an extraordinary way to destroy everything.  Enjoy!
Comments and questions are, as always, welcome.

--D

fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=remove-no-rtinherit
---
 common/filestreams |    5 +++++
 common/rc          |   10 ----------
 tests/xfs/170      |    1 -
 tests/xfs/171      |    1 -
 tests/xfs/172      |    1 -
 tests/xfs/173      |    1 -
 tests/xfs/174      |    1 -
 tests/xfs/205      |    5 ++++-
 tests/xfs/306      |    5 ++++-
 tests/xfs/318      |    5 ++++-
 tests/xfs/444      |    6 +++++-
 tests/xfs/445      |    5 +++++
 12 files changed, 27 insertions(+), 19 deletions(-)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] xfs: fix filestreams tests when rtinherit=1
  2021-02-10  2:56 [PATCHSET 0/2] fstests: remove _require_no_rtinherit from xfs tests Darrick J. Wong
@ 2021-02-10  2:57 ` Darrick J. Wong
  2021-02-10  2:57 ` [PATCH 2/2] common: remove _require_no_rtinherit Darrick J. Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-02-10  2:57 UTC (permalink / raw)
  To: djwong, guaneryu; +Cc: linux-xfs, fstests, guan

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

The filestreams allocator can only be selected for files that reside on
the data volume.  In commit ee3e0010, we sprinkled calls to
_require_no_rtinherit in the filestreams tests so that there wouldn't be
regressions reported if the filesystem is formatted with -d rtinherit=1.

This unnecessarily limits test coverage because userspace can control
the device selection parameters quite easily with xfs_io chattr.  Make
the filestreams tests unset SCRATCH_RTDEV so that the allocator isn't
thrown off by the rtbitmap consuming space on the data device.

Fixes: ee3e0010 ("xfs/realtime: add _require_no_rtinherit function")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/filestreams |    5 +++++
 tests/xfs/170      |    1 -
 tests/xfs/171      |    1 -
 tests/xfs/172      |    1 -
 tests/xfs/173      |    1 -
 tests/xfs/174      |    1 -
 tests/xfs/445      |    5 +++++
 7 files changed, 10 insertions(+), 5 deletions(-)


diff --git a/common/filestreams b/common/filestreams
index 267dcb3c..8165effe 100644
--- a/common/filestreams
+++ b/common/filestreams
@@ -90,6 +90,11 @@ _test_streams() {
 	local use_directio="$7"
 	local expected_result="$8"	# "fail" if failure is expected
 
+	# 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
+
 	local size=`expr $agsize \* 1024 \* 1024 \* $agcount`
 	_scratch_mkfs_xfs -dsize=$size,agcount=$agcount >/dev/null 2>&1 \
 		|| _fail "mkfs failed"
diff --git a/tests/xfs/170 b/tests/xfs/170
index f7f0dd27..84023e4d 100755
--- a/tests/xfs/170
+++ b/tests/xfs/170
@@ -33,7 +33,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
diff --git a/tests/xfs/171 b/tests/xfs/171
index 35503b23..0239081a 100755
--- a/tests/xfs/171
+++ b/tests/xfs/171
@@ -32,7 +32,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
diff --git a/tests/xfs/172 b/tests/xfs/172
index 36b4e650..56c34e69 100755
--- a/tests/xfs/172
+++ b/tests/xfs/172
@@ -32,7 +32,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
diff --git a/tests/xfs/173 b/tests/xfs/173
index 8ed86d96..f37d2719 100755
--- a/tests/xfs/173
+++ b/tests/xfs/173
@@ -32,7 +32,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
diff --git a/tests/xfs/174 b/tests/xfs/174
index 58038939..fc3de04f 100755
--- a/tests/xfs/174
+++ b/tests/xfs/174
@@ -32,7 +32,6 @@ _cleanup()
 _supported_fs xfs
 
 _require_scratch
-_require_no_rtinherit
 
 _check_filestreams_support || _notrun "filestreams not available"
 
diff --git a/tests/xfs/445 b/tests/xfs/445
index 7215fa59..d35010a9 100755
--- a/tests/xfs/445
+++ b/tests/xfs/445
@@ -57,6 +57,11 @@ _require_xfs_io_command "falloc"
 # check for filestreams
 _check_filestreams_support || _notrun "filestreams not available"
 
+# 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
+
 # use small AGs for frequent stream switching
 _scratch_mkfs_xfs -d agsize=20m,size=2g >> $seqres.full 2>&1 ||
 	_fail "mkfs failed"


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] common: remove _require_no_rtinherit
  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
  1 sibling, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-02-10  2:57 UTC (permalink / raw)
  To: djwong, guaneryu; +Cc: linux-xfs, fstests, guan

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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-02-10  2:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 ` [PATCH 2/2] common: remove _require_no_rtinherit Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.