coreutils
[Top][All Lists]
Advanced

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

Re: [PATCH] tests: avoid false positive valgrind failures


From: Bernhard Voelker
Subject: Re: [PATCH] tests: avoid false positive valgrind failures
Date: Thu, 20 Dec 2012 02:20:28 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0


On 12/20/2012 01:15 AM, Pádraig Brady wrote:
> * init.cfg (require_valgrind_): Check the `true` program,
> which will check more valgrind failure cases as now
> detailed in the function comments.
> ---
>  init.cfg |    8 ++++++--
>  1 files changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/init.cfg b/init.cfg
> index e853b0a..64f63cb 100644
> --- a/init.cfg
> +++ b/init.cfg
> @@ -159,10 +159,14 @@ require_strace_()
>    fi
>  }
>  
> -# Skip the current test if valgrind doesn't work.
> +# Skip the current test if valgrind doesn't work,
> +# which could happen if not installed,
> +# or hasn't support for the built architecture,
> +# or hasn't appropriate error suppressions installed etc.
>  require_valgrind_()
>  {
> -  valgrind --help >/dev/null || skip_ "requires valgrind"
> +  valgrind --error-exitcode true 2>/dev/null ||
> +    skip_ "requires a working valgrind"
>  }
>  
>  require_setfacl_()

On my OpenSuSE-12.1 system (okay, I should upgrade ...), valgrind
is working, but the --error-exitcode option seems to require a
value ... ;-(

  $ valgrind --error-exitcode true
  valgrind: Bad option: --error-exitcode
  valgrind: Use --help for more information or consult the user manual.

  $ valgrind --error-exitcode=0 true
  ==22439== Memcheck, a memory error detector
  ==22439== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
  ==22439== Using Valgrind-3.6.1 and LibVEX; rerun with -h for copyright info
  ==22439== Command: true
  ==22439==
  ==22439==
  ==22439== HEAP SUMMARY:
  ==22439==     in use at exit: 0 bytes in 0 blocks
  ==22439==   total heap usage: 0 allocs, 0 frees, 0 bytes allocated
  ==22439==
  ==22439== All heap blocks were freed -- no leaks are possible
  ==22439==
  ==22439== For counts of detected and suppressed errors, rerun with: -v
  ==22439== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 6 from 6)

Have a nice day,
Berny



reply via email to

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