[PATCH] Add check-valgrind

Tom de Vries tdevries@suse.de
Fri Mar 26 07:09:56 GMT 2021


On 3/25/21 9:32 PM, Mark Wielaard wrote:
> Hi,
> 
> On Thu, Mar 25, 2021 at 02:57:17PM +0100, Tom de Vries wrote:
>> Add a make target check-valgrind, that applies valgrind to dwz when used in
>> the testsuite.
>>
>> Any comments?
> 
> It might be good to simply always run under valgrind when it is
> installed. That makes make check slightly slower by default, but it
> makes sure things are always also ran under valgrind if available.
> 

Hmm, makes sense.  Make check with dwz-tests.exp goes from 11s to 34s on
my laptop, which is still bearable.

OTOH, I also run the external testsuite once in a while, and that one
goes from 1m19s to 15m17s, which I don't like as default behaviour.

So I'm not sure yet about making this the default.

> To make sure that a valgrind tool error really causes a check failure use
> --error-exitcode=99 (or some other non-zero code):
> 
>    --error-exitcode=<number> [default: 0]
>        Specifies an alternative exit code to return if Valgrind reported
>        any errors in the run. When set to the default value (zero), the
>        return value from Valgrind will always be the return value of the
>        process being simulated. When set to a nonzero value, that value is
>        returned instead, if Valgrind detects any errors. This is useful
>        for using Valgrind as part of an automated test suite, since it
>        makes it easy to detect test cases for which Valgrind has reported
>        errors, just by inspecting return codes.
> 

Thanks, I've included that, and committed.

- Tom


More information about the Dwz mailing list