Add monitor test.

Need to hide cn=Monitor from namingContext
This commit is contained in:
Kurt Zeilenga 2002-06-19 06:00:48 +00:00
parent 95a835be51
commit 1990cad7c3
20 changed files with 111 additions and 27 deletions

View File

@ -6,6 +6,7 @@
SUBDIRS= progs
BUILD_LDBM=@BUILD_LDBM@
BUILD_BDB=@BUILD_BDB@
BUILD_MONITOR=@BUILD_MONITOR@
test: tests
tests: bdb ldbm
@ -18,7 +19,7 @@ test-bdb: FORCE
@if test "$(BUILD_BDB)" = "yes" ; then \
echo "Initiating LDAP tests for BDB..." ; \
$(MKDIR) test-db test-repl || true; \
$(srcdir)/scripts/all $(srcdir) bdb ; \
$(srcdir)/scripts/all $(srcdir) bdb $(BUILD_MONITOR) ; \
else \
echo "run configure with --enable-bdb" ; \
fi
@ -31,7 +32,7 @@ test-ldbm: FORCE
@if test "$(BUILD_LDBM)" = "yes" ; then \
echo "Initiating LDAP tests for LDBM..." ; \
$(MKDIR) test-db test-repl || true; \
$(srcdir)/scripts/all $(srcdir) ldbm ; \
$(srcdir)/scripts/all $(srcdir) ldbm $(BUILD_MONITOR); \
else \
echo "run configure with --enable-ldbm" ; \
fi

View File

@ -35,3 +35,5 @@ directory ./test-db
#suffix "dc=example,dc=com"
#directory ./test-repl
#index objectClass eq
#monitor#database monitor

View File

@ -22,6 +22,12 @@ fi
echo ">>>>> Backend: $BACKEND"
if test $# -eq 0 ; then
MONITOR=no
else
MONITOR=$1; shift
fi
SHTOOL="$SRCDIR/../build/shtool"
TB=`$SHTOOL echo -e "%B"`
@ -29,7 +35,7 @@ TN=`$SHTOOL echo -e "%b"`
for CMD in $SRCDIR/scripts/test*; do
echo ">>>>> Starting ${TB}`basename $CMD`${TN} ..."
$CMD $SRCDIR $BACKEND
$CMD $SRCDIR $BACKEND $MONITOR
RC=$?
if test $RC -eq 0 ; then
echo ">>>>> $CMD completed ${TB}OK${TN}."

View File

@ -1,3 +1,8 @@
#! /bin/sh
# $OpenLDAP$
sed -e "s/@BACKEND@/$BACKEND/" -e "s/^#$BACKEND#//"
if [ x"$MONITORDB" = x"yes" ] ; then
MON=monitor
else
MON=nomonitor
fi
sed -e "s/@BACKEND@/$BACKEND/" -e "s/^#$BACKEND#//" -e "s/^#$MON#//"

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
@ -25,7 +29,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $SCHEMACONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $SCHEMACONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then
@ -33,7 +37,7 @@ if test $WAIT != 0 ; then
read foo
fi
echo "Using ldapsearch to retrieve all the entries..."
echo "Using ldapsearch to retrieve the root DSE..."
for i in 0 1 2 3 4 5; do
$LDAPSEARCH -b "" -s base -h $LOCALHOST -p $PORT 'extensibleObject' > $SEARCHOUT 2>&1
RC=$?
@ -43,6 +47,12 @@ for i in 0 1 2 3 4 5; do
fi
done
if test $RC = 0 -a $MONITORDB = yes ; then
echo "Using ldapsearch to retrieve the cn=Monitor..."
$LDAPSEARCH -b "cn=Monitor" -s base -h $LOCALHOST -p $PORT 'extensibleObject' >> $SEARCHOUT 2>&1
RC=$?
fi
kill -HUP $PID
cat $SEARCHOUT

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -24,7 +28,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $CONF > $ADDCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
@ -33,7 +37,7 @@ if test $RC != 0 ; then
fi
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $MCONF > $ADDCONF
. $CONFFILTER $BACKEND $MONITORDB < $MCONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
@ -31,7 +35,7 @@ if test $RC != 0 ; then
fi
echo "Running slapindex to index slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPINDEX -f $DBCONF
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -25,7 +29,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $ACLCONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $ACLCONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -39,7 +43,7 @@ echo "Cleaning up in $REPLDIR..."
rm -f $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $MASTERCONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $MASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then
@ -48,7 +52,7 @@ if test $WAIT != 0 ; then
fi
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
. $CONFFILTER $BACKEND < $SLAVECONF > $REPLCONF
. $CONFFILTER $BACKEND $MONITORDB < $SLAVECONF > $REPLCONF
$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -24,7 +28,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -28,7 +32,7 @@ rm -f $DBDIR/[!C]*
rm -f $REPLDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPADD -f $DBCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
@ -45,7 +49,7 @@ if test $WAIT != 0 ; then
fi
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
. $CONFFILTER $BACKEND < $REFSLAVECONF > $REPLCONF
. $CONFFILTER $BACKEND $MONITORDB < $REFSLAVECONF > $REPLCONF
$SLAPD -n slave -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $PWCONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then

