On Wed, May 13, 2009 at 10:35:53AM +0100, Eric B Munson wrote: > 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. >
The fixes for this will need to be backported and this check will need to be more sophisicated, but sure, this is ok for the moment. > Signed-off-by: Eric B Munson <ebmun...@us.ibm.com> Acked-by: Mel Gorman <m...@csn.ul.ie> > --- > tests/Makefile | 3 ++- > tests/fadvise_reserve.sh | 14 ++++++++++++++ > tests/madvise_reserve.sh | 14 ++++++++++++++ > tests/readahead_reserve.sh | 14 ++++++++++++++ > tests/run_tests.py | 6 +++--- > 5 files changed, 47 insertions(+), 4 deletions(-) > create mode 100755 tests/fadvise_reserve.sh > create mode 100755 tests/madvise_reserve.sh > create mode 100755 tests/readahead_reserve.sh > > 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") > -- > 1.6.1.2 > > > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your > production scanning environment may not be a perfect world - but thanks to > Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even with all image > processing features enabled. http://p.sf.net/sfu/kodak-com > _______________________________________________ > Libhugetlbfs-devel mailing list > Libhugetlbfs-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel > -- Mel Gorman Part-time Phd Student Linux Technology Center University of Limerick IBM Dublin Software Lab ------------------------------------------------------------------------------ The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your production scanning environment may not be a perfect world - but thanks to Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700 Series Scanner you'll get full speed at 300 dpi even with all image processing features enabled. http://p.sf.net/sfu/kodak-com _______________________________________________ Libhugetlbfs-devel mailing list Libhugetlbfs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel