]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Run hostapd-AS under valgrind if requested
authorJouni Malinen <jouni@qca.qualcomm.com>
Mon, 2 Jun 2014 13:20:08 +0000 (16:20 +0300)
committerJouni Malinen <j@w1.fi>
Mon, 2 Jun 2014 13:20:08 +0000 (16:20 +0300)
Previously, only hostapd-AP and wpa_supplicant processed were run under
valgrind when valgrind testing was enabled. Extend this to include
hostapd as authentication server.

Signed-off-by: Jouni Malinen <jouni@qca.qualcomm.com>
tests/hwsim/start.sh

index 5ae5ceb052bd0d9e9c36163ff5daaf8a087f5b07..a130ec11821fac21f9539f0e157d5c5017c4fc5f 100755 (executable)
@@ -51,6 +51,8 @@ if [ "$1" = "valgrind" ]; then
     VALGRIND_HAPD="valgrind --log-file=$LOGDIR/valgrind-hostapd"
     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 $HAPD_AS"
     shift
 else
     unset VALGRIND
@@ -79,9 +81,6 @@ sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt
 
 sleep 1
 sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/hwsim0 $LOGDIR/log* $LOGDIR/hostapd
-if [ "x$VALGRIND" = "xy" ]; then
-    sudo chown -f $USER $LOGDIR/*valgrind*
-fi
 
 if [ -x $HLR_AUC_GW ]; then
     cp $DIR/auth_serv/hlr_auc_gw.milenage_db $LOGDIR/hlr_auc_gw.milenage_db
@@ -90,6 +89,10 @@ fi
 
 touch $LOGDIR/hostapd.db
 sudo $HAPD_AS -ddKt $LOGDIR/as.conf $LOGDIR/as2.conf > $LOGDIR/auth_serv &
+if [ "x$VALGRIND" = "xy" ]; then
+    sleep 1
+    sudo chown -f $USER $LOGDIR/*valgrind*
+fi
 
 # wait for programs to be fully initialized
 for i in 0 1 2; do