View File

@ -12,6 +12,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -44,7 +48,7 @@ rm -f $REPLDIR/replica/[!C]*
rm -f $REPLDIR/[!C]*
echo "Starting master slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $SUBMASTERCONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $SUBMASTERCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then
@ -53,7 +57,7 @@ if test $WAIT != 0 ; then
fi
echo "Starting slave slapd on TCP/IP port $SLAVEPORT..."
. $CONFFILTER $BACKEND < $SUBSLAVECONF > $REPLCONF
. $CONFFILTER $BACKEND $MONITORDB < $SUBSLAVECONF > $REPLCONF
$SLAPD -f $REPLCONF -h $SLAVEURI -d $LVL $TIMING > $SLAVELOG 2>&1 &
SLAVEPID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -24,7 +28,7 @@ mkdir $DBDIR/C_db1 $DBDIR/C_db2 $DBDIR/C_db3
rm -f $DBDIR/[!C]* $DBDIR/C_db?/*
echo "Running slapadd to build glued slapd databases..."
. $CONFFILTER $BACKEND < $GLUECONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $GLUECONF > $DBCONF
$SLAPADD -d $LVL -f $DBCONF -l $LDIFORDERED > $DBDIR/slapadd.log 2>&1
RC=$?
if test $RC != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Starting slapd on TCP/IP port $PORT..."
. $CONFFILTER $BACKEND < $PWCONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $PWCONF > $DBCONF
$SLAPD -f $DBCONF -h $MASTERURI -d $LVL $TIMING > $MASTERLOG 2>&1 &
PID=$!
if test $WAIT != 0 ; then

View File

@ -9,6 +9,10 @@ BACKEND=bdb
if test $# -ge 1 ; then
BACKEND=$1; shift
fi
MONITORDB=no
if test $# -ge 1 ; then
MONITORDB=$1; shift
fi
WAIT=0
if test $# -ge 1 ; then
WAIT=1; shift
@ -22,7 +26,7 @@ echo "Cleaning up in $DBDIR..."
rm -f $DBDIR/[!C]*
echo "Running slapadd to build slapd database..."
. $CONFFILTER $BACKEND < $MCONF > $ADDCONF
. $CONFFILTER $BACKEND $MONITORDB < $MCONF > $ADDCONF
$SLAPADD -f $ADDCONF -l $LDIFORDERED
RC=$?
if test $RC != 0 ; then
@ -31,7 +35,7 @@ if test $RC != 0 ; then
fi
echo "Running slapindex to index slapd database..."
. $CONFFILTER $BACKEND < $CONF > $DBCONF
. $CONFFILTER $BACKEND $MONITORDB < $CONF > $DBCONF
$SLAPINDEX -f $DBCONF
RC=$?
if test $RC != 0 ; then