From: Andrei Pavel Date: Tue, 4 Mar 2025 09:30:40 +0000 (+0200) Subject: [#3731] Fix valgrind X-Git-Tag: Kea-2.7.7~112 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a8539d9daaeff4e24fea10f516238c5297f7ffbf;p=thirdparty%2Fkea.git [#3731] Fix valgrind --- diff --git a/meson.build b/meson.build index 0782cb6a59..d610e17451 100644 --- a/meson.build +++ b/meson.build @@ -811,7 +811,26 @@ if valgrind.found() '--quiet', '--show-leak-kinds=all', '--suppressions=src/valgrind.supp', + '--xml=yes', + '--xml-file=valgrind-results-%p.xml', ], + exclude_suites: ['python-tests', 'shell-tests'], + ) + add_test_setup( + 'valgrind_gen_suppressions', + exe_wrapper: [ + valgrind, + '--child-silent-after-fork=yes', + '--fullpath-after=', + '--leak-check=full', + '--num-callers=64', + '--quiet', + '--show-leak-kinds=all', + '--suppressions=src/valgrind.supp', + '--gen-suppressions=all', + '--log-file=valgrind.supp', + ], + exclude_suites: ['python-tests', 'shell-tests'], ) endif diff --git a/src/bin/admin/tests/meson.build b/src/bin/admin/tests/meson.build index 90f3fa752c..ed257f97eb 100644 --- a/src/bin/admin/tests/meson.build +++ b/src/bin/admin/tests/meson.build @@ -10,7 +10,13 @@ admin_tests = configure_file( output: 'admin_tests.sh', configuration: kea_admin_tests_conf_data, ) -test('admin_tests.sh', admin_tests, is_parallel: false, priority: -1) +test( + 'admin_tests.sh', + admin_tests, + is_parallel: false, + priority: -1, + suite: 'shell-tests', +) memfile_tests = configure_file( input: 'memfile_tests.sh.in', output: 'memfile_tests.sh', @@ -22,6 +28,7 @@ test( # depends: [kea_admin, kea_dhcp4, kea_dhcp6, kea_lfc], is_parallel: false, priority: -1, + suite: 'shell-tests', ) mysql_tests = configure_file( input: 'mysql_tests.sh.in', @@ -34,6 +41,7 @@ if mysql.found() mysql_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) endif pgsql_tests = configure_file( @@ -47,6 +55,7 @@ if postgresql.found() pgsql_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) endif # To create the output_dir diff --git a/src/bin/agent/tests/meson.build b/src/bin/agent/tests/meson.build index 24046a790a..bc9af0b942 100644 --- a/src/bin/agent/tests/meson.build +++ b/src/bin/agent/tests/meson.build @@ -19,6 +19,7 @@ test( workdir: current_build_dir, is_parallel: false, priority: -1, + suite: 'shell-tests', ) configure_file( input: 'test_basic_auth_libraries.h.in', diff --git a/src/bin/d2/tests/meson.build b/src/bin/d2/tests/meson.build index 8cdaa3dd90..f464393ee6 100644 --- a/src/bin/d2/tests/meson.build +++ b/src/bin/d2/tests/meson.build @@ -19,6 +19,7 @@ test( workdir: current_build_dir, is_parallel: false, priority: -1, + suite: 'shell-tests', ) configure_file( input: 'test_callout_libraries.h.in', diff --git a/src/bin/dhcp4/tests/meson.build b/src/bin/dhcp4/tests/meson.build index 05e15707ee..2102956f88 100644 --- a/src/bin/dhcp4/tests/meson.build +++ b/src/bin/dhcp4/tests/meson.build @@ -46,6 +46,7 @@ test( workdir: current_build_dir, is_parallel: false, priority: -1, + suite: 'shell-tests', ) configure_file( input: 'marker_file.h.in', diff --git a/src/bin/dhcp6/tests/meson.build b/src/bin/dhcp6/tests/meson.build index 0a894d02e0..1b4e47b808 100644 --- a/src/bin/dhcp6/tests/meson.build +++ b/src/bin/dhcp6/tests/meson.build @@ -46,6 +46,7 @@ test( workdir: current_build_dir, is_parallel: false, priority: -1, + suite: 'shell-tests', ) configure_file( input: 'marker_file.h.in', diff --git a/src/bin/netconf/tests/shtests/meson.build b/src/bin/netconf/tests/shtests/meson.build index 6751566e4e..f969fa028e 100644 --- a/src/bin/netconf/tests/shtests/meson.build +++ b/src/bin/netconf/tests/shtests/meson.build @@ -9,4 +9,10 @@ netconf_shtests = configure_file( output: 'netconf_tests.sh', configuration: netconf_shtests_conf_data, ) -test('netconf_tests.sh', netconf_shtests, is_parallel: false, priority: -1) +test( + 'netconf_tests.sh', + netconf_shtests, + is_parallel: false, + priority: -1, + suite: 'shell-tests', +) diff --git a/src/bin/shell/tests/meson.build b/src/bin/shell/tests/meson.build index 757a5207d8..393c99946c 100644 --- a/src/bin/shell/tests/meson.build +++ b/src/bin/shell/tests/meson.build @@ -20,6 +20,7 @@ test( is_parallel: false, priority: -1, env: pythonpath, + suite: 'python-tests', ) ca_basic_auth_tests = configure_file( input: 'ca_basic_auth_tests.sh.in', @@ -31,6 +32,7 @@ test( ca_basic_auth_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) d2_basic_auth_tests = configure_file( input: 'd2_basic_auth_tests.sh.in', @@ -42,6 +44,7 @@ test( d2_basic_auth_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) dhcp4_basic_auth_tests = configure_file( input: 'dhcp4_basic_auth_tests.sh.in', @@ -53,6 +56,7 @@ test( dhcp4_basic_auth_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) dhcp6_basic_auth_tests = configure_file( input: 'dhcp6_basic_auth_tests.sh.in', @@ -64,6 +68,7 @@ test( dhcp6_basic_auth_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) shell_d2_process_tests = configure_file( input: 'shell_d2_process_tests.sh.in', @@ -75,6 +80,7 @@ test( shell_d2_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) shell_dhcp4_process_tests = configure_file( input: 'shell_dhcp4_process_tests.sh.in', @@ -86,6 +92,7 @@ test( shell_dhcp4_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) shell_dhcp6_process_tests = configure_file( input: 'shell_dhcp6_process_tests.sh.in', @@ -97,6 +104,7 @@ test( shell_dhcp6_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) tls_ca_process_tests = configure_file( input: 'tls_ca_process_tests.sh.in', @@ -108,6 +116,7 @@ test( tls_ca_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) tls_d2_process_tests = configure_file( input: 'tls_d2_process_tests.sh.in', @@ -119,6 +128,7 @@ test( tls_d2_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) tls_dhcp4_process_tests = configure_file( input: 'tls_dhcp4_process_tests.sh.in', @@ -130,6 +140,7 @@ test( tls_dhcp4_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', ) tls_dhcp6_process_tests = configure_file( input: 'tls_dhcp6_process_tests.sh.in', @@ -141,4 +152,5 @@ test( tls_dhcp6_process_tests, is_parallel: false, priority: -1, + suite: 'shell-tests', )