[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] tests: clean up fedora.sh

From: Jim Meyering
Subject: Re: [PATCH] tests: clean up fedora.sh
Date: Mon, 15 Mar 2010 10:07:05 +0100

Paolo Bonzini wrote:
> On 03/14/2010 12:18 PM, Jim Meyering wrote:
>> The new fedora.sh test was annoyingly slow.
>> Yeah, 3 seconds is "slow" for some of us ;-)
>> This fixes it, along with a little clean up and concurrency-protection.
>> It relies on the "timeout" program[0], but if it's not available,
>> the three sub-tests that require that are silently skipped.
> Good!  Can you rename it to just "fedora" so that we can have the
> convention that ".sh" implies having to convert to the new testsuite?
> I also wanted to do some valgrind testing, but I ended up patching the
> test files.  Wouldn't it be easier if they still used $GREP?

I find that changing each use of "grep" to "$GREP" is
not aesthetic, and slightly prone to error: it's too easy
to forget one, in which case that use won't be checked.

Instead, when I run valgrind, I use a tiny wrapper script around
each tool under test:

Here's the one I've just generated for grep:

    #!/bin/sh --
    PATH="/home/j/w/co/grep/src/.vg-tmp:$PATH"; export PATH
      ?*:?*) q='%q{GREP_TEST_NAME}-';;
      *)     q= ;;
    exec /usr/bin/valgrind -v \
      --log-file='/tmp/vg-log-2010-03-15.10:00:43'-"${q}grep-$$" \
      --leak-check=full --track-fds=yes --num-callers=15 -- 'grep' "$@"

Then, each and every use of grep that resolves to that src/grep
(was binary, now it is just the wrapper script) invokes valgrind.

I'll post the wrapper-generating script soon.
This change goes hand in hand with the above:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]