[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] tests: avoid a false memory leak test failure
From: |
Bernhard Voelker |
Subject: |
Re: [PATCH] tests: avoid a false memory leak test failure |
Date: |
Sat, 07 Dec 2013 18:56:10 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130329 Thunderbird/17.0.5 |
On 12/07/2013 05:20 PM, Pádraig Brady wrote:
> From 6664fb8917047af49efba65d88fb12eba8da6939 Mon Sep 17 00:00:00 2001
> From: =?UTF-8?q?P=C3=A1draig=20Brady?= <address@hidden>
> Date: Sat, 7 Dec 2013 16:14:40 +0000
> Subject: [PATCH] tests: avoid a false memory leak test failure
>
> * tests/misc/shuf-reservoir.sh: Restrict the valgrind
> "exit on leak" behavior to developer environments where
> specific "lint" code is enabled to avoid inconsequential leaks.
> ---
> tests/misc/shuf-reservoir.sh | 6 +++++-
> 1 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/tests/misc/shuf-reservoir.sh b/tests/misc/shuf-reservoir.sh
> index e971c59..4a23981 100755
> --- a/tests/misc/shuf-reservoir.sh
> +++ b/tests/misc/shuf-reservoir.sh
> @@ -24,6 +24,10 @@ print_ver_ shuf
> expensive_
> require_valgrind_
>
> +# Only exit with error for leaks when in development mode
> +# in which case we enable code to suppress inconsequental leaks
s/inconsequental/inconsequential/, s/$/./
> +grep '^#define lint 1' "$CONFIG_HEADER" && leaklevel=full ||
> leaklevel=summary
> +
> # Run "shuf" with specific number of input lines and output lines
> # Check the output for expected number of lines.
> run_shuf_n()
> @@ -33,7 +37,7 @@ run_shuf_n()
>
> # Critical memory-related bugs will cause a segfault here
> # (with varying numbres of input/output lines)
older typo: s/numbres/numbers/
> - seq "$INPUT_LINES" | valgrind --leak-check=full --error-exitcode=1 \
> + seq "$INPUT_LINES" | valgrind --leak-check=$leaklevel --error-exitcode=1 \
> shuf -n "$OUTPUT_LINES" -o "out_${INPUT_LINES}_${OUTPUT_LINES}" || return 1
>
> EXPECTED_LINES="$OUTPUT_LINES"
> --
> 1.7.7.6
+1 otherwise.
Thanks!
Have a nice day,
Berny
- new snapshot available: coreutils-8.21.176-37e00, Pádraig Brady, 2013/12/04
- Re: new snapshot available: coreutils-8.21.176-37e00, Pádraig Brady, 2013/12/06
- Results from GNU/Linux on power7 (all pass) and Solaris on sparc (1 fail), Pádraig Brady, 2013/12/08
- freebsd 9.1 results, Pádraig Brady, 2013/12/09
- AIX power-aix 1 7 results, Pádraig Brady, 2013/12/09
- new snapshot available: coreutils-8.21.189-b9bb, Pádraig Brady, 2013/12/09