All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests
@ 2021-11-29 13:32 Jan Stancek
  2021-11-29 14:15 ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Stancek @ 2021-11-29 13:32 UTC (permalink / raw)
  To: ltp

Some systems appear to be able to complete all requests before
test checks 'received_all':
  conformance/interfaces/lio_listio/lio_listio_2-1: execution: FAILED: Output:
  lio_listio/2-1.c Error lio_listio() waited for list completion

Increase number of requests, and also make test use different
file offset for each.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
 .../conformance/interfaces/lio_listio/2-1.c                   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
index 4f458a06bdaf..72a1113e06a3 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
@@ -34,7 +34,7 @@
 
 #define TNAME "lio_listio/2-1.c"
 
-#define NUM_AIOCBS	10
+#define NUM_AIOCBS	256
 #define BUF_SIZE	1024
 
 static volatile int received_selected;
@@ -98,7 +98,7 @@ int main(void)
 		memset(aiocbs[i], 0, sizeof(struct aiocb));
 
 		aiocbs[i]->aio_fildes = fd;
-		aiocbs[i]->aio_offset = 0;
+		aiocbs[i]->aio_offset = i * BUF_SIZE;
 		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
 		aiocbs[i]->aio_nbytes = BUF_SIZE;
 		aiocbs[i]->aio_lio_opcode = LIO_WRITE;
-- 
2.27.0


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

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

* Re: [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests
  2021-11-29 13:32 [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests Jan Stancek
@ 2021-11-29 14:15 ` Cyril Hrubis
  2021-11-29 14:23   ` Cyril Hrubis
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2021-11-29 14:15 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi!
> -#define NUM_AIOCBS	10
> +#define NUM_AIOCBS	256
>  #define BUF_SIZE	1024
>  
>  static volatile int received_selected;
> @@ -98,7 +98,7 @@ int main(void)
>  		memset(aiocbs[i], 0, sizeof(struct aiocb));
>  
>  		aiocbs[i]->aio_fildes = fd;
> -		aiocbs[i]->aio_offset = 0;
> +		aiocbs[i]->aio_offset = i * BUF_SIZE;

The only concern I have is that if the filesystem does not support
sparse files this will eat up 256MB right?

>  		aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
>  		aiocbs[i]->aio_nbytes = BUF_SIZE;
>  		aiocbs[i]->aio_lio_opcode = LIO_WRITE;

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests
  2021-11-29 14:15 ` Cyril Hrubis
@ 2021-11-29 14:23   ` Cyril Hrubis
  2021-11-29 14:23     ` Jan Stancek
  0 siblings, 1 reply; 4+ messages in thread
From: Cyril Hrubis @ 2021-11-29 14:23 UTC (permalink / raw)
  To: Jan Stancek; +Cc: ltp

Hi!
> >  static volatile int received_selected;
> > @@ -98,7 +98,7 @@ int main(void)
> >  		memset(aiocbs[i], 0, sizeof(struct aiocb));
> >  
> >  		aiocbs[i]->aio_fildes = fd;
> > -		aiocbs[i]->aio_offset = 0;
> > +		aiocbs[i]->aio_offset = i * BUF_SIZE;
> 
> The only concern I have is that if the filesystem does not support
> sparse files this will eat up 256MB right?

Ah, it's the same file, that means that it will be just 256kB, that is
fine. Well it would be better to unlink() the file at the end of the
test, but regardless:

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

-- 
Cyril Hrubis
chrubis@suse.cz

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

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

* Re: [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests
  2021-11-29 14:23   ` Cyril Hrubis
@ 2021-11-29 14:23     ` Jan Stancek
  0 siblings, 0 replies; 4+ messages in thread
From: Jan Stancek @ 2021-11-29 14:23 UTC (permalink / raw)
  To: Cyril Hrubis; +Cc: LTP List

On Mon, Nov 29, 2021 at 3:21 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> > >  static volatile int received_selected;
> > > @@ -98,7 +98,7 @@ int main(void)
> > >             memset(aiocbs[i], 0, sizeof(struct aiocb));
> > >
> > >             aiocbs[i]->aio_fildes = fd;
> > > -           aiocbs[i]->aio_offset = 0;
> > > +           aiocbs[i]->aio_offset = i * BUF_SIZE;
> >
> > The only concern I have is that if the filesystem does not support
> > sparse files this will eat up 256MB right?
>
> Ah, it's the same file, that means that it will be just 256kB, that is
> fine. Well it would be better to unlink() the file at the end of the
> test, but regardless:

Yes, should be only 256kB.

>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>

Thanks, pushed.

>
> --
> Cyril Hrubis
> chrubis@suse.cz
>


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

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

end of thread, other threads:[~2021-11-29 14:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-29 13:32 [LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: increase number of requests Jan Stancek
2021-11-29 14:15 ` Cyril Hrubis
2021-11-29 14:23   ` Cyril Hrubis
2021-11-29 14:23     ` Jan Stancek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.