Diff for /tests/scripts/relay between versions 1.13 and 1.13.2.9

version 1.13, 2006/01/03 22:12:29 version 1.13.2.9, 2011/01/04 23:51:03
Line 1 Line 1
 #! /bin/sh  #! /bin/sh
 # $OpenLDAP: pkg/ldap/tests/scripts/relay,v 1.12 2005/09/30 05:32:49 hyc Exp $  # $OpenLDAP: pkg/ldap/tests/scripts/relay,v 1.13.2.8 2010/04/19 19:14:31 quanah Exp $
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.  ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##  ##
 ## Copyright 1998-2006 The OpenLDAP Foundation.  ## Copyright 1998-2011 The OpenLDAP Foundation.
 ## All rights reserved.  ## All rights reserved.
 ##  ##
 ## Redistribution and use in source and binary forms, with or without  ## Redistribution and use in source and binary forms, with or without
Line 17  echo "Using $RELAY backend..." Line 17  echo "Using $RELAY backend..."
 echo ""  echo ""
   
 echo "Starting slapd on TCP/IP port $PORT1..."  echo "Starting slapd on TCP/IP port $PORT1..."
   echo "======== Starting slapd with $RELAY backend ========" >> $LOG1
 . $CONFFILTER $BACKEND $MONITORDB < $RELAYCONF > $CONF1  . $CONFFILTER $BACKEND $MONITORDB < $RELAYCONF > $CONF1
 $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING > $LOG1 2>&1 &  $SLAPD -f $CONF1 -h $URI1 -d $LVL $TIMING >> $LOG1 2>&1 &
 PID=$!  PID=$!
 if test $WAIT != 0 ; then  if test $WAIT != 0 ; then
     echo PID $PID      echo PID $PID
Line 60  cat /dev/null > $SEARCHOUT Line 61  cat /dev/null > $SEARCHOUT
 BASEDN="dc=example,dc=com"  BASEDN="dc=example,dc=com"
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 71  fi Line 72  fi
 BASEDN="o=Example,c=US"  BASEDN="o=Example,c=US"
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 82  fi Line 83  fi
 BASEDN="o=Esempio,c=IT"  BASEDN="o=Esempio,c=IT"
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 93  fi Line 94  fi
 BASEDN="o=Beispiel,c=DE"  BASEDN="o=Beispiel,c=DE"
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 232  fi Line 233  fi
   
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 243  fi Line 244  fi
 BASEDN="o=Esempio,c=IT"  BASEDN="o=Esempio,c=IT"
 echo "Searching base=\"$BASEDN\"..."  echo "Searching base=\"$BASEDN\"..."
 echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT  echo "# searching base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
         echo "Search failed ($RC)!"          echo "Search failed ($RC)!"
Line 260  echo "#  attrs=\"'*' ref\"" >> $SEARCHOU Line 261  echo "#  attrs=\"'*' ref\"" >> $SEARCHOU
 BASEDN="dc=example,dc=com"  BASEDN="dc=example,dc=com"
 echo "  base=\"$BASEDN\"..."  echo "  base=\"$BASEDN\"..."
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 272  fi Line 273  fi
 BASEDN="o=Example,c=US"  BASEDN="o=Example,c=US"
 echo "  base=\"$BASEDN\"..."  echo "  base=\"$BASEDN\"..."
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 284  fi Line 285  fi
 BASEDN="o=Esempio,c=IT"  BASEDN="o=Esempio,c=IT"
 echo "  base=\"$BASEDN\"..."  echo "  base=\"$BASEDN\"..."
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" -M "$FILTER" '*' ref \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 301  echo " base=\"$BASEDN\"..." Line 302  echo " base=\"$BASEDN\"..."
 echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT  echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT
 echo "#         attrs=\"seeAlso\"" >> $SEARCHOUT  echo "#         attrs=\"seeAlso\"" >> $SEARCHOUT
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" seeAlso \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" seeAlso \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 317  echo " base=\"$BASEDN\"..." Line 318  echo " base=\"$BASEDN\"..."
 echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT  echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT
 echo "#         attrs=\"uid\"" >> $SEARCHOUT  echo "#         attrs=\"uid\"" >> $SEARCHOUT
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" uid \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" uid \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 333  echo " base=\"$BASEDN\"..." Line 334  echo " base=\"$BASEDN\"..."
 echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT  echo "# searching filter=\"$FILTER\"" >> $SEARCHOUT
 echo "#         attrs=\"member\"" >> $SEARCHOUT  echo "#         attrs=\"member\"" >> $SEARCHOUT
 echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT  echo "#         base=\"$BASEDN\"..." >> $SEARCHOUT
 $LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" member \  $LDAPSEARCH -S '' -h $LOCALHOST -p $PORT1 -b "$BASEDN" "$FILTER" member \
         >> $SEARCHOUT 2>&1          >> $SEARCHOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 0 ; then  if test $RC != 0 ; then
Line 343  if test $RC != 0 ; then Line 344  if test $RC != 0 ; then
 fi  fi
   
 echo "Filtering ldapsearch results..."  echo "Filtering ldapsearch results..."
 . $LDIFFILTER < $SEARCHOUT > $SEARCHFLT  $LDIFFILTER < $SEARCHOUT > $SEARCHFLT
 echo "Filtering original ldif used to create database..."  echo "Filtering original ldif used to create database..."
 . $LDIFFILTER < $RELAYOUT > $LDIFFLT  $LDIFFILTER < $RELAYOUT > $LDIFFLT
 echo "Comparing filter output..."  echo "Comparing filter output..."
 $CMP $SEARCHFLT $LDIFFLT > $CMPOUT  $CMP $SEARCHFLT $LDIFFLT > $CMPOUT
                   
Line 385  $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \ Line 386  $LDAPCOMPARE -h $LOCALHOST -p $PORT1 \
         "cn=Added User,ou=Alumni Association,ou=People,$BASEDN" \          "cn=Added User,ou=Alumni Association,ou=People,$BASEDN" \
         "seeAlso:cn=All Staff,ou=Groups,$BASEDN" >> $TESTOUT 2>&1          "seeAlso:cn=All Staff,ou=Groups,$BASEDN" >> $TESTOUT 2>&1
 RC=$?  RC=$?
 if test $RC != 6 ; then  if test $RC != 6 && test $RC,$BACKEND != 5,null ; then
         echo "Compare failed ($RC)!"          echo "Compare failed ($RC)!"
         test $KILLSERVERS != no && kill -HUP $KILLPIDS          test $KILLSERVERS != no && kill -HUP $KILLPIDS
         exit $RC          exit 1
 fi  fi
   
 test $KILLSERVERS != no && kill -HUP $KILLPIDS  test $KILLSERVERS != no && kill -HUP $KILLPIDS
   

Removed from v.1.13  
changed lines
  Added in v.1.13.2.9


______________
© Copyright 1998-2020, OpenLDAP Foundation, info@OpenLDAP.org