All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] finit_module02: fix exp. errno for O_WRONLY testcase
@ 2021-10-25 13:25 Jan Stancek
  2021-10-26  8:04 ` Cyril Hrubis
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Jan Stancek @ 2021-10-25 13:25 UTC (permalink / raw)
  To: ltp

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.

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

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2021-11-22  7:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-25 13:25 [LTP] [PATCH] finit_module02: fix exp. errno for O_WRONLY testcase Jan Stancek
2021-10-26  8:04 ` Cyril Hrubis
2021-10-26 10:35   ` Jan Stancek
2021-10-26 10:42 ` [LTP] [PATCH v2] " Jan Stancek
2021-10-26 10:52   ` Cyril Hrubis
2021-10-26 11:57     ` Jan Stancek
2021-10-26 15:08       ` Cyril Hrubis
2021-10-26 15:15         ` Jan Stancek
2021-11-17  7:54 ` [LTP] [PATCH] " xuyang2018.jy
2021-11-22  6:42   ` Jan Stancek
2021-11-22  7:09     ` xuyang2018.jy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.