* [LTP] [PATCH v2] diotest4: Fix false postives on FUSE
@ 2020-09-30 14:11 Qian Cai
2020-09-30 14:34 ` Cyril Hrubis
0 siblings, 1 reply; 2+ messages in thread
From: Qian Cai @ 2020-09-30 14:11 UTC (permalink / raw)
To: ltp
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 <cai@redhat.com>
---
include/tst_fs.h | 1 +
lib/tst_fs_type.c | 2 ++
testcases/kernel/io/direct_io/diotest4.c | 2 ++
3 files changed, 5 insertions(+)
diff --git a/include/tst_fs.h b/include/tst_fs.h
index fc0390582..4f7dd68d2 100644
--- a/include/tst_fs.h
+++ b/include/tst_fs.h
@@ -29,6 +29,7 @@
#define TST_NILFS_MAGIC 0x3434
#define TST_EXOFS_MAGIC 0x5DF5
#define TST_OVERLAYFS_MAGIC 0x794c7630
+#define TST_FUSE_MAGIC 0x65735546
enum {
TST_BYTES = 1,
diff --git a/lib/tst_fs_type.c b/lib/tst_fs_type.c
index 1d0ac9669..d661d5b2a 100644
--- a/lib/tst_fs_type.c
+++ b/lib/tst_fs_type.c
@@ -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";
}
diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
index bf200cd41..f3c9c19d7 100644
--- a/testcases/kernel/io/direct_io/diotest4.c
+++ b/testcases/kernel/io/direct_io/diotest4.c
@@ -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;
--
2.28.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [LTP] [PATCH v2] diotest4: Fix false postives on FUSE
2020-09-30 14:11 [LTP] [PATCH v2] diotest4: Fix false postives on FUSE Qian Cai
@ 2020-09-30 14:34 ` Cyril Hrubis
0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2020-09-30 14:34 UTC (permalink / raw)
To: ltp
Hi!
Pushed, thanks.
--
Cyril Hrubis
chrubis@suse.cz
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-09-30 14:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-30 14:11 [LTP] [PATCH v2] diotest4: Fix false postives on FUSE Qian Cai
2020-09-30 14:34 ` Cyril Hrubis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox