[LTP] [PATCH v2 1/1] splice07: Whitelist /dev/zero on pipe write
Martin Doucha
mdoucha@suse.cz
Fri Jan 26 14:11:35 CET 2024
Hi,
splice() works on /dev/zero and /proc/self/maps on older kernels at
least between v4.4 and v5.3.
On 26. 01. 24 13:16, Petr Vorel wrote:
> /dev/zero on pipe write started to succeeded on kernel 6.7.
>
> This is due commit 1b057bd800c3 ("drivers/char/mem: implement splice()
> for /dev/zero, /dev/full") from kernel 6.7.
>
> Suggested-by: Cyril Hrubis <chrubis@suse.cz>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>
> ---
> Changes v1->v2:
> * Skip only for kernel >= 6.7
>
> testcases/kernel/syscalls/splice/splice07.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/splice/splice07.c b/testcases/kernel/syscalls/splice/splice07.c
> index 135c42e47..c7b1c9ee5 100644
> --- a/testcases/kernel/syscalls/splice/splice07.c
> +++ b/testcases/kernel/syscalls/splice/splice07.c
> @@ -44,6 +44,10 @@ static void check_splice(struct tst_fd *fd_in, struct tst_fd *fd_out)
> /* And this complains about socket not being connected */
> case TST_FD_INET_SOCK:
> return;
> + /* 1b057bd800c3 implemented splice() for /dev/zero, /dev/full */
> + case TST_FD_DEV_ZERO:
> + if (tst_kvercmp(6, 7, 0) >= 0)
> + return;
> default:
> break;
> }
--
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