tests: Split hostapd debug log into per test case files
Signed-hostap: Jouni Malinen <j@w1.fi>
This commit is contained in:
parent
3f134b4357
commit
75428961d9
4 changed files with 23 additions and 4 deletions
|
@ -137,10 +137,9 @@ timestamp and a postfix to identify the specific log:
|
||||||
- *.log0 = wpa_supplicant debug log for the first radio
|
- *.log0 = wpa_supplicant debug log for the first radio
|
||||||
- *.log1 = wpa_supplicant debug log for the second radio
|
- *.log1 = wpa_supplicant debug log for the second radio
|
||||||
- *.log2 = wpa_supplicant debug log for the third radio
|
- *.log2 = wpa_supplicant debug log for the third radio
|
||||||
- hostapd = hostapd debug log
|
- *.hostapd = hostapd debug log
|
||||||
- hwsim0 = wlantest debug log
|
- hwsim0 = wlantest debug log
|
||||||
- hwsim0.pcapng = capture with all frames exchanged during the tests
|
- hwsim0.pcapng = capture with all frames exchanged during the tests
|
||||||
- tcpdump = tcpdump output
|
|
||||||
- *.log = debug prints from the test scripts
|
- *.log = debug prints from the test scripts
|
||||||
- trace.dat = Linux tracing record (if enabled)
|
- trace.dat = Linux tracing record (if enabled)
|
||||||
- hlr_auc_gw - hlr_auc_gw (EAP-SIM/AKA/AKA' authentication) log
|
- hlr_auc_gw - hlr_auc_gw (EAP-SIM/AKA/AKA' authentication) log
|
||||||
|
|
|
@ -33,6 +33,9 @@ class HostapdGlobal:
|
||||||
def remove(self, ifname):
|
def remove(self, ifname):
|
||||||
self.ctrl.request("REMOVE " + ifname)
|
self.ctrl.request("REMOVE " + ifname)
|
||||||
|
|
||||||
|
def relog(self):
|
||||||
|
self.ctrl.request("RELOG")
|
||||||
|
|
||||||
|
|
||||||
class Hostapd:
|
class Hostapd:
|
||||||
def __init__(self, ifname):
|
def __init__(self, ifname):
|
||||||
|
|
|
@ -304,6 +304,23 @@ def main():
|
||||||
logger.info("Failed to rename log files")
|
logger.info("Failed to rename log files")
|
||||||
logger.info(e)
|
logger.info(e)
|
||||||
|
|
||||||
|
try:
|
||||||
|
import getpass
|
||||||
|
srcname = os.path.join(args.logdir, 'hostapd')
|
||||||
|
dstname = os.path.join(args.logdir, name + '.hostapd')
|
||||||
|
num = 0
|
||||||
|
while os.path.exists(dstname):
|
||||||
|
dstname = os.path.join(args.logdir, name + '.hostapd-' + str(num))
|
||||||
|
num = num + 1
|
||||||
|
os.rename(srcname, dstname)
|
||||||
|
hapd = HostapdGlobal()
|
||||||
|
hapd.relog()
|
||||||
|
subprocess.call(['sudo', 'chown', '-f', getpass.getuser(),
|
||||||
|
srcname])
|
||||||
|
except Exception, e:
|
||||||
|
logger.info("Failed to rename hostapd log file")
|
||||||
|
logger.info(e)
|
||||||
|
|
||||||
end = datetime.now()
|
end = datetime.now()
|
||||||
diff = end - start
|
diff = end - start
|
||||||
report(conn, args.prefill, args.build, args.commit, run, name, result, diff.total_seconds())
|
report(conn, args.prefill, args.build, args.commit, run, name, result, diff.total_seconds())
|
||||||
|
|
|
@ -64,10 +64,10 @@ for i in 0 1 2; do
|
||||||
sudo $(printf -- "$VALGRIND_WPAS" $i) $WPAS -g /tmp/wpas-wlan$i -G$GROUP -Dnl80211 -iwlan$i -c $DIR/p2p$i.conf \
|
sudo $(printf -- "$VALGRIND_WPAS" $i) $WPAS -g /tmp/wpas-wlan$i -G$GROUP -Dnl80211 -iwlan$i -c $DIR/p2p$i.conf \
|
||||||
$(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
|
$(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
|
||||||
done
|
done
|
||||||
sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt > $LOGDIR/hostapd &
|
sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt -f $LOGDIR/hostapd &
|
||||||
|
|
||||||
sleep 1
|
sleep 1
|
||||||
sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/log*
|
sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/log* $LOGDIR/hostapd
|
||||||
if [ "x$VALGRIND" = "xy" ]; then
|
if [ "x$VALGRIND" = "xy" ]; then
|
||||||
sudo chown -f $USER $LOGDIR/*valgrind*
|
sudo chown -f $USER $LOGDIR/*valgrind*
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue