selftests/vm: Don't mlockall MCL_CURRENT in on-fault-limit test
authorYannick Brosseau <scientist@fb.com>
Mon, 20 Jun 2016 21:27:10 +0000 (14:27 -0700)
committerShuah Khan <shuahkh@osg.samsung.com>
Mon, 27 Jun 2016 19:19:24 +0000 (13:19 -0600)
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>
tools/testing/selftests/vm/on-fault-limit.c

index 245acccce42d8e2b64842451f75a058ba499562f..0ae458f32fdb90c0ad0ac7c05086c5e4f34d7ed4 100644 (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;
        }