Skip to content

Commit 9b03be6

Browse files
Tony Criscistapelberg
Tony Crisci
authored andcommitted
Add valgrind suppression file to testcases
The suppression file makes valgrind output more readable by hiding reports of memory leaks for GObject-related initialization functions in Pango and Cairo.
1 parent 192b67d commit 9b03be6

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

testcases/lib/SocketActivation.pm

+1
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ sub activate_i3 {
110110
if ($args{valgrind}) {
111111
$i3cmd =
112112
qq|valgrind -v --log-file="$outdir/valgrind-for-$test.log" | .
113+
qq|--suppressions="./valgrind.supp" | .
113114
qq|--leak-check=full --track-origins=yes --num-callers=20 | .
114115
qq|--tool=memcheck -- $i3cmd|;
115116
}

testcases/valgrind.supp

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
#
2+
# Valgrind suppression file for i3 testcases
3+
#
4+
# Format specification:
5+
# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
6+
#
7+
8+
#
9+
# GLib
10+
#
11+
{
12+
Ignore fundamental GType registration
13+
Memcheck:Leak
14+
...
15+
fun:g_type_register_fundamental
16+
...
17+
}
18+
19+
{
20+
Ignore static GType registration
21+
Memcheck:Leak
22+
match-leak-kinds: possible
23+
...
24+
fun:g_type_register_static
25+
...
26+
}
27+
28+
{
29+
Ignore GObject init function
30+
Memcheck:Leak
31+
match-leak-kinds: possible
32+
...
33+
obj:/usr/lib/libgobject-2.0*
34+
...
35+
fun:call_init.part.0
36+
...
37+
}

0 commit comments

Comments
 (0)