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>
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