;;
esac
+echo "Testing no limits requested for rootdn=$MANAGERDN..."
+$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret \
+ -D "$MANAGERDN" \
+ '(objectClass=*)' >$SEARCHOUT 2>&1
+RC=$?
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
+case $RC in
+ 0)
+ echo "...success (got $COUNT entries)"
+ ;;
+ *)
+ echo "ldapsearch failed ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ ;;
+esac
+
+SIZELIMIT=4
+echo "Testing limit requested for rootdn=$MANAGERDN..."
+$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
+ -D "$MANAGERDN" \
+ '(objectClass=*)' >$SEARCHOUT 2>&1
+RC=$?
+COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
+case $RC in
+ 0)
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ ;;
+ 4)
+ echo "...bumped into requested size limit ($SIZELIMIT)"
+ ;;
+ *)
+ echo "ldapsearch failed ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ ;;
+esac
+
SIZELIMIT=2
echo "Testing size limit request ($SIZELIMIT) for unlimited ID..."
$LDAPRSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 -w secret -z $SIZELIMIT \
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into the requested size limit ($SIZELIMIT; got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
echo "...bumped into requested size limit ($SIZELIMIT)"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success (got $COUNT entries)"
+ echo "...didn't bump into the requested time limit ($TIMELIMIT s; got $COUNT entries)"
;;
3)
- echo "...bumped into requested time limit ($TIMELIMIT s; $COUNT entries)"
+ echo "...bumped into requested time limit ($TIMELIMIT s; got $COUNT entries)"
;;
*)
echo "ldapsearch failed ($RC)!"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into server-side size limit (got $COUNT entries)"
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
;;
4)
- echo "...bumped into server-side size limit ($COUNT)"
+ echo "...bumped into server-side size limit (got $COUNT entries)"
;;
*)
echo "ldapsearch failed ($RC)!"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
echo "...bumped into requested ($SIZELIMIT) size limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ if test "$COUNT" -gt "$SIZELIMIT" ; then
+ echo "...error: got $COUNT entries instead of the requested $SIZELIMIT"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
+ echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
- echo "...bumped into requested ($SIZELIMIT) size limit"
+ echo "...error:bumped into requested ($SIZELIMIT) size limit"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
;;
11)
echo "...bumped into server-side hard size administrative limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
echo "...bumped into requested ($SIZELIMIT=$COUNT) size limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
11)
echo "...bumped into unchecked administrative limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...error: didn't bump into server-side unchecked limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ fi
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
;;
11)
echo "...bumped into unchecked administrative limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into server-side unchecked limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...error: didn't bump into server-side unchecked limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ fi
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
;;
11)
echo "...bumped into unchecked administrative limit"
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)
COUNT=`awk '/^# numEntries:/ {print $3}' $SEARCHOUT`
case $RC in
0)
- echo "...success; didn't bump into either requested ($SIZELIMIT) or server-side size limit (got $COUNT entries)"
+ if test x"$COUNT" != x ; then
+ echo "...didn't bump into server-side size limit (got $COUNT entries)"
+ else
+ echo "...error: did not expect ldapsearch success ($RC)!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
+ fi
;;
4)
if test "x$COUNT" != "x" ; then
- if test "x$SIZELIMIT" = "x$COUNT" ; then
- echo "...bumped into requested ($SIZELIMIT) size limit"
- else
- echo "...bumped into server-side size limit ($COUNT)"
- fi
+ echo "...bumped into server-side size limit ($COUNT)"
else
- echo "...bumped into either requested ($SIZELIMIT) or server-side size limit"
+ echo "...error: bumped into server-side size limit, but got 0 entries!"
+ test $KILLSERVERS != no && kill -HUP $KILLPIDS
+ exit $RC
fi
;;
*)