]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tests/TESTrun.sh
CVE-2017-13687/CHDLC: Improve bounds and length checks.
[tcpdump] / tests / TESTrun.sh
index 3bf2fbe4ffd28c4e861b4086c5bfd34bf132a2dc..6449082448d17988ccef57c597030ba27101f00c 100755 (executable)
@@ -11,28 +11,24 @@ runComplexTests()
   for i in *.sh
   do
     case $i in TEST*.sh) continue;; esac
-    if sh ./$i
-    then
-      passed=`expr $passed + 1`
-    else
-      failed=`expr $failed + 1`
-    fi
+    sh ./$i
   done
 }
 
 runSimpleTests()
 {
+  passed=`cat .passed`
+  failed=`cat .failed`
   only=$1
-  echo $passed >.passed
-  echo $failed >.failed
   cat TESTLIST | while read name input output options
   do
     case $name in
       \#*) continue;;
       '') continue;;
     esac
+    rm -f core
     [ "$only" != "" -a "$name" != "$only" ] && continue
-    if perl ./TESTonce $name $input $output "$options"
+    if ./TESTonce $name $input $output "$options"
     then
       passed=`expr $passed + 1`
       echo $passed >.passed
@@ -47,6 +43,8 @@ runSimpleTests()
   failed=`cat .failed`
 }
 
+echo $passed >.passed
+echo $failed >.failed
 if [ $# -eq 0 ]
 then
   runComplexTests