aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtests/run_tests.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/run_tests.py b/tests/run_tests.py
index 5822473..404e5fe 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -208,8 +208,9 @@ def get_pagesizes():
active mount points and at least one huge page allocated to the pool.
"""
sizes = set()
+ out = ""
(rc, out) = bash(cmd_env('') + "hugeadm --page-sizes")
- if rc != 0: return sizes
+ if rc != 0 or out == "": return sizes
for size in out.split("\n"): sizes.add(int(size))
return sizes
@@ -599,6 +600,11 @@ def main():
if len(wordsizes) == 0: wordsizes = set([32, 64])
if len(pagesizes) == 0: pagesizes = get_pagesizes()
+ if len(pagesizes) == 0:
+ print "Unable to find available page sizes, are you sure hugetlbfs"
+ print "is mounted and there are available huge pages?"
+ return 1
+
setup_env(env_override, env_defaults)
init_results()
check_hugetlbfs_path()