From: Kurt Spanier Date: Fri, 12 Feb 1999 15:22:43 +0000 (+0000) Subject: BugFix and selection in the test-suite of the bdb2 backend-specific X-Git-Tag: OPENLDAP_SLAPD_BACK_LDAP~587 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=548942edbea2f494cb7e69af900e98af0d8875ae;p=openldap BugFix and selection in the test-suite of the bdb2 backend-specific slapd server timing via a new slapd command line option '-t'. --- diff --git a/servers/slapd/back-bdb2/abandon.c b/servers/slapd/back-bdb2/abandon.c index bd12160f05..3e69e15f48 100644 --- a/servers/slapd/back-bdb2/abandon.c +++ b/servers/slapd/back-bdb2/abandon.c @@ -34,11 +34,11 @@ bdb2_back_abandon( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_abandon_internal( be, conn, op, msgid ); - bdb2i_stop_timing( be->be_private, time1, "ABND", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "ABND", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/add.c b/servers/slapd/back-bdb2/add.c index c96fd025de..c4e5147f68 100644 --- a/servers/slapd/back-bdb2/add.c +++ b/servers/slapd/back-bdb2/add.c @@ -239,7 +239,7 @@ bdb2_back_add( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_w( get_dbenv( be ), &lock ) != 0 ) { @@ -260,7 +260,7 @@ bdb2_back_add( ret = bdb2i_back_add_internal( be, conn, op, e ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "ADD", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "ADD", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/bind.c b/servers/slapd/back-bdb2/bind.c index 47270e37b5..8f0ae3c4a5 100644 --- a/servers/slapd/back-bdb2/bind.c +++ b/servers/slapd/back-bdb2/bind.c @@ -231,7 +231,7 @@ bdb2_back_bind( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_r( get_dbenv( be ), &lock ) != 0 ) { @@ -244,7 +244,7 @@ bdb2_back_bind( (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "BIND", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "BIND", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/close.c b/servers/slapd/back-bdb2/close.c index c956d1513c..9a78f07ab1 100644 --- a/servers/slapd/back-bdb2/close.c +++ b/servers/slapd/back-bdb2/close.c @@ -32,11 +32,11 @@ bdb2_back_db_close( BackendDB *be ) struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_db_close_internal( be ); - bdb2i_stop_timing( be->be_private, time1, "CLOSE", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "CLOSE", NULL, NULL ); return( ret ); } diff --git a/servers/slapd/back-bdb2/compare.c b/servers/slapd/back-bdb2/compare.c index b0337db606..00f37f1717 100644 --- a/servers/slapd/back-bdb2/compare.c +++ b/servers/slapd/back-bdb2/compare.c @@ -76,7 +76,7 @@ bdb2_back_compare( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_r( get_dbenv( be ), &lock ) != 0 ) { @@ -87,7 +87,7 @@ bdb2_back_compare( ret = bdb2i_back_compare_internal( be, conn, op, dn, ava ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "CMP", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "CMP", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/config.c b/servers/slapd/back-bdb2/config.c index d67ea0f62b..e38b8542eb 100644 --- a/servers/slapd/back-bdb2/config.c +++ b/servers/slapd/back-bdb2/config.c @@ -189,11 +189,11 @@ bdb2_back_db_config( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_db_config_internal( be, fname, lineno, argc, argv ); - bdb2i_stop_timing( be->be_private, time1, "DB-CONFIG", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "DB-CONFIG", NULL, NULL ); return( ret ); } diff --git a/servers/slapd/back-bdb2/delete.c b/servers/slapd/back-bdb2/delete.c index ad00966788..d7fdb3cefa 100644 --- a/servers/slapd/back-bdb2/delete.c +++ b/servers/slapd/back-bdb2/delete.c @@ -163,7 +163,7 @@ bdb2_back_delete( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_w( get_dbenv( be ), &lock ) != 0 ) { @@ -174,7 +174,7 @@ bdb2_back_delete( ret = bdb2i_back_delete_internal( be, conn, op, dn ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "DEL", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "DEL", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/group.c b/servers/slapd/back-bdb2/group.c index a8f9d9c0ad..aa89afa078 100644 --- a/servers/slapd/back-bdb2/group.c +++ b/servers/slapd/back-bdb2/group.c @@ -139,7 +139,7 @@ bdb2_back_group( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_r( get_dbenv( be ), &lock ) != 0 ) { @@ -151,7 +151,7 @@ bdb2_back_group( objectclassValue, groupattrName ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "GRP", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "GRP", NULL, NULL ); return( ret ); } diff --git a/servers/slapd/back-bdb2/init.c b/servers/slapd/back-bdb2/init.c index 2fd558cab5..eaa557f9de 100644 --- a/servers/slapd/back-bdb2/init.c +++ b/servers/slapd/back-bdb2/init.c @@ -198,10 +198,10 @@ bdb2_back_db_init( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_db_init_internal( be ); - bdb2i_stop_timing( be->be_private, time1, "DB-INIT", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "DB-INIT", NULL, NULL ); return( ret ); } diff --git a/servers/slapd/back-bdb2/modify.c b/servers/slapd/back-bdb2/modify.c index 4e602ef147..d0c0ebe86a 100644 --- a/servers/slapd/back-bdb2/modify.c +++ b/servers/slapd/back-bdb2/modify.c @@ -129,7 +129,7 @@ bdb2_back_modify( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_w( get_dbenv( be ), &lock ) != 0 ) { @@ -150,7 +150,7 @@ bdb2_back_modify( ret = bdb2i_back_modify_internal( be, conn, op, dn, modlist ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "MOD", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "MOD", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/modrdn.c b/servers/slapd/back-bdb2/modrdn.c index 28c764e8dd..1cd85cb5d6 100644 --- a/servers/slapd/back-bdb2/modrdn.c +++ b/servers/slapd/back-bdb2/modrdn.c @@ -206,7 +206,7 @@ bdb2_back_modrdn( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_w( get_dbenv( be ), &lock ) != 0 ) { @@ -219,7 +219,7 @@ bdb2_back_modrdn( newrdn, deleteoldrdn ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "MODRDN", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "MODRDN", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/search.c b/servers/slapd/back-bdb2/search.c index cee22b9082..60b9d417e6 100644 --- a/servers/slapd/back-bdb2/search.c +++ b/servers/slapd/back-bdb2/search.c @@ -335,7 +335,7 @@ bdb2_back_search( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); if ( bdb2i_enter_backend_r( get_dbenv( be ), &lock ) != 0 ) { @@ -348,7 +348,7 @@ bdb2_back_search( slimit, tlimit, filter, filterstr, attrs, attrsonly ); (void) bdb2i_leave_backend( get_dbenv( be ), lock ); - bdb2i_stop_timing( be->be_private, time1, "SRCH", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "SRCH", conn, op ); return( ret ); } diff --git a/servers/slapd/back-bdb2/startup.c b/servers/slapd/back-bdb2/startup.c index 3c7b6ecb7e..07a4b8d7d9 100644 --- a/servers/slapd/back-bdb2/startup.c +++ b/servers/slapd/back-bdb2/startup.c @@ -191,10 +191,10 @@ bdb2_back_db_startup( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_db_startup_internal( be ); - bdb2i_stop_timing( be->be_private, time1, "DB-START", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "DB-START", NULL, NULL ); return( ret ); } @@ -208,10 +208,10 @@ bdb2_back_db_shutdown( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_db_shutdown_internal( be ); - bdb2i_stop_timing( be->be_private, time1, "DB-SHUTDOWN", NULL, NULL ); + bdb2i_stop_timing( be->bd_info, time1, "DB-SHUTDOWN", NULL, NULL ); return( ret ); } diff --git a/servers/slapd/back-bdb2/unbind.c b/servers/slapd/back-bdb2/unbind.c index f4aa508fda..6b3a8757d3 100644 --- a/servers/slapd/back-bdb2/unbind.c +++ b/servers/slapd/back-bdb2/unbind.c @@ -29,10 +29,10 @@ bdb2_back_unbind( struct timeval time1; int ret; - bdb2i_start_timing( be->be_private, &time1 ); + bdb2i_start_timing( be->bd_info, &time1 ); ret = bdb2i_back_unbind_internal( be, conn, op ); - bdb2i_stop_timing( be->be_private, time1, "UNBIND", conn, op ); + bdb2i_stop_timing( be->bd_info, time1, "UNBIND", conn, op ); return( ret ); } diff --git a/tests/scripts/defines.sh b/tests/scripts/defines.sh index f7d9bf8d60..50c8497c45 100755 --- a/tests/scripts/defines.sh +++ b/tests/scripts/defines.sh @@ -17,6 +17,7 @@ if test "$BACKEND" = "bdb2" ; then ACLCONF=$DATADIR/slapd-bdb2-acl.conf MASTERCONF=$DATADIR/slapd-bdb2-repl-master.conf SLAVECONF=$DATADIR/slapd-bdb2-repl-slave.conf + TIMING="-t" else LDIF2LDBM=../servers/slapd/tools/ldif2ldbm CONF=$DATADIR/slapd-master.conf diff --git a/tests/scripts/test001-ldif2ldbm b/tests/scripts/test001-ldif2ldbm index 2c9ea80826..6ab1a5c52b 100755 --- a/tests/scripts/test001-ldif2ldbm +++ b/tests/scripts/test001-ldif2ldbm @@ -28,7 +28,7 @@ if [ $RC != 0 ]; then fi echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Using ldapsearch to retrieve all the entries..." diff --git a/tests/scripts/test001-slapadd b/tests/scripts/test001-slapadd index 2c9ea80826..6ab1a5c52b 100755 --- a/tests/scripts/test001-slapadd +++ b/tests/scripts/test001-slapadd @@ -28,7 +28,7 @@ if [ $RC != 0 ]; then fi echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Using ldapsearch to retrieve all the entries..." diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate index afc71f45ad..7852062ba1 100755 --- a/tests/scripts/test002-populate +++ b/tests/scripts/test002-populate @@ -16,7 +16,7 @@ echo "Cleaning up in $DBDIR..." rm -f $DBDIR/[!C]* echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Using ldapsearch to check that slapd is running..." diff --git a/tests/scripts/test003-search b/tests/scripts/test003-search index e5b5a2ab81..a5838c7918 100755 --- a/tests/scripts/test003-search +++ b/tests/scripts/test003-search @@ -24,7 +24,7 @@ if [ $RC != 0 ]; then fi echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Testing slapd searching..." diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify index 352c66c35f..a227160eae 100755 --- a/tests/scripts/test004-modify +++ b/tests/scripts/test004-modify @@ -24,7 +24,7 @@ if [ $RC != 0 ]; then fi echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $CONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $CONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Testing slapd modify operations..." diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls index 6d03e68422..c9b378f97c 100755 --- a/tests/scripts/test006-acls +++ b/tests/scripts/test006-acls @@ -24,7 +24,7 @@ if [ $RC != 0 ]; then fi echo "Starting slapd on TCP/IP port $PORT..." -$SLAPD -f $ACLCONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $ACLCONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Testing slapd access control..." diff --git a/tests/scripts/test007-replication b/tests/scripts/test007-replication index b66f03a1e1..b2820ef4c1 100755 --- a/tests/scripts/test007-replication +++ b/tests/scripts/test007-replication @@ -33,11 +33,11 @@ echo "Cleaning up in $REPLDIR..." rm -f $REPLDIR/[!C]* echo "Starting master slapd on TCP/IP port $PORT..." -$SLAPD -f $MASTERCONF -p $PORT -d $LVL > $MASTERLOG 2>&1 & +$SLAPD -f $MASTERCONF -p $PORT -d $LVL $TIMING > $MASTERLOG 2>&1 & PID=$! echo "Starting slave slapd on TCP/IP port $SLAVEPORT..." -$SLAPD -f $SLAVECONF -p $SLAVEPORT -d $LVL > $SLAVELOG 2>&1 & +$SLAPD -f $SLAVECONF -p $SLAVEPORT -d $LVL $TIMING > $SLAVELOG 2>&1 & SLAVEPID=$! echo "Using ldapsearch to check that master slapd is running..."