[LTP] [PATCH v2 1/1] splice07: Whitelist /dev/zero on pipe write

Jan Kara jack@suse.cz
Fri Jan 26 15:13:25 CET 2024


On Fri 26-01-24 13:16:03, 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>

Yeah, makes sense to me. Feel free to add:

Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
> 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;
>  		}
> -- 
> 2.43.0
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


More information about the ltp mailing list