[LTP] [PATCH] lio_listio_2-1: Rewrite test
Petr Vorel
pvorel@suse.cz
Thu Jan 15 23:32:03 CET 2026
Hi Martin,
LGTM, thank you!
Reviewed-by: Petr Vorel <pvorel@suse.cz>
> The test schedules multiple async writes into a file and then hopes that
> at least one will block long enough that a variable can be checked before
> the completion signal arrives. Use a socket pair instead of file
> to force async writes to block indefinitely. Then drain the socket after
> the first signal check and wait for the signal.
> Add cleanup helper function that will flush socket buffers, free allocated
> memory and close the sockets. Also make setup and cleanup simpler
> by statically allocating the aiocb structure array.
> Signed-off-by: Martin Doucha <mdoucha@suse.cz>
> ---
> Another race condition fix by filling socket pair buffers until they
> block. Tested on kernel v4.4 and v6.12.
Tested on 6.17. (I was able to trigger "Error lio_listio() waited for list
completion" failure without the patch when running in loop, not with the patch).
Kind regards,
Petr
More information about the ltp
mailing list