Fix the Lua FPM dissector test.
authorGerald Combs <gerald@wireshark.org>
Wed, 11 Mar 2015 17:19:03 +0000 (10:19 -0700)
committerGraham Bloice <graham.bloice@trihedral.com>
Thu, 12 Mar 2015 10:44:14 +0000 (10:44 +0000)
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 <graham.bloice@trihedral.com>
Tested-by: Graham Bloice <graham.bloice@trihedral.com>
test/suite-wslua.sh

index d45062427c0ea1a35ddc9c3dcaaee20fcc396aa6..8608c2a0e65e9be7a0daa90af7b63f5c1e408d6c 100755 (executable)
@@ -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