On (31/07/08 15:31), Nishanth Aravamudan didst pronounce:
> On 31.07.2008 [23:05:43 +0100], Mel Gorman wrote:
> > libhugetlbfs is able to run a variety of regression tests against the
> > currently running kernel. Some of these tests may fail due to known
> > reasons such as the kernel being too old. It is unreasonable to expect an
> > ordinary user of the library to determine that a FAIL is really an "expected
> > fail". This patch introduces a framework where verification scripts can be
> > added called verifyresults-TESTNAME.sh. It gets passed the return value
> > of the regression script and returns 0 if the output is expected and 1
> > otherwise. This in combination with a message can be used to report to the
> > user if a FAILed test is due to expected reasons.
> >
> > Signed-off-by: Mel Gorman <[EMAIL PROTECTED]>
> > ---
> > tests/run_tests.sh | 29 ++++++++++++++++++++++++++++-
> > 1 files changed, 28 insertions(+), 1 deletions(-)
> >
> > diff --git a/tests/run_tests.sh b/tests/run_tests.sh
> > index c98179d..17e1784 100755
> > --- a/tests/run_tests.sh
> > +++ b/tests/run_tests.sh
> > @@ -55,7 +55,34 @@ run_test_bits () {
> >
> > if [ -d obj$BITS ]; then
> > echo -n "$@ ($BITS): "
> > - PATH="obj$BITS:$PATH"
> > LD_LIBRARY_PATH="$LD_LIBRARY_PATH:../obj$BITS:obj$BITS" $ENV "$@"
> > + OUTPUT=`PATH="obj${BITS}:${PATH}"
> > LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:../obj${BITS}:obj${BITS}" ${ENV} "$@"`
> > + RETVAL=$?
> > +
> > + # Figure out the name of the testcase we just ran
> > + echo $1 | grep = > /dev/null
> > + while [ $? -eq 0 ]; do
> > + shift 1
> > + echo $1 | grep = > /dev/null
> > + done
>
> Ok, admittedly I'm dense, but this took me a second to figure out. We
> shifted the first parameter to run_test_bits (the word-size to test), so
> the remaining parameters are either env variable settings or the
> testcase name. So the grep for '=' is meant to skip over those params
> that are not the name. Couldn't we also just look for the last string in
> [EMAIL PROTECTED] That seems to consistently be the testcase name? Dunno if
> there is a
> simple regex that will grab it out, but maybe `sed 's/.*\ //'` ? Oh, no,
> I lie, the stress tests have parameters themselves. I guess
> yours works, then :)
>
I couldn't think of a simple regex and this would do the job.
> Two request, could you make that comment a bit more verbose that we're
> skipping over env variables assignments (only, AFAICT). And could you
> quote the '=', at first I thought it was a special flag to grep and had
> to go look at the man-page :)
>
Ok, can do. Admittedly, it does look a little odd.
--
Mel Gorman
Part-time Phd Student Linux Technology Center
University of Limerick IBM Dublin Software Lab
-------------------------------------------------------------------------
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