2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-21 11:44:01 +08:00

selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test

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>
Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
This commit is contained in:
Yannick Brosseau 2016-06-20 14:27:10 -07:00 committed by Shuah Khan
parent ee65735dd5
commit bff124682e

View File

@ -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;
}