[LTP] [RFC PATCH 1/1] readahead01: Pass also on memfd secret

Jan Kara jack@suse.cz
Fri Jan 19 16:33:05 CET 2024


On Thu 18-01-24 20:13:53, Petr Vorel wrote:
> It fixes failure on 6.6 kernels:
> 
> TFAIL: readahead() on memfd secret succeeded
> 
> Fixes: ecf81d729 ("syscalls: readahead01: Make use of tst_fd")
> Reported-by: Dominique Leuenberger <dimstar@opensuse.org>
> Signed-off-by: Petr Vorel <pvorel@suse.cz>

Yes, memfd secret is standard tmpfs file in principle so readahead(2)
succeeds. Feel free to add:

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

								Honza

> ---
> Hi,
> 
> I wonder if this is a bug or just changed functionality.
> 
> I also tested on 5.14 SLES and 5.10 Debian and both TCONF due ENOSYS:
> 
> tst_fd.c:260: TCONF: Skipping memfd secret: ENOSYS (38)
> 
> Kind regards,
> Petr
> 
>  testcases/kernel/syscalls/readahead/readahead01.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/testcases/kernel/syscalls/readahead/readahead01.c b/testcases/kernel/syscalls/readahead/readahead01.c
> index e86a73e3e..a1f313605 100644
> --- a/testcases/kernel/syscalls/readahead/readahead01.c
> +++ b/testcases/kernel/syscalls/readahead/readahead01.c
> @@ -51,6 +51,7 @@ static void test_invalid_fd(struct tst_fd *fd)
>  	/* These succeed */
>  	case TST_FD_FILE:
>  	case TST_FD_MEMFD:
> +	case TST_FD_MEMFD_SECRET:
>  	case TST_FD_PROC_MAPS:
>  		return;
>  	default:
> -- 
> 2.43.0
> 
> 
> -- 
> Mailing list info: https://lists.linux.it/listinfo/ltp
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR


More information about the ltp mailing list