All of lore.kernel.org
 help / color / mirror / 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 1/2] xfs: fix filestreams tests when rtinherit=1
Date: Tue, 09 Feb 2021 18:57:00 -0800	[thread overview]
Message-ID: <161292582052.3504701.14931035226865872354.stgit@magnolia> (raw)
In-Reply-To: <161292581498.3504701.4053663562108530233.stgit@magnolia>

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"


  reply	other threads:[~2021-02-10  2:57 UTC|newest]

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 ` Darrick J. Wong [this message]
2021-02-10  2:57 ` [PATCH 2/2] common: remove _require_no_rtinherit Darrick J. Wong

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=161292582052.3504701.14931035226865872354.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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.