[LTP] [PATCH] finit_module02: fix exp. errno for O_WRONLY testcase
Cyril Hrubis
chrubis@suse.cz
Tue Oct 26 10:04:23 CEST 2021
Hi!
> commit 032146cda855 ("vfs: check fd has read access in
> kernel_read_file_from_fd()") changed errno back to EBADF,
> which is correct value according to man page, so tweak
> the test to expect it for kernels >= 5.15.
Shouldn't we drop the check completely and rather than working around
the bug add this commit to the test metadata?
> Signed-off-by: Jan Stancek <jstancek@redhat.com>
> ---
> testcases/kernel/syscalls/finit_module/finit_module02.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/testcases/kernel/syscalls/finit_module/finit_module02.c b/testcases/kernel/syscalls/finit_module/finit_module02.c
> index 0d2bf917ea64..9b5d3563b74e 100644
> --- a/testcases/kernel/syscalls/finit_module/finit_module02.c
> +++ b/testcases/kernel/syscalls/finit_module/finit_module02.c
> @@ -52,7 +52,7 @@ static void bad_fd_setup(struct tcase *tc)
>
> static void wo_file_setup(struct tcase *tc)
> {
> - if (tst_kvercmp(4, 6, 0) < 0)
> + if (tst_kvercmp(4, 6, 0) < 0 || tst_kvercmp(5, 15, 0) >= 0)
> tc->exp_errno = EBADF;
> else
> tc->exp_errno = ETXTBSY;
> --
> 2.27.0
>
>
> --
> Mailing list info: https://lists.linux.it/listinfo/ltp
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list