]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
xfs/649: fix various problems
authorDarrick J. Wong <djwong@kernel.org>
Tue, 16 Dec 2025 18:29:56 +0000 (10:29 -0800)
committerZorro Lang <zlang@kernel.org>
Wed, 31 Dec 2025 22:19:31 +0000 (06:19 +0800)
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 <djwong@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
tests/xfs/649

index f7b559f72fe913c3adad1b1d0d0c70c0caf51a4d..56277c62932e16cc3b5e4a4a607bdb7b2f77f050 100755 (executable)
@@ -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