[LTP] [PATCH v6] io_submit04: Add test case for RWF_NOWAIT flag
Wei Gao
wegao@suse.com
Sat Apr 4 03:00:12 CEST 2026
On Fri, Mar 27, 2026 at 07:17:10PM +0100, Petr Vorel wrote:
> Hi Wei, all,
>
> > + struct timespec timeout = { .tv_sec = 1 };
> > + long nr = 1;
> > +
> > + TEST(tst_syscall(__NR_io_submit, ctx, nr, iocbs));
> > +
> > + if (TST_RET == -1 && TST_ERR == EOPNOTSUPP) {
> > + tst_brk(TCONF, "RWF_NOWAIT not supported by kernel");
> > + } else if (TST_RET != nr) {
> > + tst_brk(TBROK | TTERRNO, "io_submit() returns %ld, expected %ld",
> > + TST_RET, nr);
> > + }
>
> Maybe move this to setup()?
Moving io_submit() to setup() breaks multi-iteration testing. Since io_getevents() reaps the request,
we should call io_submit() inside the run() loop to re-queue the operation for the next pass.
More information about the ltp
mailing list