Reading sysfs to get physical and logical block fails, if SCRATCH_DEV is partitioned device. Signed-off-by: Nitesh Shetty <nj.shetty@xxxxxxxxxxx> Reported-by: Darrick J. Wong <djwong@xxxxxxxxxx> Reported-by: Wang Yugui <wangyugui@xxxxxxxxxxxx> --- tests/generic/108 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/generic/108 b/tests/generic/108 index db0e9bd0..efe66ba5 100755 --- a/tests/generic/108 +++ b/tests/generic/108 @@ -42,8 +42,8 @@ _require_non_zoned_device $SCRATCH_DEV lvname=lv_$seq vgname=vg_$seq -physical=$(cat /sys/block/$(_short_dev $SCRATCH_DEV)/queue/physical_block_size) -logical=$(cat /sys/block/$(_short_dev $SCRATCH_DEV)/queue/logical_block_size) +physical=`blockdev --getpbsz $SCRATCH_DEV` +logical=`blockdev --getss $SCRATCH_DEV` # _get_scsi_debug_dev returns a scsi debug device with 128M in size by default SCSI_DEBUG_DEV=`_get_scsi_debug_dev ${physical:-512} ${logical:-512} 0 300` -- 2.25.1