public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] [PATCH] madvise: remove the min_kver check
@ 2018-07-23  5:40 Li Wang
  2018-07-23  6:49 ` Jan Stancek
  0 siblings, 1 reply; 2+ messages in thread
From: Li Wang @ 2018-07-23  5:40 UTC (permalink / raw)
  To: ltp

For the reason that most of LTS enterprise linux distribution backport
this MADV_WIPEONFORK feature, here let's cancel the kernel limitation
to make madvise(..., MADV_WIPEONFORK) test more widely.

Signed-off-by: Li Wang <liwang@redhat.com>
---
 testcases/kernel/syscalls/madvise/madvise10.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/testcases/kernel/syscalls/madvise/madvise10.c b/testcases/kernel/syscalls/madvise/madvise10.c
index f040c2d..9cb3d2b 100644
--- a/testcases/kernel/syscalls/madvise/madvise10.c
+++ b/testcases/kernel/syscalls/madvise/madvise10.c
@@ -103,8 +103,13 @@ static int set_advice(char *addr, int size, int advise)
 	TEST(madvise(addr, size, advise));
 
 	if (TEST_RETURN == -1) {
-		tst_res(TFAIL | TTERRNO, "madvise(%p, %d, 0x%x)",
+		if (TEST_ERRNO == EINVAL) {
+			tst_res(TCONF, "madvise(%p, %d, 0x%x) is not supported",
 			addr, size, advise);
+		} else {
+			tst_res(TFAIL | TTERRNO, "madvise(%p, %d, 0x%x)",
+			addr, size, advise);
+		}
 
 		return 1;
 	}
@@ -175,5 +180,4 @@ static struct tst_test test = {
 	.forks_child = 1,
 	.test = test_madvise,
 	.setup = setup,
-	.min_kver = "4.14",
 };
-- 
2.9.5


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

* [LTP] [PATCH] madvise: remove the min_kver check
  2018-07-23  5:40 [LTP] [PATCH] madvise: remove the min_kver check Li Wang
@ 2018-07-23  6:49 ` Jan Stancek
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Stancek @ 2018-07-23  6:49 UTC (permalink / raw)
  To: ltp



----- Original Message -----
> For the reason that most of LTS enterprise linux distribution backport
> this MADV_WIPEONFORK feature, here let's cancel the kernel limitation
> to make madvise(..., MADV_WIPEONFORK) test more widely.
> 
> Signed-off-by: Li Wang <liwang@redhat.com>

We can do that, EINVAL should be quite clear here. I opened
https://github.com/linux-test-project/ltp/issues/371 to add
the other scenarios that could lead to EINVAL.

Patch pushed.

Regards,
Jan

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

end of thread, other threads:[~2018-07-23  6:49 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-23  5:40 [LTP] [PATCH] madvise: remove the min_kver check Li Wang
2018-07-23  6:49 ` Jan Stancek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox