aboutsummaryrefslogtreecommitdiff
path: root/tests/run_tests.py
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2009-05-20 14:08:01 +0100
committerEric B Munson <ebmunson@us.ibm.com>2009-05-27 10:21:40 +0100
commited788d8a7799ab403baf8ecfb958d156a07d8384 (patch)
treef928303d0d3f546429ffaab9f67413377af434fb /tests/run_tests.py
parent2fb6a52c618d47b319b6a4eb78577cadccff7e00 (diff)
downloadlibhugetlbfs-ed788d8a7799ab403baf8ecfb958d156a07d8384.tar.gz
Add -f option to run_test.py to force dangerous tests to run
Currently the readahead_reserve and [m|f]advise tests are all skipped if the running kernel is earlier than 2.6.30 because they can cause the machine to hang. This patch adds a -f switch to run_tests.py that allows the user to override this behavior. If -f is specified to run_tests.py these potentially dangerous tests will be run. Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'tests/run_tests.py')
-rwxr-xr-xtests/run_tests.py18
1 files changed, 13 insertions, 5 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index a0357ee..f0f7a37 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -479,9 +479,14 @@ def functional_tests():
do_test("brk_near_huge")
do_test("task-size-overrun")
do_test("stack_grow_into_huge")
- do_test("readahead_reserve.sh")
- do_test("madvise_reserve.sh")
- do_test("fadvise_reserve.sh")
+ if dangerous == 1:
+ do_test("readahead_reserve")
+ do_test("madvise_reserve")
+ do_test("fadvise_reserve")
+ else:
+ 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)
@@ -577,14 +582,15 @@ def stress_tests():
def main():
- global wordsizes, pagesizes
+ global wordsizes, pagesizes, dangerous
testsets = set()
env_override = {"QUIET_TEST": "1", "HUGETLBFS_MOUNTS": "",
"HUGETLB_ELFMAP": None, "HUGETLB_MORECORE": None}
env_defaults = {"HUGETLB_VERBOSE": "0"}
+ dangerous = 0
try:
- opts, args = getopt.getopt(sys.argv[1:], "vVdt:b:p:")
+ opts, args = getopt.getopt(sys.argv[1:], "vVfdt:b:p:")
except getopt.GetoptError, err:
print str(err)
sys.exit(1)
@@ -594,6 +600,8 @@ def main():
env_defaults["HUGETLB_VERBOSE"] = "2"
elif opt == "-V":
env_defaults["HUGETLB_VERBOSE"] = "99"
+ elif opt == "-f":
+ dangerous = 1
elif opt == "-t":
for t in arg.split(): testsets.add(t)
elif opt == "-b":