From: Jouni Malinen Date: Mon, 22 Jan 2024 16:27:24 +0000 (+0200) Subject: tests: Allow valgrind suppressions to be used X-Git-Tag: hostap_2_11~435 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f873abd0d9a9c6abfe690c7b4ba06318dba45f24;p=thirdparty%2Fhostap.git 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 --- diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index 79fc05f9b..dc5500170 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -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