mirror of
https://github.com/morgan9e/libfprint-fpc1020
synced 2026-04-14 00:14:16 +09:00
tests: Be stricter on valgrind leak checks
We used to ignore leaks, and we are ending up in having various of them, so let's make valgrind to exit with error when using the valgrind test setup (so in CI) to catch them better.
This commit is contained in:
19
tests/libfprint.supp
Normal file
19
tests/libfprint.supp
Normal file
@@ -0,0 +1,19 @@
|
||||
{
|
||||
<ignore_dl_open_leaks>
|
||||
Memcheck:Leak
|
||||
fun:malloc
|
||||
...
|
||||
fun:dlopen*
|
||||
}
|
||||
|
||||
{
|
||||
<ignore-gusb-get-string-desc-uninitialized-memory>
|
||||
Memcheck:Param
|
||||
socketcall.sendto(msg)
|
||||
...
|
||||
fun:send
|
||||
...
|
||||
fun:g_usb_device_get_string_descriptor
|
||||
...
|
||||
}
|
||||
|
||||
@@ -234,17 +234,26 @@ valgrind = find_program('valgrind', required: false)
|
||||
if valgrind.found()
|
||||
glib_share = glib_dep.get_pkgconfig_variable('prefix') / 'share' / glib_dep.name()
|
||||
glib_suppressions = glib_share + '/valgrind/glib.supp'
|
||||
libfprint_suppressions = '@0@/@1@'.format(meson.source_root(),
|
||||
files('libfprint.supp')[0])
|
||||
python_suppressions = '@0@/@1@'.format(meson.source_root(),
|
||||
files('valgrind-python.supp')[0])
|
||||
libfprint_wrapper = [
|
||||
valgrind.path(),
|
||||
'--tool=memcheck',
|
||||
'--leak-check=full',
|
||||
'--leak-resolution=high',
|
||||
'--error-exitcode=1',
|
||||
'--errors-for-leak-kinds=definite',
|
||||
'--track-origins=yes',
|
||||
'--show-leak-kinds=definite,possible',
|
||||
'--show-error-list=yes',
|
||||
'--suppressions=' + libfprint_suppressions,
|
||||
'--suppressions=' + glib_suppressions,
|
||||
'--suppressions=' + python_suppressions,
|
||||
]
|
||||
add_test_setup('valgrind',
|
||||
timeout_multiplier: 10,
|
||||
timeout_multiplier: 15,
|
||||
exe_wrapper: libfprint_wrapper,
|
||||
env: [
|
||||
'G_SLICE=always-malloc',
|
||||
|
||||
Reference in New Issue
Block a user