[LTP] [PATCH v3] aio_cancel_7-1: Write into a socket
Martin Doucha
mdoucha@suse.cz
Mon Sep 1 16:49:29 CEST 2025
On 28. 08. 25 12:26, Cyril Hrubis wrote:
> Hi!
>
> Do I get it right that we queue eight aio writes and four of them finish
> before the socket buffer is full and then the writing gets stuck with
> the fift one?
>
> So in the end we have four finished writes, one in progress and three
> canceled?
Yes, that's roughly what the test expects to happen, both before and
after this patch. Except the file scenario didn't get stuck at all and
the socket version will get stuck on the third write since the socket
buffer is big enough for exactly 2 writes.
But there was a bunch of valid corner cases that would result in the
test failing without this patch:
- aio_cancel() was called before the first write started
- aio_cancel() was called after all writes finished
- aio_cancel was called between one write finishing and another starting
In all three cases, none of the passing combinations aio_cancel() and
aio_error() return values would match.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list