public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs
@ 2022-12-16 11:43 Petr Vorel
  2022-12-16 11:46 ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2022-12-16 11:43 UTC (permalink / raw)
  To: ltp

O_DIRECT is not supported on tmpfs. This flag is added by -O option,
thus cannot be filtered with .skip_filesystems.

Signed-off-by: Petr Vorel <pvorel@suse.cz>
---
 testcases/kernel/io/ltp-aiodio/aio-stress.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/io/ltp-aiodio/aio-stress.c b/testcases/kernel/io/ltp-aiodio/aio-stress.c
index 39db14d651..f20383dcfc 100644
--- a/testcases/kernel/io/ltp-aiodio/aio-stress.c
+++ b/testcases/kernel/io/ltp-aiodio/aio-stress.c
@@ -1239,10 +1239,13 @@ static void setup(void)
 	if (tst_parse_int(str_num_threads, &num_threads, 1, INT_MAX))
 		tst_brk(TBROK, "Invalid number of threads '%s'", str_num_threads);
 
-	if (str_o_flag)
+	if (str_o_flag) {
+		if (tst_fs_type(".") == TST_TMPFS_MAGIC)
+			tst_brk(TCONF, "O_DIRECT not supported on tmpfs");
 		o_flag = O_DIRECT;
-	else
+	} else {
 		o_flag = O_SYNC;
+	}
 
 	if (str_use_shm) {
 		if (!strcmp(str_use_shm, "shm")) {
-- 
2.39.0


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

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

* Re: [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs
  2022-12-16 11:43 [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs Petr Vorel
@ 2022-12-16 11:46 ` Petr Vorel
  2023-01-09 10:58   ` Richard Palethorpe
  0 siblings, 1 reply; 4+ messages in thread
From: Petr Vorel @ 2022-12-16 11:46 UTC (permalink / raw)
  To: ltp

Hi Andrea,

> O_DIRECT is not supported on tmpfs. This flag is added by -O option,
> thus cannot be filtered with .skip_filesystems.

NOTE: it fixes
aio-stress.c:1339: TBROK: open(file0.bin,16450,0600) failed: EINVAL (22)

Kind regards,
Petr

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

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

* Re: [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs
  2022-12-16 11:46 ` Petr Vorel
@ 2023-01-09 10:58   ` Richard Palethorpe
  2023-01-11  9:04     ` Petr Vorel
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Palethorpe @ 2023-01-09 10:58 UTC (permalink / raw)
  To: Petr Vorel; +Cc: ltp

Hello,

Petr Vorel <pvorel@suse.cz> writes:

> Hi Andrea,
>
>> O_DIRECT is not supported on tmpfs. This flag is added by -O option,
>> thus cannot be filtered with .skip_filesystems.
>
> NOTE: it fixes
> aio-stress.c:1339: TBROK: open(file0.bin,16450,0600) failed: EINVAL (22)
>
> Kind regards,
> Petr

I merged this, although I don't think it is quite correct to say tmpfs
doesn't support O_DIRECT. It's more like it is in O_DIRECT mode by
default. Either way though we don't need to run the test with O_DIRECT
and without it.

-- 
Thank you,
Richard.

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

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

* Re: [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs
  2023-01-09 10:58   ` Richard Palethorpe
@ 2023-01-11  9:04     ` Petr Vorel
  0 siblings, 0 replies; 4+ messages in thread
From: Petr Vorel @ 2023-01-11  9:04 UTC (permalink / raw)
  To: Richard Palethorpe; +Cc: ltp

Hi Richie,

> I merged this, although I don't think it is quite correct to say tmpfs
> doesn't support O_DIRECT. It's more like it is in O_DIRECT mode by
> default. Either way though we don't need to run the test with O_DIRECT
> and without it.

NOTE: feel free to correct me (amend the message) before merge.

Kind regards,
Petr

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

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

end of thread, other threads:[~2023-01-11  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 11:43 [LTP] [PATCH 1/1] aio-stress: TCONF on O_DIRECT on tmpfs Petr Vorel
2022-12-16 11:46 ` Petr Vorel
2023-01-09 10:58   ` Richard Palethorpe
2023-01-11  9:04     ` Petr Vorel

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