generic/620: fix order of require_scratch calls
authorDarrick J. Wong <djwong@kernel.org>
Wed, 14 Apr 2021 01:05:14 +0000 (18:05 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sun, 18 Apr 2021 12:53:53 +0000 (20:53 +0800)
_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>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
common/rc
tests/generic/620

index 57ca427..aa4ea7d 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -1643,7 +1643,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
index d0e58ca..6055944 100755 (executable)
@@ -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