aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/Makefile3
-rwxr-xr-xtests/fadvise_reserve.sh14
-rwxr-xr-xtests/madvise_reserve.sh14
-rwxr-xr-xtests/readahead_reserve.sh14
-rwxr-xr-xtests/run_tests.py6
5 files changed, 47 insertions, 4 deletions
diff --git a/tests/Makefile b/tests/Makefile
index 7e7dd99..3e0a832 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -17,7 +17,8 @@ LDSCRIPT_TESTS = zero_filesize_segment
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 shm-fork shm-getraw counters
+WRAPPERS = quota shm-fork shm-getraw counters madvise_reserve fadvise_reserve \
+ readahead_reserve
HELPERS = get_hugetlbfs_path compare_kvers
HELPER_LIBS = libheapshrink.so
BADTOOLCHAIN = bad-toolchain.sh
diff --git a/tests/fadvise_reserve.sh b/tests/fadvise_reserve.sh
new file mode 100755
index 0000000..a62f9e9
--- /dev/null
+++ b/tests/fadvise_reserve.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# fadvise is known broken before 2.6.30
+compare_kvers `uname -r` "2.6.30"
+if [ $? -eq 1 ]; then
+ echo "FAIL kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC quota "$@"
+fi
+
diff --git a/tests/madvise_reserve.sh b/tests/madvise_reserve.sh
new file mode 100755
index 0000000..64eb229
--- /dev/null
+++ b/tests/madvise_reserve.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# madvise is known broken before 2.6.30
+compare_kvers `uname -r` "2.6.30"
+if [ $? -eq 1 ]; then
+ echo "FAIL kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC quota "$@"
+fi
+
diff --git a/tests/readahead_reserve.sh b/tests/readahead_reserve.sh
new file mode 100755
index 0000000..8dc0ad1
--- /dev/null
+++ b/tests/readahead_reserve.sh
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+. wrapper-utils.sh
+
+# readahead is known broken before 2.6.30
+compare_kvers `uname -r` "2.6.30"
+if [ $? -eq 1 ]; then
+ echo "FAIL kernel bug"
+ exit $RC_FAIL
+else
+ EXP_RC=$RC_PASS
+ exec_and_check $EXP_RC quota "$@"
+fi
+
diff --git a/tests/run_tests.py b/tests/run_tests.py
index ed246fc..871ae7c 100755
--- a/tests/run_tests.py
+++ b/tests/run_tests.py
@@ -479,9 +479,9 @@ def functional_tests():
do_test("brk_near_huge")
do_test("task-size-overrun")
do_test("stack_grow_into_huge")
- do_test("readahead_reserve")
- do_test("madvise_reserve")
- do_test("fadvise_reserve")
+ do_test("readahead_reserve.sh")
+ do_test("madvise_reserve.sh")
+ do_test("fadvise_reserve.sh")
# Tests requiring an active mount and hugepage COW
do_test("private")