aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2022-03-08 21:18:49 +0800
committerEryu Guan <guaneryu@gmail.com>2022-04-10 23:36:04 +0800
commita7e2b797f865831fcb883d15e06c2c17246caed8 (patch)
tree2b2f11bc398b465e1dd44c93c325a3f1ec3692a0
parent1133ecda69f92cee3875b9f12fb4a1957d97aef1 (diff)
downloadxfstests-dev-a7e2b797f865831fcb883d15e06c2c17246caed8.tar.gz
btrfs/194: allow it to be run on systems with page size larger than 4K
Since btrfs has subpage support since v5.15, there is no need to require such hard requirement on 4K page size. We only need to check if the current system support 4K as sectorsize. Now the test case can pass on aarch64 with 64K page size. Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: Eryu Guan <guaneryu@gmail.com> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rwxr-xr-xtests/btrfs/1946
1 files changed, 2 insertions, 4 deletions
diff --git a/tests/btrfs/194 b/tests/btrfs/194
index 228576e4e7..d749377cb1 100755
--- a/tests/btrfs/194
+++ b/tests/btrfs/194
@@ -25,9 +25,7 @@ _scratch_dev_pool_get 2
# Here we use 4k node size to reduce runtime (explained near _scratch_mkfs call)
# To use the minimal node size (4k) we need 4K page size.
-if [ $(get_page_size) != 4096 ]; then
- _notrun "This test need 4k page size"
-fi
+_require_btrfs_support_sectorsize 4096
device_1=$(echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $1}')
device_2=$(echo $SCRATCH_DEV_POOL | $AWK_PROG '{print $2}')
@@ -37,7 +35,7 @@ echo device_1=$device_1 device_2=$device_2 >> $seqres.full
# The wrong check limit is based on the max item size (BTRFS_MAX_DEVS() macro),
# and max item size is based on node size, so smaller node size will result
# much shorter runtime. So here we use minimal node size (4K) to reduce runtime.
-_scratch_mkfs -n 4k >> $seqres.full
+_scratch_mkfs -n 4k -s 4k >> $seqres.full
_scratch_mount
# For 4k nodesize, the wrong limit is calculated by: