tests: Use wlantest without capture file write buffering

This makes the run_tshark() operations more reliable while still
allowing to reduce the extra wait by forcing wlantest to flush the
packets to the pcapng file.

Signed-off-by: Jouni Malinen <j@w1.fi>
This commit is contained in:
Jouni Malinen 2015-11-27 00:12:38 +02:00
parent e929eb39d6
commit d2e7cfc0bd
2 changed files with 2 additions and 2 deletions

View file

@ -103,7 +103,7 @@ fi
test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7 channels=$NUM_CH support_p2p_device=0 test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7 channels=$NUM_CH support_p2p_device=0
sudo ifconfig hwsim0 up sudo ifconfig hwsim0 up
sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dt -L $LOGDIR/hwsim0 & sudo $WLANTEST -i hwsim0 -n $LOGDIR/hwsim0.pcapng -c -dtN -L $LOGDIR/hwsim0 &
for i in 0 1 2; do for i in 0 1 2; do
DBUSARG="" DBUSARG=""
if [ $i = "0" -a -r /var/run/dbus/pid -a -r /var/run/dbus/hwsim-test ]; then if [ $i = "0" -a -r /var/run/dbus/pid -a -r /var/run/dbus/hwsim-test ]; then

View file

@ -21,7 +21,7 @@ def run_tshark(filename, filter, display=None, wait=True):
if wait: if wait:
# wait a bit to make it more likely for wlantest sniffer to have # wait a bit to make it more likely for wlantest sniffer to have
# captured and written the results into a file that we can process here # captured and written the results into a file that we can process here
time.sleep(1) time.sleep(0.1)
try: try:
arg = [ "tshark", "-r", filename, arg = [ "tshark", "-r", filename,