From fdc576ef62e27179e4b606e6b4797a1b38ea2f7a Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Tue, 16 Dec 2025 10:29:56 -0800 Subject: [PATCH] xfs/649: fix various problems Fix a couple of problems with this new test: First, the comment for the $attr_size_bytes check says that the maximum size of a single xattr value is 64k. This is true, but the check triggers the warning even when the size is exactly 64k. Second, the test fails to format with 32k and 64k fsblock size filesystems because the scsi_debug device size is 128M, and that's not large enough for the minimum log size. Raise that to 320M. Cc: fstests@vger.kernel.org # v2025.12.09 Fixes: 5760b2105985bf ("xfs: test case for handling io errors when reading extended attributes") Signed-off-by: Darrick J. Wong Signed-off-by: Zorro Lang --- tests/xfs/649 | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/xfs/649 b/tests/xfs/649 index f7b559f7..56277c62 100755 --- a/tests/xfs/649 +++ b/tests/xfs/649 @@ -48,14 +48,15 @@ _require_attrs user # If SELinux is enabled common/config sets a default context, which breaks this test. export SELINUX_MOUNT_OPTIONS="" -scsi_debug_dev=$(_get_scsi_debug_dev) +# need at least 320m to format with 32/64k fsblock size +scsi_debug_dev=$(_get_scsi_debug_dev 512 512 0 321) scsi_debug_opt_noerror=0 scsi_debug_opt_error=${scsi_debug_opt_error:=2} test -b $scsi_debug_dev || _notrun "Failed to initialize scsi debug device" echo "SCSI debug device $scsi_debug_dev" >>$seqres.full SCRATCH_DEV=$scsi_debug_dev -_scratch_mkfs >> $seqres.full +_scratch_mkfs >> $seqres.full || _notrun "could not format filesystem" _scratch_mount block_size=$(_get_file_block_size $SCRATCH_MNT) @@ -77,7 +78,7 @@ test_attr() # The maximum size for a single value is ATTR_MAX_VALUELEN (64*1024) # If we wanted to test a larger range of extent combinations the test # would need to use multiple values. - [[ $attr_size_bytes -ge 65536 ]] && echo "Test would need to be modified to support > 64k values for $attr_blocks blocks". + [[ $attr_size_bytes -gt 65536 ]] && echo "Test would need to be modified to support > 64k values for $attr_blocks blocks". echo $scsi_debug_opt_noerror > /sys/module/scsi_debug/parameters/opts -- 2.47.3