valgrind: Add error supression file for POSIX arch

Added a valgrind error supression file which can be used when
running in the POSIX arch.

So far we are supressing 2 types of errors:
* One very normal in glibc, which will be triggered in the nrf52_bsim
* 2 due to the posix arch prioritizing terminating fast over terminating
cleanly. The posix arch, when posix_core_clean_up() is called, will
pthread_cancel all Zephyr threads. But it will NOT wait for them to
finnish, in case any of them was hung or there is any other problem
which would prevent it. Therefore, depending on the execution, some
times the threads will be still lingering when the main thread exits
Somethign similar applies to posix_soc_clean_up().
These 2 are not errors, but conscious choices => Therefore we
supress them

Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
This commit is contained in:
Alberto Escolar Piedras 2018-12-12 16:56:08 +01:00 committed by Carles Cufí
commit ace7bf9508

26
scripts/valgrind.supp Normal file
View file

@ -0,0 +1,26 @@
{
getpwuid() libC issue
Memcheck:Leak
match-leak-kinds: reachable
fun:malloc
fun:realloc
fun:load_blacklist
fun:bindresvport
}
{
POSIX arch no thread cleanup
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create*
fun:posix_new_thread
}
{
POSIX arch no cpu cleanup
Memcheck:Leak
match-leak-kinds: possible
...
fun:pthread_create*
fun:posix_boot_cpu
fun:main
}