On 31.07.2008 [23:05:44 +0100], Mel Gorman wrote:
> binutils 2.17 or later is required for the linkhuge_rw tests to pass
> successfully. If the regression test fails and binutils is old, a
> message to this effect will be given to the user.
> 
> Signed-off-by: Mel Gorman <[EMAIL PROTECTED]>
> ---
>  tests/verifyresults-linkhuge_rw.sh |   21 +++++++++++++++++++++
>  1 files changed, 21 insertions(+), 0 deletions(-)
>  create mode 100755 tests/verifyresults-linkhuge_rw.sh
> 
> diff --git a/tests/verifyresults-linkhuge_rw.sh 
> b/tests/verifyresults-linkhuge_rw.sh
> new file mode 100755
> index 0000000..f55dbd6
> --- /dev/null
> +++ b/tests/verifyresults-linkhuge_rw.sh
> @@ -0,0 +1,21 @@
> +#!/bin/bash
> +# linkhuge_rw is expected to fail only if binutils is older than 2.6.17

err, 2.17?

> +
> +# If the return value of linkhuge_rw was PASS, then it is expected
> +if [ $1 -eq 0 ]; then
> +     exit 0
> +fi
> +
> +# If the result was FAIL but it is an old binutils, it's expected
> +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
> +     echo Binutils is too old to support the test

Perhaps it would be good to say what version was detected and what
version is needed?

It would be nice if this test could be simplified as

if [ "${BINUTILS_VERSION}" < "2.17" ]; then
  yadda yadda
fi

but in my half-assed testing attempts, I mostly got bash to complain
about file redirection? Shouldn't lexicographic order be enough here?

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