diff mbox series

generic/418: use min_dio_alignment

Message ID 20250128071412.676396-1-hch@lst.de (mailing list archive)
State New
Headers show
Series generic/418: use min_dio_alignment | expand

Commit Message

Christoph Hellwig Jan. 28, 2025, 7:14 a.m. UTC
Otherwise this test uses the wrong sector size on the RT device.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 tests/generic/418 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Darrick J. Wong Jan. 28, 2025, 7:21 p.m. UTC | #1
On Tue, Jan 28, 2025 at 08:14:12AM +0100, Christoph Hellwig wrote:
> Otherwise this test uses the wrong sector size on the RT device.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>
> ---
>  tests/generic/418 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/generic/418 b/tests/generic/418
> index 4321e2984663..36789198c88e 100755
> --- a/tests/generic/418
> +++ b/tests/generic/418
> @@ -28,7 +28,7 @@ _require_test_program "feature"
>  
>  diotest=$here/src/dio-invalidate-cache
>  testfile=$TEST_DIR/$seq-diotest
> -sectorsize=`blockdev --getss $TEST_DEV`
> +sectorsize=`$here/src/min_dio_alignment $TEST_DIR $TEST_DEV`

BTW is min_dio_alignment going to get an upgrade to report
STATX_DIO_READ_ALIGN ?

The changes here look correct to me
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

>  pagesize=`$here/src/feature -s`
>  
>  # test case array, test different write/read combinations
> -- 
> 2.45.2
> 
>
Christoph Hellwig Jan. 29, 2025, 5:36 a.m. UTC | #2
On Tue, Jan 28, 2025 at 11:21:47AM -0800, Darrick J. Wong wrote:
> >  diotest=$here/src/dio-invalidate-cache
> >  testfile=$TEST_DIR/$seq-diotest
> > -sectorsize=`blockdev --getss $TEST_DEV`
> > +sectorsize=`$here/src/min_dio_alignment $TEST_DIR $TEST_DEV`
> 
> BTW is min_dio_alignment going to get an upgrade to report
> STATX_DIO_READ_ALIGN ?

Sorta.  For most tests we really expect a symmetic output that
can be used for reads and writes.  But for say fsx we can actually
plug in different read and write sized, and I did prototype that
a while ago.
diff mbox series

Patch

diff --git a/tests/generic/418 b/tests/generic/418
index 4321e2984663..36789198c88e 100755
--- a/tests/generic/418
+++ b/tests/generic/418
@@ -28,7 +28,7 @@  _require_test_program "feature"
 
 diotest=$here/src/dio-invalidate-cache
 testfile=$TEST_DIR/$seq-diotest
-sectorsize=`blockdev --getss $TEST_DEV`
+sectorsize=`$here/src/min_dio_alignment $TEST_DIR $TEST_DEV`
 pagesize=`$here/src/feature -s`
 
 # test case array, test different write/read combinations