tests: Use wlantest without capture file write buffering
authorJouni Malinen <j@w1.fi>
Thu, 26 Nov 2015 22:12:38 +0000 (00:12 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 26 Nov 2015 22:12:38 +0000 (00:12 +0200)
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>
tests/hwsim/start.sh
tests/hwsim/tshark.py

index e357854..7c9da28 100755 (executable)
@@ -103,7 +103,7 @@ fi
 test -f /proc/modules && sudo modprobe mac80211_hwsim radios=7 channels=$NUM_CH support_p2p_device=0
 
 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
     DBUSARG=""
     if [ $i = "0" -a -r /var/run/dbus/pid -a -r /var/run/dbus/hwsim-test ]; then
index ee70cfd..5faed5e 100644 (file)
@@ -21,7 +21,7 @@ def run_tshark(filename, filter, display=None, wait=True):
     if wait:
         # 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
-        time.sleep(1)
+        time.sleep(0.1)
 
     try:
         arg = [ "tshark", "-r", filename,