[LTP] sockets/xfrm02: Add ESP-in-TCP page cache corruption test
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Wed May 13 21:01:50 CEST 2026
Hi Andrea,
On Wed, 13 May 2026, Andrea Cervesato wrote:
> sockets/xfrm02: Add ESP-in-TCP page cache corruption test
> + /* Let the espintcp strparser process buffered ESP data */
> + usleep(30000);
Sleep-based synchronization is not allowed. Use an event-based mechanism
(e.g. poll the accepted socket for readability) instead of a fixed sleep.
[...]
> + splice(pipefd[0], NULL, cli_fd, NULL, DATA_SIZE, 0);
SAFE_SPLICE() exists; use it, or wrap in TEST() if failure on patched kernels
is expected. The return value must not be silently discarded.
[...]
> +static int srv_fd = -1;
[...]
> + SAFE_CLOSE(srv_fd);
[...]
> + if (srv_fd != -1)
> + SAFE_CLOSE(srv_fd);
srv_fd and file_fd are closed inside try_corrupt()/run() but never reset to
-1, so cleanup() calls SAFE_CLOSE() on already-closed fds (EBADF). Assign -1
after each SAFE_CLOSE() on these globals.
---
Note:
Our agent completed the review of the patch. The full review can be
found at: https://github.com/linux-test-project/ltp-agent/actions/runs/25819929958
The agent can sometimes produce false positives although often its findings
are genuine. If you find issues with the review, please comment this email
or ignore the suggestions.
Regards,
LTP AI Reviewer
More information about the ltp
mailing list