[LTP] [PATCH] io_submit01/io_submit02: Bugfix for running with the option "-i"

Petr Vorel pvorel@suse.cz
Fri Apr 8 09:57:44 CEST 2022


> On Tue, Apr 5, 2022 at 10:08 PM Petr Vorel <pvorel@suse.cz> wrote:

> > Hi all,

> > > For io_submit01, add io_destroy before test return, or the test
> > > would fail and report EAGAIN.
> > > For io_submit02, move the io_destroy to the suitable location, or
> > > the test would fail and report EAGAIN.

> > $ ./io_submit01 -i150
> > ...
> > io_submit01.c:122: TPASS: io_submit() with NULL iocb pointers failed with
> > EFAULT
> > io_submit01.c:127: TFAIL: io_submit() returned -11(EAGAIN/EWOULDBLOCK),
> > expected EBADF(-9)
> > io_submit01.c:127: TFAIL: io_submit() returned -11(EAGAIN/EWOULDBLOCK),
> > expected EBADF(-9)
> > io_submit01.c:127: TFAIL: io_submit() returned -11(EAGAIN/EWOULDBLOCK),
> > expected EBADF(-9)
> > io_submit01.c:127: TFAIL: io_submit() returned -11(EAGAIN/EWOULDBLOCK),
> > expected SUCCESS(1)

> > $ ./io_submit02 -i150
> > ...
> > io_submit02.c:76: TPASS: io_submit() returns 0 if nr is zero
> > io_submit02.c:78: TFAIL: io_submit() returns -1, expected 1

> > @Cyril, Li, Martin, Viresh: while this fix is valid using memset() (which
> > is required)
> > slows down testing a lot. Any idea whether this can be avoid to keep the
> > speed?


> It would not be a serious problem if only execute the test once,
> I'm wondering if it really necessary to rerun many times(i.e. 150)?
Hi Li,

I guess for stressing particular subsystem can be useful to run some test many
times (but I don't personally do it).

Sure, we could limit test to run only few times (e.g. < 50).

> BTW, the patch generally looks good to me.
+1

Let's wait for other input.

Kind regards,
Petr


More information about the ltp mailing list