[LTP] lib: Add SAFE_SPLICE() macro
linuxtestproject.agent@gmail.com
linuxtestproject.agent@gmail.com
Mon May 4 11:28:05 CEST 2026
Hi Andrea,
--- [PATCH 1/2] ---
On Mon, 4 May 2026, Andrea Cervesato wrote:
> lib: Add SAFE_SPLICE() macro
>
> Add new SAFE_SPLIT() in lapi/splice.h.
"SAFE_SPLIT()" -> "SAFE_SPLICE()".
> -#include "lapi/splice.h"
> ...
> + SAFE_SPLICE(file_fd, &off_in, pipefd[1], NULL, OVERWRITE_SIZE, 0);
After this commit, SAFE_SPLICE() is called in af_alg08.c, tee01.c, and
vmsplice01.c but all three no longer include <lapi/splice.h> — the tree
does not compile. The include removal and the SAFE_SPLICE() conversion
must not be split across commits.
This patch also mixes "add library macro" with "convert test files";
split them: patch 1 touches only lapi/splice.h, patch 2 adds the
include and converts the splice() calls in all three test files.
--- [PATCH 2/2] ---
On Mon, 4 May 2026, Andrea Cervesato wrote:
> tee01, vmsplice01, af_alg08: Use SAFE_SPLICE()
>
> Replace raw splice() calls with SAFE_SPLICE() in tests where splice is
> utility plumbing, not the subject of testing.
This patch only adds three "#include lapi/splice.h" lines; the actual
splice()-to-SAFE_SPLICE() conversion is in patch 1/2. Subject and body
must describe what this patch actually does, or better: restructure
the series so the conversion and its include live in the same commit.
---
Note:
Our agent completed the review of the patch.
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