From d2e7cfc0bd2910434695dbfd1ccb76682f9e454f Mon Sep 17 00:00:00 2001 From: Jouni Malinen Date: Fri, 27 Nov 2015 00:12:38 +0200 Subject: [PATCH] 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 --- tests/hwsim/start.sh | 2 +- tests/hwsim/tshark.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hwsim/start.sh b/tests/hwsim/start.sh index e35785448..7c9da283b 100755 --- a/tests/hwsim/start.sh +++ b/tests/hwsim/start.sh @@ -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 diff --git a/tests/hwsim/tshark.py b/tests/hwsim/tshark.py index ee70cfd9c..5faed5e43 100644 --- a/tests/hwsim/tshark.py +++ b/tests/hwsim/tshark.py @@ -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,