diff mbox series

[7/9] generic/620: fix order of require_scratch calls

Message ID 161836231396.2754991.1877515727730919792.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series fstests: random fixes | expand

Commit Message

Darrick J. Wong April 14, 2021, 1:05 a.m. UTC
From: Darrick J. Wong <djwong@kernel.org>

_require_scratch_16T_support does not itself check that the scratch
device exists, which means that it depends on someone else to call
_require_scratch.  Document this dependency and fix this test so that we
can run:

./check --exact-order generic/374 generic/620

on an ext4 filesystem without g/620 tripping over the mess left by g/374
when it calls _notrun.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 common/rc         |    3 ++-
 tests/generic/620 |    2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

Comments

Christoph Hellwig April 14, 2021, 6:20 a.m. UTC | #1
On Tue, Apr 13, 2021 at 06:05:14PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
> 
> _require_scratch_16T_support does not itself check that the scratch
> device exists, which means that it depends on someone else to call
> _require_scratch.  Document this dependency and fix this test so that we
> can run:
> 
> ./check --exact-order generic/374 generic/620
> 
> on an ext4 filesystem without g/620 tripping over the mess left by g/374
> when it calls _notrun.

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>
diff mbox series

Patch

diff --git a/common/rc b/common/rc
index 23f86ce6..bb54df56 100644
--- a/common/rc
+++ b/common/rc
@@ -1608,7 +1608,8 @@  _require_scratch_size_nocheck()
 	[ $devsize -lt $1 ] && _notrun "scratch dev too small"
 }
 
-# require scratch fs which supports >16T of filesystem size.
+# Require scratch fs which supports >16T of filesystem size.
+# _require_scratch must be called before this function is called.
 _require_scratch_16T_support()
 {
 	case $FSTYP in
diff --git a/tests/generic/620 b/tests/generic/620
index d0e58ca4..60559441 100755
--- a/tests/generic/620
+++ b/tests/generic/620
@@ -41,8 +41,8 @@  rm -f $seqres.full
 
 # Modify as appropriate.
 _supported_fs generic
-_require_scratch_16T_support
 _require_scratch_size_nocheck $((4 * 1024 * 1024)) #kB
+_require_scratch_16T_support
 _require_dmhugedisk
 
 # 17TB dm huge-test-zer0 device