]> git.sur5r.net Git - i3/i3/commitdiff
Add valgrind suppression file to testcases
authorTony Crisci <tony@dubstepdish.com>
Mon, 10 Mar 2014 08:47:40 +0000 (04:47 -0400)
committerMichael Stapelberg <michael@stapelberg.de>
Mon, 10 Mar 2014 16:37:41 +0000 (17:37 +0100)
The suppression file makes valgrind output more readable by hiding
reports of memory leaks for GObject-related initialization functions in
Pango and Cairo.

testcases/lib/SocketActivation.pm
testcases/valgrind.supp [new file with mode: 0644]

index 228caaa620b3eb7f05edb8573355bd53907c4ef2..d32f6051d9fa17f4af26e252892f22c71d937c1e 100644 (file)
@@ -110,6 +110,7 @@ sub activate_i3 {
         if ($args{valgrind}) {
             $i3cmd =
                 qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | .
+                qq|--suppressions="./valgrind.supp" | .
                 qq|--leak-check=full --track-origins=yes --num-callers=20 | .
                 qq|--tool=memcheck -- $i3cmd|;
         }
diff --git a/testcases/valgrind.supp b/testcases/valgrind.supp
new file mode 100644 (file)
index 0000000..150e3a6
--- /dev/null
@@ -0,0 +1,37 @@
+#
+# Valgrind suppression file for i3 testcases
+#
+# Format specification:
+# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
+#
+
+#
+# GLib
+#
+{
+    Ignore fundamental GType registration
+    Memcheck:Leak
+    ...
+    fun:g_type_register_fundamental
+    ...
+}
+
+{
+    Ignore static GType registration
+    Memcheck:Leak
+    match-leak-kinds: possible
+    ...
+    fun:g_type_register_static
+    ...
+}
+
+{
+    Ignore GObject init function
+    Memcheck:Leak
+    match-leak-kinds: possible
+    ...
+    obj:/usr/lib/libgobject-2.0*
+    ...
+    fun:call_init.part.0
+    ...
+}