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

Yang Xu xuyang2018.jy@fujitsu.com
Wed Nov 17 09:24:29 CET 2021


Signed-off-by: Yang Xu <xuyang2018.jy@fujitsu.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



More information about the ltp mailing list