aboutsummaryrefslogtreecommitdiff
path: root/tests/fadvise_reserve.sh
diff options
context:
space:
mode:
authorEric B Munson <ebmunson@us.ibm.com>2009-05-13 10:35:53 +0100
committerEric B Munson <ebmunson@us.ibm.com>2009-05-13 15:34:45 +0100
commit6673da41773f28675a12ffa994170be8fa798a1f (patch)
treebb81f53f9e1b3205ac11eb883bc33896696061a7 /tests/fadvise_reserve.sh
parentb8d8bd39075e772da64bd7d5e75167c1b9eb6767 (diff)
downloadlibhugetlbfs-6673da41773f28675a12ffa994170be8fa798a1f.tar.gz
Wrapping tests to prevent machine hangs
The readahead, madvise, and the fadvise tests can all hang the running machine if the kernel bug they are testing is present. This patch wraps these tests so that they fail without running if the kernel version is less than 2.6.30. Signed-off-by: Eric B Munson <ebmunson@us.ibm.com> Acked-by: Mel Gorman <mel@csn.ul.ie>
Diffstat (limited to 'tests/fadvise_reserve.sh')
-rwxr-xr-xtests/fadvise_reserve.sh14
1 files changed, 14 insertions, 0 deletions
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
+