All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test
@ 2016-06-20 21:27 Yannick Brosseau
  2016-06-27 17:54 ` Shuah Khan
  0 siblings, 1 reply; 2+ messages in thread
From: Yannick Brosseau @ 2016-06-20 21:27 UTC (permalink / raw)
  To: shuahkh, linux-kselftest, linux-kernel, emunson, treding
  Cc: kernel-team, Yannick Brosseau

The default MEMLOCK limit is not big enough to accomodate all the
current pages of the test program process, so the test fails
at this step.
By removing the MCL_CURRENT flag, we allow the mlockall
call to succeed. The mmap is twice the size of the current limit,
so it will still fail as expected.

Signed-off-by: Yannick Brosseau <scientist@fb.com>
---
 tools/testing/selftests/vm/on-fault-limit.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/vm/on-fault-limit.c b/tools/testing/selftests/vm/on-fault-limit.c
index 245accc..0ae458f 100644
--- a/tools/testing/selftests/vm/on-fault-limit.c
+++ b/tools/testing/selftests/vm/on-fault-limit.c
@@ -20,7 +20,7 @@ static int test_limit(void)
 		return ret;
 	}
 
-	if (mlockall(MCL_CURRENT | MCL_ONFAULT | MCL_FUTURE)) {
+	if (mlockall(MCL_ONFAULT | MCL_FUTURE)) {
 		perror("mlockall");
 		return ret;
 	}
-- 
2.8.1

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

end of thread, other threads:[~2016-06-27 17:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-20 21:27 [PATCH] selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test Yannick Brosseau
2016-06-27 17:54 ` Shuah Khan

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.