]> git.notmuchmail.org Git - notmuch/commitdiff
test: Make the --valgrind option useful, (and drop --verbose).
authorCarl Worth <cworth@cworth.org>
Mon, 20 Sep 2010 21:28:13 +0000 (14:28 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 20 Sep 2010 21:28:13 +0000 (14:28 -0700)
In order for --valgrind to be useful, we drop noisy additional output of
all of the commands being executed in verbose mode. This makes --verbose
alone quite useless, so we don't document it any more.

Also, add a zlib valgrind suppression that was showing up frequently in the
test suite.

test/README
test/test-lib.sh
test/valgrind/default.supp [deleted file]
test/valgrind/suppressions [new file with mode: 0644]
test/valgrind/valgrind.sh

index 5861cc498027af53cbf3bcde2aec61e274bd4e13..50b3acd236989c95189a87ca73f3d890e07583ef 100644 (file)
@@ -17,11 +17,6 @@ one of the executable scripts in this directory, (such as ./search,
 
 The following command-line options are available when running tests:
 
---verbose::
-       This makes the test more verbose.  Specifically, the
-       command being run and their output if any are also
-       output.
-
 --debug::
        This may help the person who is developing a new test.
        It causes the command defined with test_debug to run.
index d5d61e4e81634092b1c4394774a902694e04447b..b21b4358f7c70791e7ca6c7d7a20706058cb5ff6 100644 (file)
@@ -385,7 +385,6 @@ test_expect_equal ()
        expected="$2"
        if ! test_skip "$@"
        then
-               say >&3 "expecting success: diff $output $expected"
                if [ "$output" = "$expected" ]; then
                        test_ok_ "$test_subtest_name"
                else
@@ -394,7 +393,6 @@ test_expect_equal ()
                        echo "$output" > $testname.output
                        test_failure_ "$test_subtest_name" "$(diff -u $testname.expected $testname.output)"
                fi
-               echo >&3 ""
     fi
 }
 
@@ -522,7 +520,6 @@ test_expect_failure () {
        error "bug in the test script: not 2 or 3 parameters to test-expect-failure"
        if ! test_skip "$@"
        then
-               say >&3 "checking known breakage: $2"
                test_run_ "$2"
                if [ "$?" = 0 -a "$eval_ret" = 0 ]
                then
@@ -531,7 +528,6 @@ test_expect_failure () {
                        test_known_broken_failure_ "$1"
                fi
        fi
-       echo >&3 ""
 }
 
 test_expect_success () {
@@ -540,7 +536,6 @@ test_expect_success () {
        error "bug in the test script: not 2 or 3 parameters to test-expect-success"
        if ! test_skip "$@"
        then
-               say >&3 "expecting success: $2"
                test_run_ "$2"
                if [ "$?" = 0 -a "$eval_ret" = 0 ]
                then
@@ -549,7 +544,6 @@ test_expect_success () {
                        test_failure_ "$@"
                fi
        fi
-       echo >&3 ""
 }
 
 test_expect_code () {
@@ -558,7 +552,6 @@ test_expect_code () {
        error "bug in the test script: not 3 or 4 parameters to test-expect-code"
        if ! test_skip "$@"
        then
-               say >&3 "expecting exit code $1: $3"
                test_run_ "$3"
                if [ "$?" = 0 -a "$eval_ret" = "$1" ]
                then
@@ -567,7 +560,6 @@ test_expect_code () {
                        test_failure_ "$@"
                fi
        fi
-       echo >&3 ""
 }
 
 # test_external runs external test scripts that provide continuous
@@ -613,7 +605,6 @@ test_external_without_stderr () {
        [ -f "$stderr" ] || error "Internal error: $stderr disappeared."
        descr="no stderr: $1"
        shift
-       say >&3 "expecting no stderr from previous command"
        if [ ! -s "$stderr" ]; then
                rm "$stderr"
                test_ok_ "$descr"
diff --git a/test/valgrind/default.supp b/test/valgrind/default.supp
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/test/valgrind/suppressions b/test/valgrind/suppressions
new file mode 100644 (file)
index 0000000..6abf8b2
--- /dev/null
@@ -0,0 +1,6 @@
+{
+   zlib inflation uses uninitialize values
+   Memcheck:Cond
+   fun:inflateReset2
+   fun:inflateInit2_
+}
\ No newline at end of file
index 582b4dca9497363c7bfd6ae5ecc2c98d28d5ac0a..3bc90f5cd178fa9686605797f8fe1baea78c3727 100755 (executable)
@@ -13,7 +13,7 @@ TRACK_ORIGINS=--track-origins=yes
 
 exec valgrind -q --error-exitcode=126 \
        --leak-check=no \
-       --suppressions="$GIT_VALGRIND/default.supp" \
+       --suppressions="$GIT_VALGRIND/suppressions" \
        --gen-suppressions=all \
        $TRACK_ORIGINS \
        --log-fd=4 \