After hitting test008 failure on a new system because "time" was not installed, I looked at test008, and I think the problem is someone was debugging something years ago, and checked the script in still in that state:
echo "Using tester for concurrent server access..." time $SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $TESTLOOPS #$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $TESTLOOPS RC=$?
Note the commented out line. The checkin for this change seems to confirm it was accidental as well, and that all that was intended was the "sleep 1":
quanah@b4c92f65-2064-44a6-9707-a97562610945:~/git/openldap/openldap-head$ git show 572ca2db -- tests/scripts/test008-concurrency commit 572ca2db94b0e7af95e7ac16a91cb1ea3b3d136a Author: Howard Chu hyc@openldap.org Date: Fri Sep 30 07:32:49 2005 +0000
Tweak slapd startup delays
diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index 3841c33..6ea541f 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -36,6 +36,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID"
+sleep 1 + echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ @@ -49,7 +51,8 @@ for i in 0 1 2 3 4 5; do done
echo "Using tester for concurrent server access..." -$SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 +time $SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 +#$SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 RC=$?
if test $RC != 0 ; then
Are there any objections to me switching these around so that the time line is commented out instead? ;)
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc
Quanah Gibson-Mount wrote:
After hitting test008 failure on a new system because "time" was not installed, I looked at test008, and I think the problem is someone was debugging something years ago, and checked the script in still in that state:
time is a shell built-in command, it doesn't need to be installed.
echo "Using tester for concurrent server access..." time $SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $TESTLOOPS #$SLAPDTESTER -P "$PROGDIR" -d "$TESTDIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l $TESTLOOPS RC=$?
Note the commented out line. The checkin for this change seems to confirm it was accidental as well, and that all that was intended was the "sleep 1":
It was useful to leave "time" in place as a quick check for performance regressions.
quanah@b4c92f65-2064-44a6-9707-a97562610945:~/git/openldap/openldap-head$ git show 572ca2db -- tests/scripts/test008-concurrency commit 572ca2db94b0e7af95e7ac16a91cb1ea3b3d136a Author: Howard Chu hyc@openldap.org Date: Fri Sep 30 07:32:49 2005 +0000
Tweak slapd startup delays
diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index 3841c33..6ea541f 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -36,6 +36,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID"
+sleep 1
echo "Using ldapsearch to check that slapd is running..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ @@ -49,7 +51,8 @@ for i in 0 1 2 3 4 5; do done
echo "Using tester for concurrent server access..." -$SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 +time $SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 +#$SLAPDTESTER -P "$PROGDIR" -d "$DATADIR" -h $LOCALHOST -p $PORT1 -D "$MANAGERDN" -w $PASSWD -l 50 RC=$?
if test $RC != 0 ; then
Are there any objections to me switching these around so that the time line is commented out instead? ;)
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc.
Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc
--On Saturday, April 30, 2016 3:10 AM +0100 Howard Chu hyc@symas.com wrote:
Quanah Gibson-Mount wrote:
After hitting test008 failure on a new system because "time" was not installed, I looked at test008, and I think the problem is someone was debugging something years ago, and checked the script in still in that state:
time is a shell built-in command, it doesn't need to be installed.
Not for all shells it isn't. So having time in there is non-portable. I hit this today.
--Quanah
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc
--On Friday, April 29, 2016 7:16 PM -0700 Quanah Gibson-Mount quanah@zimbra.com wrote:
time is a shell built-in command, it doesn't need to be installed.
Not for all shells it isn't. So having time in there is non-portable. I hit this today.
For example, with Ubuntu:
# /bin/sh # time blah /bin/sh: 1: time: not found # time echo "hi" /bin/sh: 2: time: not found #
--
Quanah Gibson-Mount Platform Architect Zimbra, Inc. -------------------- Zimbra :: the leader in open source messaging and collaboration A division of Synacor, Inc