diotest4: Fix false postives on FUSE
PATCH v2 1/1 diotest4: Fix false postives on FUSE
It looks like FUSE does not support the unaligned IO, because it does not directly backed by a block device. Therefore, in fuse_direct_IO(), there is no checking of unaligned IO to return -EINVAL like other filesystems from iomap_dio_bio_actor().
diotest4 3 TFAIL : diotest4.c:114: read allows odd count. returns 1: Success diotest4 4 TFAIL : diotest4.c:129: write allows odd count.returns 1: Success diotest4 5 TFAIL : diotest4.c:180: Odd count of read and write ... diotest4 16 TFAIL : diotest4.c:114: read allows nonaligned buf. returns 4096: Success diotest4 17 TFAIL : diotest4.c:129: write allows nonaligned buf.returns 4096: Success diotest4 18 TFAIL : diotest4.c:180: read, write with non-aligned buffer
Signed-off-by Qian Cai <[email protected]>
--- include/tst_fs.h | 1 + lib/tst_fs_type.c | 2 ++ testcases/kernel/io/direct_io/diotest4.c | 2 ++ 3 files changed, 5 insertions(+)
include/tst_fs.h +1 -0
@@ -29,6 +29,7 @@#define TST_NILFS_MAGIC 0x3434#define TST_EXOFS_MAGIC 0x5DF5#define TST_OVERLAYFS_MAGIC 0x794c7630 +#define TST_FUSE_MAGIC 0x65735546enum {TST_BYTES =1 ,
lib/tst_fs_type.c +2 -0
@@ -84,6 +84,8 @@ const char *tst_fs_type_name(long f_type)return "EXOFS" ;case TST_OVERLAYFS_MAGIC :return "OVERLAYFS" ; +case TST_FUSE_MAGIC : +return "FUSE" ;default :return "Unknown" ; }
testcases/kernel/io/direct_io/diotest4.c +2 -0
@@ -270,6 +270,7 @@ int main(int argc, char *argv[])switch (fs_type) {case TST_NFS_MAGIC :case TST_BTRFS_MAGIC : +case TST_FUSE_MAGIC :tst_resm (TCONF ,"%s supports odd count IO" ,tst_fs_type_name (fs_type));break ;
@@ -442,6 +443,7 @@ int main(int argc, char *argv[])switch (fs_type) {case TST_NFS_MAGIC :case TST_BTRFS_MAGIC : +case TST_FUSE_MAGIC :tst_resm (TCONF ,"%s supports non-aligned buffer" ,tst_fs_type_name (fs_type));break ;
Signature · 1 line
2.28.0
PATCH v2 1/1 diotest4: Fix false postives on FUSE
Hi!
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]