Add valgrind suppression file to testcases
Patch status: merged
Patch by Tony Crisci
Long description:
The suppression file makes valgrind output more readable by hiding reports of memory leaks for GObject-related initialization functions in Pango and Cairo.
To apply this patch, use:
curl http://cr.i3wm.org/patch/458/raw.patch | git am
b/testcases/lib/SocketActivation.pm
| 18 |
@@ -110,6 +110,7 @@ sub activate_i3 {
|
| 19 |
if ($args{valgrind}) {
|
| 20 |
$i3cmd = |
| 21 |
qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | . |
| 22 |
+ qq|--suppressions="./valgrind.supp" | . |
| 23 |
qq|--leak-check=full --track-origins=yes --num-callers=20 | . |
| 24 |
qq|--tool=memcheck -- $i3cmd|; |
| 25 |
} |
b/testcases/valgrind.supp
| 31 |
@@ -0,0 +1,37 @@ |
| 32 |
+# |
| 33 |
+# Valgrind suppression file for i3 testcases |
| 34 |
+# |
| 35 |
+# Format specification: |
| 36 |
+# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress |
| 37 |
+# |
| 38 |
+ |
| 39 |
+# |
| 40 |
+# GLib |
| 41 |
+# |
| 42 |
+{
|
| 43 |
+ Ignore fundamental GType registration |
| 44 |
+ Memcheck:Leak |
| 45 |
+ ... |
| 46 |
+ fun:g_type_register_fundamental |
| 47 |
+ ... |
| 48 |
+} |
| 49 |
+ |
| 50 |
+{
|
| 51 |
+ Ignore static GType registration |
| 52 |
+ Memcheck:Leak |
| 53 |
+ match-leak-kinds: possible |
| 54 |
+ ... |
| 55 |
+ fun:g_type_register_static |
| 56 |
+ ... |
| 57 |
+} |
| 58 |
+ |
| 59 |
+{
|
| 60 |
+ Ignore GObject init function |
| 61 |
+ Memcheck:Leak |
| 62 |
+ match-leak-kinds: possible |
| 63 |
+ ... |
| 64 |
+ obj:/usr/lib/libgobject-2.0* |
| 65 |
+ ... |
| 66 |
+ fun:call_init.part.0 |
| 67 |
+ ... |
| 68 |
+} |