run-all.sh directs debug logs into the logs subdirectory (or $LOGDIR if
present in the environment). Log file names include the current UNIX
timestamp and a postfix to identify the specific log:
-- log0 = wpa_supplicant debug log for the first radio
-- log1 = wpa_supplicant debug log for the second radio
-- log2 = wpa_supplicant debug log for the third radio
+- *.log0 = wpa_supplicant debug log for the first radio
+- *.log1 = wpa_supplicant debug log for the second radio
+- *.log2 = wpa_supplicant debug log for the third radio
- hostapd = hostapd debug log
- hwsim0 = wlantest debug log
- hwsim0.pcapng = capture with all frames exchanged during the tests
logger.info(e)
reset_devs(dev, apdev)
+ for i in range(0, 3):
+ try:
+ import getpass
+ srcname = os.path.join(args.logdir, 'log' + str(i))
+ dstname = os.path.join(args.logdir, name + '.log' + str(i))
+ num = 0
+ while os.path.exists(dstname):
+ dstname = os.path.join(args.logdir, name + '.log' + str(i) + '-' + str(num))
+ num = num + 1
+ os.rename(srcname, dstname)
+ dev[i].request("RELOG")
+ subprocess.call(['sudo', 'chown', '-f', getpass.getuser(),
+ srcname])
+ except Exception, e:
+ logger.info("Failed to rename log files")
+ logger.info(e)
+
if log_handler:
log_handler.stream.close()
logger.removeHandler(log_handler)
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -d > $LOGDIR/hwsim0 &
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 \
- $(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE > $LOGDIR/log$i &
+ $(printf -- "$CONCURRENT_ARGS" $i) -ddKt$TRACE -f $LOGDIR/log$i &
done
sudo $VALGRIND_HAPD $HAPD -ddKt$TRACE -g /var/run/hostapd-global -G $GROUP -ddKt > $LOGDIR/hostapd &
sleep 1
-sudo chown -f $USER $LOGDIR/hwsim0.pcapng
+sudo chown -f $USER $LOGDIR/hwsim0.pcapng $LOGDIR/log*
if [ "x$VALGRIND" = "xy" ]; then
sudo chown -f $USER $LOGDIR/*valgrind*
fi