Skip to content

Commit d5ea708

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 d5ea708

2 files changed

Lines changed: 11 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: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
hwloc_still_reachable
3+
Memcheck:Leak
4+
match-leak-kinds: reachable
5+
fun:malloc
6+
obj:/usr/lib/x86_64-linux-gnu/libhwloc.so.*
7+
}

0 commit comments

Comments
 (0)