[Top][All Lists]

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

Re: Make "make check" abort on memory leaks or errors

From: Bob Friesenhahn
Subject: Re: Make "make check" abort on memory leaks or errors
Date: Wed, 9 Jul 2014 08:52:08 -0500 (CDT)
User-agent: Alpine 2.01 (GSO 1266 2009-07-14)

For GraphicsMagick I added a 'memcheck' target which performs 'make check' under valgrind. This requires that subordinate test scripts will prefix test executable invokations with $MEMCHECK and that any necessary valgrind suppressions exist in order to allow the tests to succeed when there are no problems. Normally Automake tests run to completion and report the tests which have failed rather than immediately 'aborting' the tests. The valgrind reports can then be found in a test log file.

# memcheck: valgrind's memory access checker.
# The suppressions which come with valgrind are usually insufficient
# to handle certain pthread library aspects and gomp and so errors
# will be reported which are unrelated to GraphicsMagick.  When first
# starting with a new system (or after a major system update), it is
# good to execute the test suite like 'make memcheck
# VALGRIND_EXTRA_OPTS=--gen-suppressions=all' to create valgrind
# suppression entries in the test log.  Tell valgrind about the
# suppressions by creating a .valgrindrc file with content like:
#   --memcheck:suppressions=mysupp.supp
        $(MAKE) MEMCHECK='valgrind --tool=memcheck --leak-check=full 
--read-var-info=yes \
        --error-exitcode=2 --track-origins=yes --num-callers=12 \
        --quiet $(VALGRIND_EXTRA_OPTS)' check

Bob Friesenhahn
GraphicsMagick Maintainer,

reply via email to

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