From: Ojaswin Mujoo Date: Fri, 10 Apr 2026 06:36:03 +0000 (+0530) Subject: generic/765: Fix sysfs queue path for nvme partitions X-Git-Tag: v2026.04.20~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4dc8a079a670c0831e75dd9fc25e02f94b261807;p=xfstests-dev.git generic/765: Fix sysfs queue path for nvme partitions This tests checks atomic write limits reported by statx() are same as the ones reported by sysfs, however nvme partitions don't have the /sys/block/nvme0n1p1 style entry and also use the namespace's queue limits for atomic writes. This causes the test to fail because it expects /sys/block/nvme0n*p* to be present. Hence, use the new _sysfs_queue_path() helper to get the correct atomic write limits Also, fix a small typo (s/awu_min/awu_max) when printing awu limits to seqres.full Reported-by: Disha Goel Signed-off-by: Ojaswin Mujoo Reviewed-by: Darrick J. Wong Signed-off-by: Zorro Lang --- diff --git a/tests/generic/765 b/tests/generic/765 index 8c4e0bd0..09be53db 100755 --- a/tests/generic/765 +++ b/tests/generic/765 @@ -94,16 +94,17 @@ test_atomic_writes() _scratch_unmount } -sys_min_write=$(cat "/sys/block/$(_short_dev $SCRATCH_DEV)/queue/atomic_write_unit_min_bytes") -sys_max_write=$(cat "/sys/block/$(_short_dev $SCRATCH_DEV)/queue/atomic_write_unit_max_bytes") +queue_path=$(_sysfs_queue_path $SCRATCH_DEV) +sys_min_write=$(cat "$queue_path/atomic_write_unit_min_bytes") +sys_max_write=$(cat "$queue_path/atomic_write_unit_max_bytes") bdev_min_write=$(_get_atomic_write_unit_min $SCRATCH_DEV) bdev_max_write=$(_get_atomic_write_unit_max $SCRATCH_DEV) echo "sysfs awu_min $sys_min_write" >> $seqres.full -echo "sysfs awu_min $sys_max_write" >> $seqres.full +echo "sysfs awu_max $sys_max_write" >> $seqres.full echo "bdev awu_min $bdev_min_write" >> $seqres.full -echo "bdev awu_min $bdev_max_write" >> $seqres.full +echo "bdev awu_max $bdev_max_write" >> $seqres.full # Test that statx atomic values are the same as sysfs values if [ "$sys_min_write" -ne "$bdev_min_write" ]; then