From b9930aef960759be70d12027e8cbe64eb905996b Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sat, 19 Jul 2008 14:28:41 +0000 Subject: [PATCH] add monitor testing to concurrency tests data --- tests/scripts/defines.sh | 2 ++ tests/scripts/monitor_data.sh | 17 +++++++++-------- tests/scripts/test008-concurrency | 8 ++++++-- tests/scripts/test036-meta-concurrency | 6 +++++- tests/scripts/test039-glue-ldap-concurrency | 6 +++++- 5 files changed, 27 insertions(+), 12 deletions(-) diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index 88900d78a6..6f77c0c5bf 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -163,6 +163,8 @@ TOOLPROTO="-P 3" LDIFFILTER=$SRCDIR/scripts/acfilter.sh CONFFILTER=$SRCDIR/scripts/conf.sh +MONITORDATA=$SRCDIR/scripts/monitor_data.sh + SLAPADD="$TESTWD/../servers/slapd/slapd -Ta -d 0 $LDAP_VERBOSE" SLAPCAT="$TESTWD/../servers/slapd/slapd -Tc -d 0 $LDAP_VERBOSE" SLAPINDEX="$TESTWD/../servers/slapd/slapd -Ti -d 0 $LDAP_VERBOSE" diff --git a/tests/scripts/monitor_data.sh b/tests/scripts/monitor_data.sh index d27dbd9976..9eef239d6a 100755 --- a/tests/scripts/monitor_data.sh +++ b/tests/scripts/monitor_data.sh @@ -14,20 +14,20 @@ ## . MONITORDB="$1" -DATADIR="$2" -TESTDIR="$3" +SRCDIR="$2" +DSTDIR="$3" echo "MONITORDB $MONITORDB" -echo "DATADIR $DATADIR" -echo "TESTDIR $TESTDIR" +echo "SRCDIR $SRCDIR" +echo "DSTDIR $DSTDIR" echo "pwd `pwd`" # copy test data -cp "$DATADIR"/do_* "$TESTDIR" +cp "$SRCDIR"/do_* "$DSTDIR" if test $MONITORDB != no ; then - # add back-monitor testing - cat >> "$TESTDIR/do_search.0" << EOF + # add back-monitor testing data + cat >> "$DSTDIR/do_search.0" << EOF cn=Monitor (objectClass=*) cn=Monitor @@ -38,10 +38,11 @@ cn=Monitor (objectClass=*) EOF - cat >> "$TESTDIR/do_read.0" << EOF + cat >> "$DSTDIR/do_read.0" << EOF cn=Backend 1,cn=Backends,cn=Monitor cn=Entries,cn=Statistics,cn=Monitor cn=Database 1,cn=Databases,cn=Monitor EOF fi + diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index 689e5b2156..0b1654e1d9 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -54,9 +54,13 @@ for i in 0 1 2 3 4 5; do sleep 5 done +# fix test data to include back-monitor, if available +# NOTE: copies do_* files from $DATADIR to $TESTDIR +$MONITORDATA "$MONITORDB" "$DATADIR" "$TESTDIR" + echo "Using tester for concurrent server access..." -time $SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $LOOPS -#$SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 +time $SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $LOOPS +#$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $LOOPS RC=$? if test $RC != 0 ; then diff --git a/tests/scripts/test036-meta-concurrency b/tests/scripts/test036-meta-concurrency index a42c99d35e..8f95c7eb89 100755 --- a/tests/scripts/test036-meta-concurrency +++ b/tests/scripts/test036-meta-concurrency @@ -189,8 +189,12 @@ for f in $TESTDIR/$DATADIR/do_bind.* ; do echo "" >> $f done +# fix test data to include back-monitor, if available +# NOTE: copies do_* files from $TESTDIR/$DATADIR to $TESTDIR +$MONITORDATA "$MONITORDB" "$TESTDIR/$DATADIR" "$TESTDIR" + echo "Using tester for concurrent server access..." -$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT3 \ +$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT3 \ -D "cn=Manager,$METABASEDN" -w $PASSWD -l $TESTLOOPS -r 20 -FF \ -i '!REFERRAL' RC=$? diff --git a/tests/scripts/test039-glue-ldap-concurrency b/tests/scripts/test039-glue-ldap-concurrency index 53a9bb1fec..f1038b3eab 100755 --- a/tests/scripts/test039-glue-ldap-concurrency +++ b/tests/scripts/test039-glue-ldap-concurrency @@ -177,8 +177,12 @@ for f in $TESTDIR/$DATADIR/do_bind.* ; do echo "" >> $f done +# fix test data to include back-monitor, if available +# NOTE: copies do_* files from $TESTDIR/$DATADIR to $TESTDIR +$MONITORDATA "$MONITORDB" "$TESTDIR/$DATADIR" "$TESTDIR" + echo "Using tester for concurrent server access..." -$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR/$DATADIR" -h $LOCALHOST -p $PORT3 \ +$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT3 \ -D "cn=Manager,$METABASEDN" -w $PASSWD \ -l $TESTLOOPS -L $TESTOLOOPS -r 20 -FF \ -i '!REFERRAL' -- 2.39.5