]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tests/lmp-v.sh
(for 4.9.3) CVE-2018-14463/VRRP: Add a missing bounds check
[tcpdump] / tests / lmp-v.sh
index d26760d04d2163bcc25ced1b29b77a29d84099b5..a8c6740e500f2d0cc6c0447f01a56fa77fa27de2 100755 (executable)
@@ -6,6 +6,8 @@
 # GCC build and must reproduce correctly on any other GCC build regardless of
 # the architecture.
 
+exitcode=0
+
 # A Windows build may have no file named Makefile and also a version of grep
 # that won't return an error when the file does not exist. Work around.
 if [ ! -f ../Makefile ]
@@ -13,7 +15,19 @@ then
        printf '    %-35s: TEST SKIPPED (no Makefile)\n' 'lmp-v'
 elif grep '^CC = .*gcc' ../Makefile >/dev/null
 then
-  ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+       passed=`cat .passed`
+       failed=`cat .failed`
+       if ./TESTonce lmp-v lmp.pcap lmp-v.out '-T lmp -v'
+       then
+               passed=`expr $passed + 1`
+               echo $passed >.passed
+       else
+               failed=`expr $failed + 1`
+               echo $failed >.failed
+               exitcode=1
+       fi
 else
        printf '    %-35s: TEST SKIPPED (compiler is not GCC)\n' 'lmp-v'
 fi
+
+exit $exitcode