[LTP] [PATCH] syscalls/finit_module02: Add ETXTBSY error for read-write fd

Richard Palethorpe rpalethorpe@suse.de
Thu Nov 18 11:25:05 CET 2021


Hello Yang,

Yang Xu <xuyang2018.jy@fujitsu.com> writes:

> Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>

Reviewed-by: Richard Palethorpe <rpalethorpe@suse.com>

> ---
>  testcases/kernel/syscalls/finit_module/finit_module02.c | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/testcases/kernel/syscalls/finit_module/finit_module02.c b/testcases/kernel/syscalls/finit_module/finit_module02.c
> index 47b5edbfb..b3437b5d0 100644
> --- a/testcases/kernel/syscalls/finit_module/finit_module02.c
> +++ b/testcases/kernel/syscalls/finit_module/finit_module02.c
> @@ -72,6 +72,8 @@ static struct tcase tcases[] = {
>  		NULL},
>  	{"file-not-readable", &fd, "", O_WRONLY | O_CLOEXEC, 0, 0, EBADF, 0,
>  		NULL},
> +	{"file-readwrite", &fd, "", O_RDWR | O_CLOEXEC, 0, 0, ETXTBSY, 0,
> +		NULL},
>  	{"directory", &fd_dir, "", O_RDONLY | O_CLOEXEC, 0, 0, 0, 0, dir_setup},
>  };
>  
> @@ -134,6 +136,7 @@ static void run(unsigned int n)
>  static struct tst_test test = {
>  	.tags = (const struct tst_tag[]) {
>  		{"linux-git", "032146cda855"},
> +		{"linux-git", "39d637af5aa7"},
>  		{}
>  	},
>  	.test = run,
> -- 
> 2.23.0


-- 
Thank you,
Richard.


More information about the ltp mailing list