Skip to content

Commit 4fdb98e

Browse files
committed
Add Valgrind suppression file and integrate into test script
Created a `valgrind.supp` file to suppress specific known issues during memory checks. Updated the test script to utilize this suppression file in the Valgrind command, improving test reliability and reducing false positives.
1 parent 431496f commit 4fdb98e

2 files changed

Lines changed: 44 additions & 1 deletion

File tree

scripts/run_tests.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,10 @@ def __init__(self):
3030
self.__ppc_num_proc = None
3131
self.__ppc_env = None
3232
self.work_dir = None
33-
self.valgrind_cmd = "valgrind --error-exitcode=1 --leak-check=full --show-leak-kinds=all"
33+
34+
suppression_file = Path(self.__get_project_path()) / "valgrind.supp"
35+
self.valgrind_cmd = (f"valgrind --suppressions={suppression_file} "
36+
f"--error-exitcode=1 --leak-check=full --show-leak-kinds=all")
3437

3538
if platform.system() == "Windows":
3639
self.mpi_exec = "mpiexec"

valgrind.supp

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
hwloc_still_reachable_x86_64
3+
Memcheck:Leak
4+
match-leak-kinds: reachable
5+
fun:malloc
6+
obj:/usr/lib/x86_64-linux-gnu/libhwloc.so.*
7+
}
8+
9+
{
10+
hwloc_still_reachable_x86_64_hwloc
11+
Memcheck:Leak
12+
match-leak-kinds: reachable
13+
fun:malloc
14+
obj:/usr/lib/x86_64-linux-gnu/hwloc/hwloc*.so.*
15+
}
16+
17+
{
18+
hwloc_still_reachable_aarch64
19+
Memcheck:Leak
20+
match-leak-kinds: reachable
21+
fun:malloc
22+
obj:/usr/lib/aarch64-linux-gnu/libhwloc.so.*
23+
}
24+
25+
{
26+
hwloc_still_reachable_aarch64_hwloc
27+
Memcheck:Leak
28+
match-leak-kinds: reachable
29+
fun:malloc
30+
obj:/usr/lib/x86_64-linux-gnu/hwloc/hwloc*.so.*
31+
}
32+
33+
{
34+
ignore-rdmacm-leak
35+
Memcheck:Leak
36+
match-leak-kinds: reachable
37+
fun:calloc
38+
...
39+
fun:rdma_create_event_channel
40+
}

0 commit comments

Comments
 (0)