diff mbox series

syscalls/finit_module02: Add ETXTBSY error for read-write fd

Message ID 1637137469-13184-1-git-send-email-xuyang2018.jy@fujitsu.com
State Accepted
Headers show
Series syscalls/finit_module02: Add ETXTBSY error for read-write fd | expand

Commit Message

Yang Xu Nov. 17, 2021, 8:24 a.m. UTC
Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.com>
---
 testcases/kernel/syscalls/finit_module/finit_module02.c | 3 +++
 1 file changed, 3 insertions(+)

Comments

Richard Palethorpe Nov. 18, 2021, 10:25 a.m. UTC | #1
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
Yang Xu Nov. 19, 2021, 2:53 a.m. UTC | #2
H Richard
> 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>
> 
Thanks for your review, merged.

ps: I also record this error by sending a patch to man-pages community.

Best Regards
Yang Xu
>> ---
>>   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
> 
>
diff mbox series

Patch

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,