]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test020-proxycache
check for overflows
[openldap] / tests / scripts / test020-proxycache
index 69b75f0889f8b7b88baa8363162a2eb29a1adcb0..9435959abb927649bcba1bc24f1d131604ad1ba8 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2007 The OpenLDAP Foundation.
+## Copyright 1998-2008 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -416,34 +416,32 @@ esac
 #actually, 12 would be answerable, but since 8 made mail=*example.com
 #not answerable because of sizelimit, queries contained in it are no longer
 #answerable as well
-
-#FIXME: Anwerability test is currently disabled due to ITS#5187
-#ANSWERABILITY=111001
-#grep ANSWERABLE $LOG2 | awk -vFIRST=$FIRST '{ 
-#              if (NR > FIRST) { 
-#                      if ($2 == "NOT") 
-#                              printf "Query %d not answerable\n",NR
-#                      else 
-#                              printf "Query %d answerable\n",NR 
-#              }
-#      }' 
-#ANSWERED=`grep ANSWERABLE $LOG2 | awk -vFIRST=$FIRST '{ 
-#              if (NR > FIRST) { 
-#                      if ($2 == "NOT") 
-#                              printf "0" 
-#                      else 
-#                              printf "1"
-#              } 
-#      }'`
+ANSWERABILITY=111001
+grep ANSWERABLE $LOG2 | awk "BEGIN {FIRST=$FIRST}"'{ 
+               if (NR > FIRST) { 
+                       if ($2 == "NOT") 
+                               printf "Query %d not answerable\n",NR
+                       else 
+                               printf "Query %d answerable\n",NR 
+               }
+       }' 
+ANSWERED=`grep ANSWERABLE $LOG2 | awk "BEGIN {FIRST=$FIRST}"'{ 
+               if (NR > FIRST) { 
+                       if ($2 == "NOT") 
+                               printf "0" 
+                       else 
+                               printf "1"
+               } 
+       }'`
 
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
-#if test "$ANSWERABILITY" = "$ANSWERED" ; then
-#      echo "Successfully verified answerability"
-#else 
-#      echo "Error in verifying answerability"
-#      exit 1
-#fi
+if test "$ANSWERABILITY" = "$ANSWERED" ; then
+       echo "Successfully verified answerability"
+else 
+       echo "Error in verifying answerability"
+       exit 1
+fi
 
 echo "Filtering ldapsearch results..."
 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT