aboutsummaryrefslogtreecommitdiff
path: root/tests/run_tests.py
diff options
context:
space:
mode:
authorMel Gorman <mel@csn.ul.ie>2009-05-18 19:07:44 +0100
committerEric B Munson <ebmunson@us.ibm.com>2009-05-18 20:12:04 +0100
commit86cae04d8263c08bbe3b717225230533e154f8f3 (patch)
tree1ef0b427e1c3d840456577247c701316fe7b434b /tests/run_tests.py
parentfef14a8c4ecc8cd9d47c0ac613f744d3b287ea9f (diff)
downloadlibhugetlbfs-86cae04d8263c08bbe3b717225230533e154f8f3.tar.gz
Add a test that mixes permissions on shared memory segments
Due to some confustion between VM_SHARED and VM_MAYSHARE in hugetlbfs, it is possible for hugepage reservations to get leaked. By using VM_SHARED, hugetlbfs will treat a shmem segment mapped read-only as if it was MAP_PRIVATE. This patch adds a test that checks if the kernel is vunerable to this bug. Note if this test fails, the system may no longer be usable for hugepage testing as the system will always think it has insufficient pages. A patch is currently being tested for this bug but no fix is merged upstream yet. Signed-off-by: Mel Gorman <mel@csn.ul.ie> Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'tests/run_tests.py')
-rwxr-xr-xtests/run_tests.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 871ae7c..a0357ee 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -482,6 +482,9 @@ def functional_tests():
do_test("readahead_reserve.sh")
do_test("madvise_reserve.sh")
do_test("fadvise_reserve.sh")
+ sysctls = setup_shm_sysctl(64*1048576)
+ do_test("shm-perms")
+ restore_shm_sysctl(sysctls)
# Tests requiring an active mount and hugepage COW
do_test("private")