public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
@ 2023-11-22 21:13 Petr Vorel
  2023-11-22 21:34 ` Hugh Dickins via ltp
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Petr Vorel @ 2023-11-22 21:13 UTC (permalink / raw)
  To: ltp; +Cc: Christian Brauner, Jan Kara, Hugh Dickins, Christoph Hellwig

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).

Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/io/direct_io/diotest4.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
index 45c677b5b..ad00fa3e0 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[])
 	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;
-- 
2.42.0


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
  2023-11-22 21:13 [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs Petr Vorel
@ 2023-11-22 21:34 ` Hugh Dickins via ltp
  2023-11-23  8:43   ` Petr Vorel
  2023-11-23  8:51 ` Jan Kara
  2023-11-23  9:42 ` Christian Brauner
  2 siblings, 1 reply; 6+ messages in thread
From: Hugh Dickins via ltp @ 2023-11-22 21:34 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Jan Kara, Christian Brauner, Hugh Dickins, Christoph Hellwig, ltp

On Wed, 22 Nov 2023, Petr Vorel wrote:

> 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).
> 
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Acked-by: Hugh Dickins <hughd@google.com>

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.

> ---
>  testcases/kernel/io/direct_io/diotest4.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
> index 45c677b5b..ad00fa3e0 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[])
>  	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;
> -- 
> 2.42.0

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
  2023-11-22 21:34 ` Hugh Dickins via ltp
@ 2023-11-23  8:43   ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2023-11-23  8:43 UTC (permalink / raw)
  To: Hugh Dickins; +Cc: Christian Brauner, Jan Kara, Christoph Hellwig, ltp

> On Wed, 22 Nov 2023, Petr Vorel wrote:

> > 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).

> > Suggested-by: Jan Kara <jack@suse.cz>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>

> Acked-by: Hugh Dickins <hughd@google.com>

> 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.

> ... 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

> > ---
> >  testcases/kernel/io/direct_io/diotest4.c | 2 ++
> >  1 file changed, 2 insertions(+)

> > diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
> > index 45c677b5b..ad00fa3e0 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[])
> >  	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;
> > -- 
> > 2.42.0

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
  2023-11-22 21:13 [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs Petr Vorel
  2023-11-22 21:34 ` Hugh Dickins via ltp
@ 2023-11-23  8:51 ` Jan Kara
  2023-11-23  9:42 ` Christian Brauner
  2 siblings, 0 replies; 6+ messages in thread
From: Jan Kara @ 2023-11-23  8:51 UTC (permalink / raw)
  To: Petr Vorel
  Cc: Jan Kara, Christian Brauner, Hugh Dickins, Christoph Hellwig, ltp

On Wed 22-11-23 22:13:18, Petr Vorel wrote:
> 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).
> 
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Looks good, thanks for writing this! Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  testcases/kernel/io/direct_io/diotest4.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/testcases/kernel/io/direct_io/diotest4.c b/testcases/kernel/io/direct_io/diotest4.c
> index 45c677b5b..ad00fa3e0 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[])
>  	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;
> -- 
> 2.42.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
  2023-11-22 21:13 [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs Petr Vorel
  2023-11-22 21:34 ` Hugh Dickins via ltp
  2023-11-23  8:51 ` Jan Kara
@ 2023-11-23  9:42 ` Christian Brauner
  2023-11-24  8:32   ` Petr Vorel
  2 siblings, 1 reply; 6+ messages in thread
From: Christian Brauner @ 2023-11-23  9:42 UTC (permalink / raw)
  To: Petr Vorel; +Cc: Jan Kara, Hugh Dickins, Christoph Hellwig, ltp

On Wed, Nov 22, 2023 at 10:13:18PM +0100, Petr Vorel wrote:
> 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).
> 
> Suggested-by: Jan Kara <jack@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---

Looks good to me,
Acked-by: Christian Brauner <brauner@kernel.org>

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs
  2023-11-23  9:42 ` Christian Brauner
@ 2023-11-24  8:32   ` Petr Vorel
  0 siblings, 0 replies; 6+ messages in thread
From: Petr Vorel @ 2023-11-24  8:32 UTC (permalink / raw)
  To: Christian Brauner; +Cc: Jan Kara, Hugh Dickins, Christoph Hellwig, ltp

Hi Christian,

> On Wed, Nov 22, 2023 at 10:13:18PM +0100, Petr Vorel wrote:
> > 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).

> > Suggested-by: Jan Kara <jack@suse.cz>
> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---

> Looks good to me,
> Acked-by: Christian Brauner <brauner@kernel.org>

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

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2023-11-24  8:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-22 21:13 [LTP] [PATCH 1/1] diotest4: Skip test 3 and 14 for tmpfs Petr Vorel
2023-11-22 21:34 ` Hugh Dickins via ltp
2023-11-23  8:43   ` Petr Vorel
2023-11-23  8:51 ` Jan Kara
2023-11-23  9:42 ` Christian Brauner
2023-11-24  8:32   ` Petr Vorel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox