]> git.sur5r.net Git - openldap/commitdiff
Handle IPv6 localhost address
authorHallvard Furuseth <hallvard@openldap.org>
Thu, 2 Jul 2009 15:26:52 +0000 (15:26 +0000)
committerHallvard Furuseth <hallvard@openldap.org>
Thu, 2 Jul 2009 15:26:52 +0000 (15:26 +0000)
tests/scripts/test056-monitor

index 2998c7c5ca8ced245079ad36fad422ac1d7a2b69..36b5cc54cbb684c42561441db4c343a2efcace06 100755 (executable)
@@ -61,11 +61,14 @@ if test $RC != 0 ; then
         exit $RC
 fi
 
+# Compare results, ignoring possible difference of IPv4/IPv6 localhost address
+localrewrite='s/=127\.0\.0\.1:/=LOCAL:/; s/=\[::1\]:/=LOCAL:/'
 echo "Filtering ldapsearch results..."
-. $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
-
+sed -e "$localrewrite" < $SEARCHOUT   | . $LDIFFILTER > $SEARCHFLT
+echo "Filtering expected data..."
+sed -e "$localrewrite" < $MONITOROUT1 | . $LDIFFILTER > $LDIFFLT
 echo "Comparing filter output..."
-$CMP $SEARCHFLT $MONITOROUT1 > $CMPOUT
+$CMP $SEARCHFLT $LDIFFLT > $CMPOUT
 
 if test $? != 0 ; then
         echo "comparison failed - connection monitor output is not correct"