]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#3731] Fix valgrind
authorAndrei Pavel <andrei@isc.org>
Tue, 4 Mar 2025 09:30:40 +0000 (11:30 +0200)
committerFrancis Dupont <fdupont@isc.org>
Thu, 13 Mar 2025 17:03:36 +0000 (18:03 +0100)
meson.build
src/bin/admin/tests/meson.build
src/bin/agent/tests/meson.build
src/bin/d2/tests/meson.build
src/bin/dhcp4/tests/meson.build
src/bin/dhcp6/tests/meson.build
src/bin/netconf/tests/shtests/meson.build
src/bin/shell/tests/meson.build

index 0782cb6a59d53339a77246a7c3c706c6ecb22f20..d610e17451a6e57dfed6bef09bc01d252e5c35de 100644 (file)
@@ -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
 
index 90f3fa752c9366c220a1da9974736d110317d077..ed257f97ebbf93a1d861c1f3df0d5df5a9b778f7 100644 (file)
@@ -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
index 24046a790aee9677ab68669fea6427fc00245381..bc9af0b942e819aa9b51574cdeb0e1e7efeefd89 100644 (file)
@@ -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',
index 8cdaa3dd90e09753417e15a561ba56a815e6de7e..f464393ee6da918c01cabcb10715ea442671e178 100644 (file)
@@ -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',
index 05e15707ee6f6491de74f2d4c934928df045974a..2102956f887f6d1d88dfbd7dbd2f2759112c3629 100644 (file)
@@ -46,6 +46,7 @@ test(
     workdir: current_build_dir,
     is_parallel: false,
     priority: -1,
+    suite: 'shell-tests',
 )
 configure_file(
     input: 'marker_file.h.in',
index 0a894d02e0a31f9cf73d962ed17e7581accc5cd6..1b4e47b808d82868c8e9674fe3acb335cc69d4d7 100644 (file)
@@ -46,6 +46,7 @@ test(
     workdir: current_build_dir,
     is_parallel: false,
     priority: -1,
+    suite: 'shell-tests',
 )
 configure_file(
     input: 'marker_file.h.in',
index 6751566e4e1b008dd1a1419c691ffe3415dbc397..f969fa028e703bfed933aa4ce07edec56ddfe463 100644 (file)
@@ -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',
+)
index 757a5207d8819c81734061d9257133642e37de1f..393c99946c07e277a82bd30a35bc8b5a06d0de7e 100644 (file)
@@ -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',
 )