From 1ec5fb14669b8846a0042926fed2d1ed8ba1fa2f Mon Sep 17 00:00:00 2001 From: Denes Matetelki Date: Tue, 1 Mar 2011 12:24:18 +0100 Subject: [PATCH] run_test.sh uses valgrind with suppressions --- test/run_test.sh | 3 ++- test/test_threadpool.hpp | 5 ---- test/valgrind.supp | 50 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 52 insertions(+), 6 deletions(-) create mode 100644 test/valgrind.supp diff --git a/test/run_test.sh b/test/run_test.sh index 2a0b9ad..9ed5b82 100755 --- a/test/run_test.sh +++ b/test/run_test.sh @@ -10,7 +10,8 @@ lcov --directory . -z rm -f ./lcov.info echo -e "${pre}Run tests${post}" -$1 +valgrind --leak-check=full --show-reachable=yes --show-below-main=no --track-origins=yes --num-callers=30 --malloc-fill=0xaa --free-fill=0xdd --suppressions=valgrind.supp $1 + echo -e "${pre}Capture coverage info${post}" lcov --directory ../build --capture -o lcov.info diff --git a/test/test_threadpool.hpp b/test/test_threadpool.hpp index 2689cc8..916aed3 100644 --- a/test/test_threadpool.hpp +++ b/test/test_threadpool.hpp @@ -1,9 +1,4 @@ #include -/* - -#include -#include -#include */ #include "ThreadPool.hpp" #include "Task.hpp" diff --git a/test/valgrind.supp b/test/valgrind.supp new file mode 100644 index 0000000..21d6bfc --- /dev/null +++ b/test/valgrind.supp @@ -0,0 +1,50 @@ +{ + Conditional jump blabla + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start + obj:/lib64/ld-2.13.so +} + +{ + Conditional jump blabla + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start + obj:/lib64/ld-2.13.so +} + +{ + Conditional jump blabla + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start + obj:/lib64/ld-2.13.so +} + +{ + Conditional jump blabla + Memcheck:Cond + fun:_dl_relocate_object + fun:dl_main + fun:_dl_sysdep_start + fun:_dl_start + obj:/lib64/ld-2.13.so +} + +{ + pthread create stuff + Memcheck:Leak + fun:calloc + fun:_dl_allocate_tls + fun:pthread_create@@GLIBC_2.2.5 + fun:_ZN6Thread5startEv + fun:_ZN10ThreadPool18startWorkerThreadsEv + fun:main +}