mirror of
https://github.com/TREX-CoE/trexio.git
synced 2025-03-04 06:10:23 +01:00
Add hardcore valgring checking
This commit is contained in:
parent
886561a847
commit
0fd9779a1e
44
tests/run_valgrind.sh
Executable file
44
tests/run_valgrind.sh
Executable file
@ -0,0 +1,44 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
TESTS_C="\
|
||||
io_all \
|
||||
open_text \
|
||||
io_num_text \
|
||||
io_dset_float_text \
|
||||
io_dset_int_text \
|
||||
io_dset_sparse_text \
|
||||
io_determinant_text \
|
||||
io_jastrow_text \
|
||||
io_safe_dset_float_text \
|
||||
io_str_text \
|
||||
io_dset_str_text \
|
||||
delete_group_text \
|
||||
overwrite_all_text \
|
||||
pre_close \
|
||||
open_hdf5 \
|
||||
io_num_hdf5 \
|
||||
io_dset_float_hdf5 \
|
||||
io_dset_int_hdf5 \
|
||||
io_dset_sparse_hdf5 \
|
||||
io_determinant_hdf5 \
|
||||
io_jastrow_hdf5 \
|
||||
io_safe_dset_float_hdf5 \
|
||||
io_str_hdf5 \
|
||||
io_dset_str_hdf5 \
|
||||
delete_group_hdf5 \
|
||||
overwrite_all_hdf5"
|
||||
|
||||
TESTS="$TESTS_C test_f"
|
||||
|
||||
for test in $TESTS; do
|
||||
echo $test
|
||||
libtool --mode=execute valgrind \
|
||||
--leak-check=full \
|
||||
--show-leak-kinds=all \
|
||||
--error-exitcode=666 \
|
||||
--errors-for-leak-kinds=all \
|
||||
--suppressions=valgrind.supp \
|
||||
"$test"
|
||||
done
|
84
tests/valgrind.supp
Normal file
84
tests/valgrind.supp
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
supp1
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:calloc
|
||||
fun:H5TS_cancel_count_inc
|
||||
fun:H5check_version
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:test_*
|
||||
fun:main
|
||||
}
|
||||
{
|
||||
supp2
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:malloc
|
||||
obj:/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.3.0
|
||||
obj:/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.3.0
|
||||
fun:H5CX_push
|
||||
fun:H5Fcreate
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:test_*
|
||||
fun:main
|
||||
}
|
||||
{
|
||||
supp3
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:malloc
|
||||
fun:H5E__get_stack
|
||||
fun:H5E_clear_stack
|
||||
fun:H5Fcreate
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:test_*
|
||||
fun:main
|
||||
}
|
||||
{
|
||||
fortsupp1
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:calloc
|
||||
fun:H5TS_cancel_count_inc
|
||||
fun:H5check_version
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:__trexio_MOD_trexio_open
|
||||
fun:test_write_
|
||||
fun:MAIN__
|
||||
fun:main
|
||||
}
|
||||
{
|
||||
fortsupp2
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:malloc
|
||||
obj:/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.3.0
|
||||
obj:/usr/lib/x86_64-linux-gnu/libhdf5_serial.so.103.3.0
|
||||
fun:H5CX_push
|
||||
fun:H5Fcreate
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:__trexio_MOD_trexio_open
|
||||
fun:test_write_
|
||||
fun:MAIN__
|
||||
fun:main
|
||||
}
|
||||
{
|
||||
fortsupp3
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: reachable
|
||||
fun:malloc
|
||||
fun:H5E__get_stack
|
||||
fun:H5E_clear_stack
|
||||
fun:H5Fcreate
|
||||
fun:trexio_hdf5_init
|
||||
fun:trexio_open
|
||||
fun:__trexio_MOD_trexio_open
|
||||
fun:test_write_
|
||||
fun:MAIN__
|
||||
fun:main
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user