meson.build: hook up the static symbols leak test
authorPeter Hutterer <peter.hutterer@who-t.net>
Tue, 18 Feb 2020 09:31:43 +0000 (19:31 +1000)
committerPeter Hutterer <peter.hutterer@who-t.net>
Tue, 18 Feb 2020 22:34:55 +0000 (08:34 +1000)
And because bash on F31 is leaking, we need an extra valgrind suppression.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
meson.build
test/test-static-symbols-leak.sh
test/valgrind.suppressions

index 6a1e94d0862688a0d483ac9886ffd4e6423594d6..a9dc555d14820457fd7b334458524ad14818b323 100644 (file)
@@ -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'))
index 74ff3b9e0733a5f64fb2e51912155a9167b86f9d..d1746c3b9560cb6b4c124cc354c0cfee62e00fb6 100755 (executable)
@@ -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)
index 536b2f18ddca8883d58f6a5ce4a22071f68a7df5..5fee7aa7168eaa5d30a82b951b34613959663de8 100644 (file)
    fun:ioctl
    fun:test_revoke*
 }
+{
+   <bash_memleak>
+   Memcheck:Leak
+   ...
+   fun:reader_loop
+   fun:main
+}