From 95ce3928de8c08934ab7ba49492b319cbdb0c9f9 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Wed, 11 Mar 2015 10:19:03 -0700 Subject: Fix the Lua FPM dissector test. In the FPM dissector test, only check the fields produced by the frame and FPM dissectors. Change-Id: I212afb8a8a4a7a9aa54391b0d5971b982b819395 Reviewed-on: https://code.wireshark.org/review/7643 Reviewed-by: Graham Bloice Tested-by: Graham Bloice --- test/suite-wslua.sh | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/suite-wslua.sh b/test/suite-wslua.sh index d45062427c..8608c2a0e6 100755 --- a/test/suite-wslua.sh +++ b/test/suite-wslua.sh @@ -100,8 +100,18 @@ wslua_step_dissector_test() { return fi - # then run tshark again with the verification script. (it internally reads in testin.txt) - $TSHARK -r $CAPTURE_DIR/segmented_fpm.pcap -X lua_script:$TESTS_DIR/lua/dissectFPM.lua -o fpm.dissect_tcp:true -V > testin.txt 2>&1 + FPM_ARGS=" + -r $CAPTURE_DIR/segmented_fpm.pcap + -X lua_script:$TESTS_DIR/lua/dissectFPM.lua + -T fields + -e frame.number + -e fpm + -e fpm.version + -e fpm.type + -e fpm.length + " + # run tshark with the FPM dissector script, enabling dissect_tcp_pdus(). + $TSHARK $FPM_ARGS -o fpm.dissect_tcp:true > testin.txt 2>&1 RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then echo @@ -110,7 +120,8 @@ wslua_step_dissector_test() { return fi - $TSHARK -r $CAPTURE_DIR/segmented_fpm.pcap -X lua_script:$TESTS_DIR/lua/dissectFPM.lua -o fpm.dissect_tcp:false -V > testout.txt 2>&1 + # run tshark with the FPM dissector script, disabling dissect_tcp_pdus(). + $TSHARK $FPM_ARGS -o fpm.dissect_tcp:false > testout.txt 2>&1 RETURNVALUE=$? if [ ! $RETURNVALUE -eq $EXIT_OK ]; then echo @@ -480,7 +491,7 @@ wslua_suite() { test_step_add "wslua tvb" wslua_step_tvb_test } # -# Editor modelines - http://www.wireshark.org/tools/modelines.html +# Editor modelines - https://www.wireshark.org/tools/modelines.html # # Local variables: # c-basic-offset: 8 -- cgit v1.2.3