diff --git a/meson.build b/meson.build index 6a1e94d..a9dc555 100644 --- a/meson.build +++ b/meson.build @@ -190,6 +190,7 @@ if dep_check.found() valgrind_env = environment() valgrind_env.set('CK_TIMEOUT_MULTIPLIER', '10') valgrind_env.set('CK_FORK', 'no') + valgrind_env.set('RUNNING_ON_VALGRIND', '1') valgrind_suppressions_file = join_paths(dir_src_test, 'valgrind.suppressions') add_test_setup('valgrind', exe_wrapper: [ valgrind, @@ -203,7 +204,9 @@ if dep_check.found() message('valgrind not found, disabling valgrind test suite') endif - # FIXME: static link test + test_static_link = find_program('test/test-static-symbols-leak.sh') + test('static-symbols-leak', test_static_link, + args: [meson.current_build_dir()]) endif doxygen = find_program('doxygen', required: get_option('documentation')) diff --git a/test/test-static-symbols-leak.sh b/test/test-static-symbols-leak.sh index 74ff3b9..d1746c3 100755 --- a/test/test-static-symbols-leak.sh +++ b/test/test-static-symbols-leak.sh @@ -5,6 +5,8 @@ # Note the spaces in the expressions! After the first grep, each line # is " T symbol_name" +test -z "$RUNNING_ON_VALGRIND" || exit 77 + builddir="$1" test -f "$builddir/test-static-link" || (echo "Unable to find test file" && exit 1) diff --git a/test/valgrind.suppressions b/test/valgrind.suppressions index 536b2f1..5fee7aa 100644 --- a/test/valgrind.suppressions +++ b/test/valgrind.suppressions @@ -18,3 +18,10 @@ fun:ioctl fun:test_revoke* } +{ + + Memcheck:Leak + ... + fun:reader_loop + fun:main +}