xfs/119: fix MKFS_OPTIONS exporting
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 9 Jul 2019 17:49:53 +0000 (10:49 -0700)
committerEryu Guan <guaneryu@gmail.com>
Sat, 13 Jul 2019 04:21:19 +0000 (12:21 +0800)
This test originally exported its own MKFS_OPTIONS to force the tested
filesystem config to the mkfs defaults + test-specific log size options.
This overrides whatever the test runner might have set in MKFS_OPTIONS.

In commit 2fd273886b525 ("xfs: refactor minimum log size formatting
code") we fail to export our test-specific MKFS_OPTIONS before
calculating the minimum log size, which leads to the wrong min log size
being calculated once we fixed the helper to be smarter about mkfs options.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Allison Collins <allison.henderson@oracle.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
tests/xfs/119

index 8825a5c3bf30a86e4c07894440ccfd45f90b699a..f245a0a693cf49eb1ce45b7db6c9e19eb6290109 100755 (executable)
@@ -38,7 +38,8 @@ _require_scratch
 # this may hang
 sync
 
-logblks=$(_scratch_find_xfs_min_logblocks -l version=2,su=64k)
+export MKFS_OPTIONS="-l version=2,su=64k"
+logblks=$(_scratch_find_xfs_min_logblocks)
 export MKFS_OPTIONS="-l version=2,size=${logblks}b,su=64k"
 export MOUNT_OPTIONS="-o logbsize=64k"
 _scratch_mkfs_xfs >/dev/null