]> The Tcpdump Group git mirrors - tcpdump/blobdiff - tests/TESTrun.sh
CVE-2017-13687/CHDLC: Improve bounds and length checks.
[tcpdump] / tests / TESTrun.sh
index e1e306101feb402a1977a1d83c3a498fcb65ee4c..6449082448d17988ccef57c597030ba27101f00c 100755 (executable)
@@ -4,7 +4,6 @@ mkdir -p NEW
 mkdir -p DIFF
 passed=0
 failed=0
-INDENT='    '
 cat /dev/null > failure-outputs.txt
 
 runComplexTests()
@@ -12,29 +11,23 @@ runComplexTests()
   for i in *.sh
   do
     case $i in TEST*.sh) continue;; esac
-    echo -n "$INDENT"
-    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
-    echo -n "$INDENT"
     if ./TESTonce $name $input $output "$options"
     then
       passed=`expr $passed + 1`
@@ -50,6 +43,8 @@ runSimpleTests()
   failed=`cat .failed`
 }
 
+echo $passed >.passed
+echo $failed >.failed
 if [ $# -eq 0 ]
 then
   runComplexTests