tests: Allow valgrind suppressions to be used
This makes valgrind reports somewhat cleaner when external libraries have memory leaks that are not straighforward to fix. In addition, increase the number of functions to include backtraces since the default was not large enough to cover some cases. Signed-off-by: Jouni Malinen <quic_jouni@quicinc.com>
This commit is contained in:
parent
456bfec470
commit
f873abd0d9
1 changed files with 8 additions and 3 deletions
|
@ -80,12 +80,17 @@ fi
|
|||
|
||||
if [ "$1" = "valgrind" ]; then
|
||||
VALGRIND=y
|
||||
VALGRIND_WPAS="valgrind --log-file=$LOGDIR/valgrind-wlan%d --leak-check=full"
|
||||
VALGRIND_HAPD="valgrind --log-file=$LOGDIR/valgrind-hostapd --leak-check=full"
|
||||
if [ -r "$DIR/valgrind.suppressions" ]; then
|
||||
VALGRIND_SUPP=" --gen-suppressions=all --suppressions=$DIR/valgrind.suppressions"
|
||||
else
|
||||
VALGRIND_SUPP=""
|
||||
fi
|
||||
VALGRIND_WPAS="valgrind --log-file=$LOGDIR/valgrind-wlan%d --leak-check=full --num-callers=20$VALGRIND_SUPP"
|
||||
VALGRIND_HAPD="valgrind --log-file=$LOGDIR/valgrind-hostapd --leak-check=full --num-callers=20$VALGRIND_SUPP"
|
||||
chmod -f a+rx $WPAS
|
||||
chmod -f a+rx $HAPD
|
||||
chmod -f a+rx $HAPD_AS
|
||||
HAPD_AS="valgrind --log-file=$LOGDIR/valgrind-auth-serv --leak-check=full $HAPD_AS"
|
||||
HAPD_AS="valgrind --log-file=$LOGDIR/valgrind-auth-serv --leak-check=full --num-callers=20$VALGRIND_SUPP $HAPD_AS"
|
||||
shift
|
||||
else
|
||||
unset VALGRIND
|
||||
|
|
Loading…
Reference in a new issue