On 29.07.2008 [20:35:56 +0100], Mel Gorman wrote:
> On (29/07/08 12:22), Nishanth Aravamudan didst pronounce:
> > On 29.07.2008 [19:41:06 +0100], Mel Gorman wrote:
> > > Regression tests of 2.0-pre1 on an older distro are reporting FAIL for the
> > > ELFMAP-related tests. As the version of binutils is too old to support the
> > > feature, these are not true failures. "Expected FAILs" are confusing as it
> > > gets difficult to tell what a real and expected failure is over time. This
> > > patch identifies when binutils is too old and skips the ELFMAP tests.
> > > 
> > > Comments?
> > > 
> > > Signed-off-by: Mel Gorman <[EMAIL PROTECTED]>
> > > --- 
> > >  run_tests.sh |   57 
> > > +++++++++++++++++++++++++++++++++++++++++----------------
> > >  1 file changed, 41 insertions(+), 16 deletions(-)
> > > 
> > > diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> > > index c98179d..1327de6 100755
> > > --- a/tests/run_tests.sh
> > > +++ b/tests/run_tests.sh
> > > @@ -49,6 +49,21 @@ function check_linkhuge_tests() {
> > >      fi
> > >  }
> > > 
> > > +function check_elfmap_tests() {
> > > +    # Binutils 2.17 or later are required for the ELFMAP tests to 
> > > complete
> > > +    # successfully. If the version is too old, we do not bother running 
> > > the
> > > +    # tests as they would report FAIL when it's not a true failure
> > > +
> > > +    ELFMAP_SKIP=0
> > > +    BINUTILS_VERSION=`ld -v | sed -e 's/[a-zA-Z() \t]//g'`
> > > +    MAJOR=`echo $BINUTILS_VERSION | cut -d. -f1`
> > > +    MINOR=`echo $BINUTILS_VERSION | cut -d. -f2`
> > > +
> > > +    if [ $MAJOR -lt 2 ] || [ $MAJOR -eq 2 -a $MINOR -lt 17 ]; then
> > > +        ELFMAP_SKIP=1
> > > +    fi
> > > +}
> > 
> > Seems fine.
> > 
> > >  run_test_bits () {
> > >      BITS=$1
> > >      shift
> > > @@ -79,6 +94,14 @@ maybe_run_linkhuge_test () {
> > >      fi
> > >  }
> > > 
> > > +maybe_run_elfmap_test () {
> > > +    if [ "$ELFMAP_SKIP" != "1" ]; then
> > > +        run_test "$@"
> > > +    else
> > > +        skip_test "$@"
> > > +    fi
> > > +}
> > 
> > > +
> > >  preload_test () {
> > >      run_test LD_PRELOAD=libhugetlbfs.so "$@"
> > >  }
> > > @@ -104,16 +127,16 @@ elflink_test () {
> > > 
> > >  elflink_rw_test() {
> > 
> > But would it not be perhaps a little cleaner in the output to just do
> > this rather than call elflink_rw_{,and_}test() at all?
> > 
> >   if [ $ELFMAP_SKIP == "1" ]; then
> >     echo "SKIPPING new relinking tests"
> >   fi
> > 
> > in both functions?
> > 
> 
> Believe it or not, this is what my first version did. Later, I decided
> for consistency reasons to match what check_linkhuge_tests() and
> maybe_run_link_hugetest() were doing.

Sorry, I didn't realize we had precedence.

> > I envision skip_test to be used only for temporarily skipping a test
> > when we know it causes a kernel oops, for instance. But we eventually
> > want to remove all skip_test from the library proper (as we fix the
> > kernel issues). I also think flooding the screen with a bunch of SKIPs
> > is a bit annoying.
> > 
> 
> In that case will I roll two patches? The first patch will remove skip_test,
> maybe_run_linkhuge_test and instead silently skip them. The second patch
> would then be ELFMAP silently skipping when binutils is too old.

Nah, I'll apply your original one, thanks,
Nish

-- 
Nishanth Aravamudan <[EMAIL PROTECTED]>
IBM Linux Technology Center

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Libhugetlbfs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libhugetlbfs-devel

Reply via email to