diotest4: Skip test 3 and 14 for tmpfs
PATCH 1/1 diotest4: Skip test 3 and 14 for tmpfs
tmpfs in kernel v6.6 got support for O_DIRECT in e88e0d366f9c ("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).
--- testcases/kernel/io/direct_io/diotest4.c | 2 ++ 1 file changed, 2 insertions(+)
testcases/kernel/io/direct_io/diotest4.c +2 -0
@@ -270,6 +270,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports odd count IO" ,tst_fs_type_name (fs_type));break ;
@@ -443,6 +444,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports non-aligned buffer" ,tst_fs_type_name (fs_type));break ;
Signature · 5 lines
2.42.0 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 8 lines · Petr Vorel
tmpfs in kernel v6.6 got support for
O_DIRECTine88e0d366f9c("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).Suggested-by Jan Kara <[email protected]>Signed-off-by Petr Vorel <[email protected]>
Great, thanks a lot. I've never minded tmpfs failing those LTP tests, but had never looked at them closely enough to notice that there is this established way to avoid the failures...
... but hold on: I can't look at the LTP source at the moment, but records tell me that the two tests failing were dio04 and dio10, whereas you say test 3 and test 14 - please clarify or correct, thanks.
Quoted 26 lines
--- testcases/kernel/io/direct_io/diotest4.c | 2 ++ 1 file changed, 2 insertions(+)testcases/kernel/io/direct_io/diotest4.c +2
-0@@ -270,6 +270,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports odd count IO" ,tst_fs_type_name (fs_type));break ;@@ -443,6 +444,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports non-aligned buffer" ,tst_fs_type_name (fs_type));break ;Signature · 1 line
2.42.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 8 lines · Petr Vorel
Quoted 6 lines
tmpfs in kernel v6.6 got support for
O_DIRECTine88e0d366f9c("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).
Quoted 8 lines
Quoted 2 lines
Suggested-by Jan Kara <[email protected]>Signed-off-by Petr Vorel <[email protected]>Acked-by Hugh Dickins <[email protected]>Great, thanks a lot. I've never minded tmpfs failing those LTP tests, but had never looked at them closely enough to notice that there is this established way to avoid the failures...
I was surprised as well, Jan Kara noticed.
Quoted 3 lines
... but hold on: I can't look at the LTP source at the moment, but records tell me that the two tests failing were dio04 and dio10, whereas you say test 3 and test 14 - please clarify or correct, thanks.
These 2 tests are both running diotest4.c, just with different block size:
$ git grep -e ^dio04 -e ^dio10 runtest/ runtest/dio:dio04 diotest4 runtest/dio:dio10 diotest4 -b 65536
NOTE: dio tests are currently being rewritten, but diotest4.c have not been done yet. Thus the code is using legacy LTP API and needs cleanup.
Kind regards,
Petr
Quoted 26 lines
Quoted 26 lines
--- testcases/kernel/io/direct_io/diotest4.c | 2 ++ 1 file changed, 2 insertions(+)testcases/kernel/io/direct_io/diotest4.c +2
-0@@ -270,6 +270,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports odd count IO" ,tst_fs_type_name (fs_type));break ;@@ -443,6 +444,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports non-aligned buffer" ,tst_fs_type_name (fs_type));break ;Signature · 1 line
2.42.0
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 8 lines · Petr Vorel
tmpfs in kernel v6.6 got support for
O_DIRECTine88e0d366f9c("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).Suggested-by Jan Kara <[email protected]>Signed-off-by Petr Vorel <[email protected]>
Looks good, thanks for writing this! Feel free to add:
Honza
Quoted 27 lines
--- testcases/kernel/io/direct_io/diotest4.c | 2 ++ 1 file changed, 2 insertions(+)testcases/kernel/io/direct_io/diotest4.c +2
-0@@ -270,6 +270,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports odd count IO" ,tst_fs_type_name (fs_type));break ;@@ -443,6 +444,7 @@ int main(int argc, char *argv[])case TST_NFS_MAGIC :case TST_BTRFS_MAGIC :case TST_FUSE_MAGIC : +case TST_TMPFS_MAGIC :tst_resm (TCONF ,"%s supports non-aligned buffer" ,tst_fs_type_name (fs_type));break ;Signature · 1 line
2.42.0
Signature · 5 lines
Jan Kara <[email protected]> SUSE Labs, CR -- Mailing list info: https://lists.linux.it/listinfo/ltp
Quoted 9 lines · Petr Vorel
tmpfs in kernel v6.6 got support for
O_DIRECTine88e0d366f9c("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).Suggested-by Jan Kara <[email protected]>Signed-off-by Petr Vorel <[email protected]>---
Looks good to me,
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Christian,
Quoted 7 lines · Petr Vorel
Quoted 5 lines
tmpfs in kernel v6.6 got support for
O_DIRECTine88e0d366f9c("tmpfs:
trivial support for direct IO"). There is no reason for tmpfs to reject direct IO of any size therefore follow the approach already used for Btrfs, NFS and FUSE: skipping test 3 (odd count of read and write) and 14 (read, write with non-aligned buffer).
Quoted 6 lines
Quoted 3 lines
Suggested-by Jan Kara <[email protected]>Signed-off-by Petr Vorel <[email protected]>---
Looks good to me,
Thanks a lot for your ack. I'm sorry, already merged, but I was not able to reply due planned mailserver outage.
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp