aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2009-12-09 11:25:17 +0000
committerEric B Munson <ebmunson@us.ibm.com>2009-12-09 11:32:20 +0000
commit3b6084385368210ec6c09140664129f700ef1f65 (patch)
tree2f0353a3bfcc467e20fccecb00ae5592a90f2913 /tests
parent495a57a6dcf82d9a64643068197f2157a0c739f5 (diff)
downloadlibhugetlbfs-3b6084385368210ec6c09140664129f700ef1f65.tar.gz
Add wrappers for unsafe kernel tests.
This patch adds wrapper scripts for the three new tests added by David Gibson. These tests are know unsafe for mainline and will be skipped on kernels < 2.6.33. This test will need to be updated to match the version that gets the fix for each particular bug. Signed-off-by: Eric B Munson <ebmunson@us.ibm.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile5
-rwxr-xr-xtests/mremap-expand-slice-collision.sh14
-rwxr-xr-xtests/mremap-fixed-huge-near-normal.sh14
-rwxr-xr-xtests/mremap-fixed-normal-near-huge.sh14
-rwxr-xr-xtests/run_tests.py6
5 files changed, 50 insertions, 3 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 2a284c5..3ed52a9 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -7,8 +7,6 @@ LIB_TESTS = gethugepagesize test_root find_path unlinked_fd misalign \
truncate_reserve_wraparound truncate_sigbus_versus_oom \
map_high_truncate_2 truncate_above_4GB direct \
misaligned_offset brk_near_huge task-size-overrun stack_grow_into_huge \
- mremap-expand-slice-collision \
- mremap-fixed-normal-near-huge mremap-fixed-huge-near-normal \
counters quota heap-overflow get_huge_pages get_hugepage_region \
shmoverride_linked gethugepagesizes \
madvise_reserve fadvise_reserve readahead_reserve \
@@ -21,7 +19,8 @@ HUGELINK_TESTS = linkhuge linkhuge_nofd linkshare
HUGELINK_RW_TESTS = linkhuge_rw
STRESS_TESTS = mmap-gettest mmap-cow shm-gettest shm-getraw shm-fork
WRAPPERS = quota counters madvise_reserve fadvise_reserve \
- readahead_reserve
+ readahead_reserve mremap-expand-slice-collision \
+ mremap-fixed-normal-near-huge mremap-fixed-huge-near-normal
HELPERS = get_hugetlbfs_path compare_kvers
HELPER_LIBS = libheapshrink.so
BADTOOLCHAIN = bad-toolchain.sh
diff --git a/tests/mremap-expand-slice-collision.sh b/tests/mremap-expand-slice-collision.sh
new file mode 100755
index 0000000..8c9d98a
--- /dev/null
+++ b/tests/mremap-expand-slice-collision.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# mremap-expand-slice-collision is known broken before 2.6.33
+compare_kvers `uname -r` "2.6.33"
+if [ $? -eq 1 ]; then
+ echo "FAIL (assumed) kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC mremap-expand-slice-collision "$@"
+fi
+
diff --git a/tests/mremap-fixed-huge-near-normal.sh b/tests/mremap-fixed-huge-near-normal.sh
new file mode 100755
index 0000000..4b89c35
--- /dev/null
+++ b/tests/mremap-fixed-huge-near-normal.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# mremap-fixed-huge-near-normal is known broken before 2.6.33
+compare_kvers `uname -r` "2.6.33"
+if [ $? -eq 1 ]; then
+ echo "FAIL (assumed) kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC mremap-fixed-huge-near-normal "$@"
+fi
+
diff --git a/tests/mremap-fixed-normal-near-huge.sh b/tests/mremap-fixed-normal-near-huge.sh
new file mode 100755
index 0000000..9ed058f
--- /dev/null
+++ b/tests/mremap-fixed-normal-near-huge.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# mremap-fixed-normal-near-huge is known broken before 2.6.33
+compare_kvers `uname -r` "2.6.33"
+if [ $? -eq 1 ]; then
+ echo "FAIL (assumed) kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC mremap-fixed-normal-near-huge "$@"
+fi
+
diff --git a/tests/run_tests.py b/tests/run_tests.py
index ff7257a..8de0cb4 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -524,10 +524,16 @@ def functional_tests():
do_test("readahead_reserve")
do_test("madvise_reserve")
do_test("fadvise_reserve")
+ do_test("mremap-expand-slice-collision")
+ do_test("mremap-fixed-normal-near-huge")
+ do_test("mremap-fixed-huge-near-normal")
else:
do_test("readahead_reserve.sh")
do_test("madvise_reserve.sh")
do_test("fadvise_reserve.sh")
+ do_test("mremap-expand-slice-collision.sh")
+ do_test("mremap-fixed-normal-near-huge.sh")
+ do_test("mremap-fixed-huge-near-normal.sh")
do_shm_test("shm-perms", 64*1024*1024)
# Tests requiring an active mount and hugepage COW