[glib/wip/gcleanup] memcheck: Support suppressions for valgrind target



commit 4b722faabb267bd377732e3b7648e73bfaea34bc
Author: Stef Walter <stefw gnome org>
Date:   Fri Nov 8 14:29:16 2013 +0100

    memcheck: Support suppressions for valgrind target

 build/glib-test.supp |    8 ++++++++
 glib-tap.mk          |   12 +++++++++++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/build/glib-test.supp b/build/glib-test.supp
new file mode 100644
index 0000000..d03fd60
--- /dev/null
+++ b/build/glib-test.supp
@@ -0,0 +1,8 @@
+{
+   glibc-tls-allocation
+   Memcheck:Leak
+   fun:calloc
+   fun:_dl_allocate_tls
+   fun:pthread_create@@GLIBC_2.2.5
+   ...
+}
diff --git a/glib-tap.mk b/glib-tap.mk
index 9572b7c..c1f40ce 100644
--- a/glib-tap.mk
+++ b/glib-tap.mk
@@ -133,5 +133,15 @@ installed_test_meta_DATA = $(installed_testcases:=.test)
 CLEANFILES += $(installed_test_meta_DATA)
 endif
 
+VALGRIND_ARGS = \
+       --leak-check=full \
+       --show-leak-kinds=all \
+       --child-silent-after-fork=yes \
+       --suppressions=$(abs_topsrcdir)/build/glib-test.supp \
+       $(NULL)
+
 memcheck: $(test_programs)
-       $(MAKE) TESTS_ENVIRONMENT="G_DEBUG='gc-friendly cleanup'" LOG_COMPILER="libtool --mode=execute 
valgrind --leak-check=full --show-leak-kinds=all --child-silent-after-fork=yes --quiet --log-fd=7" 
AM_TESTS_FD_REDIRECT="7>&2" check
+       $(MAKE) check \
+               TESTS_ENVIRONMENT="G_DEBUG='gc-friendly cleanup'" \
+               LOG_COMPILER="libtool --mode=execute valgrind $(VALGRIND_ARGS) --quiet --log-fd=7" \
+               AM_TESTS_FD_REDIRECT="7>&2"


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