aboutsummaryrefslogtreecommitdiffstats
path: root/test/suite-wslua.sh
diff options
context:
space:
mode:
authorHadriel Kaplan <hadrielk@yahoo.com>2014-03-19 12:14:09 -0400
committerAlexis La Goutte <alexis.lagoutte@gmail.com>2014-03-19 17:02:40 +0000
commitc8a98f37ec300b522a732c349a7d3f0c17b7168d (patch)
tree6eedd23e705a4f8b801850cf782281de206fac52 /test/suite-wslua.sh
parenta68e3a410c210e798aa9c96c03ef5cc075f19ca9 (diff)
Fix lua file testsuite not working and weak heuristic readers not being registered
The testsuite for Lua file reader/writer uses the acme_file.lua script to generate a pcapng file from an Acme sipmsg.log file. It then compares the tshark verbose output of this new pcapng file to a sip.pcapng file in the test/captures directory that was previously made. Unfortunately, the acme_file.lua script generates a timestamp based on local system timezone, rather than UTC, so the testsuite fails if not run in the EST timezone where the sip.pcapng file was originally made. This has now been fixed. Also, trying to register new weak heuristic readers fails because the GArray is terminated with a NULL-based row without Glib knowing about that. So this commit changes it to let Glib handle the NULL-terminated row, so that appending takes it into account automatically. Change-Id: I037ce1cfbda03585b3a1e159df78ff8ebb41fc32 Reviewed-on: https://code.wireshark.org/review/741 Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com>
Diffstat (limited to 'test/suite-wslua.sh')
-rwxr-xr-xtest/suite-wslua.sh19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/suite-wslua.sh b/test/suite-wslua.sh
index 0b8fc4e339..a3b14f8091 100755
--- a/test/suite-wslua.sh
+++ b/test/suite-wslua.sh
@@ -79,7 +79,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testin.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-1 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -90,7 +90,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testout.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-2 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -101,7 +101,7 @@ wslua_step_file_test() {
echo
cat ./testin.txt
cat ./testout.txt
- test_step_failed "reading the pcap file with Lua did not match internal"
+ test_step_failed "subtest-3 reading the pcap file with Lua did not match internal"
fi
# Now generate a new capture file using the Lua writer.
@@ -110,7 +110,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testout.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-4 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -120,7 +120,7 @@ wslua_step_file_test() {
else
echo
cat ./testout.txt
- test_step_failed "writing the pcap out as Lua did not match dhcp.cap"
+ test_step_failed "subtest-5 creating a new pcap file using Lua did not match dhcp.cap"
fi
# Now read an acme sipmsg.log using the acme Lua reader, writing it out as pcapng.
@@ -129,7 +129,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testout.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-6 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -139,7 +139,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testout.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-7 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -149,7 +149,7 @@ wslua_step_file_test() {
if [ ! $RETURNVALUE -eq $EXIT_OK ]; then
echo
cat ./testin.txt
- test_step_failed "exit status of $DUT: $RETURNVALUE"
+ test_step_failed "subtest-8 exit status of $DUT: $RETURNVALUE"
return
fi
@@ -159,7 +159,8 @@ wslua_step_file_test() {
else
echo
cat ./testout.txt
- test_step_failed "writing the acme sipmsg.log out as pcapng did not match sip.pcapng"
+ diff ./testout.txt ./testin.txt
+ test_step_failed "subtest-9 writing the acme sipmsg.log out as pcapng did not match sip.pcapng"
fi
}