From daacf23672ce3cf0d98f8c18e0fa2f017746c213 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Tue, 4 Jul 2000 22:11:12 +0000 Subject: [PATCH] Report return code on failure --- tests/scripts/test001-slapadd | 4 ++-- tests/scripts/test002-populate | 4 ++-- tests/scripts/test003-search | 12 ++++++------ tests/scripts/test004-modify | 8 ++++---- tests/scripts/test006-acls | 6 +++--- tests/scripts/test007-replication | 6 +++--- tests/scripts/test008-concurrency | 6 +++--- tests/scripts/test009-referral | 12 ++++++------ tests/scripts/test010-passwd | 18 +++++++++--------- 9 files changed, 38 insertions(+), 38 deletions(-) diff --git a/tests/scripts/test001-slapadd b/tests/scripts/test001-slapadd index 9a2a283019..efe811eae7 100755 --- a/tests/scripts/test001-slapadd +++ b/tests/scripts/test001-slapadd @@ -24,7 +24,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -46,7 +46,7 @@ done kill -HUP $PID if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" exit $RC fi diff --git a/tests/scripts/test002-populate b/tests/scripts/test002-populate index 1f59703832..fdf62cb97d 100755 --- a/tests/scripts/test002-populate +++ b/tests/scripts/test002-populate @@ -37,7 +37,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ $LDIFORDERED > $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then - echo "ldapadd failed!" + echo "ldapadd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -49,7 +49,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ kill -HUP $PID if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" exit $RC fi diff --git a/tests/scripts/test003-search b/tests/scripts/test003-search index eb79e876d3..bced8e1fbb 100755 --- a/tests/scripts/test003-search +++ b/tests/scripts/test003-search @@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do done if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -52,7 +52,7 @@ echo "Testing exact searching..." $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ 'sn=jensen' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -61,7 +61,7 @@ echo "Testing OR searching..." $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ '(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -70,7 +70,7 @@ echo "Testing AND matching and ends-with searching..." $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -79,7 +79,7 @@ echo "Testing NOT searching..." $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ '(!(objectclass=person))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi diff --git a/tests/scripts/test004-modify b/tests/scripts/test004-modify index 59db1498a6..f485007de7 100755 --- a/tests/scripts/test004-modify +++ b/tests/scripts/test004-modify @@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do done if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -113,7 +113,7 @@ EOMODS RC=$? if test $RC != 0 ; then - echo "ldapmodify failed!" + echo "ldapmodify failed ($RC)!" kill -HUP $PID exit $RC fi @@ -124,7 +124,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ RC=$? kill -HUP $PID if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" exit $RC fi diff --git a/tests/scripts/test006-acls b/tests/scripts/test006-acls index 63557bd79b..a9defa4414 100755 --- a/tests/scripts/test006-acls +++ b/tests/scripts/test006-acls @@ -21,7 +21,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -41,7 +41,7 @@ for i in 0 1 2 3 4 5; do done if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -120,7 +120,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ RC=$? kill -HUP $PID if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" exit $RC fi diff --git a/tests/scripts/test007-replication b/tests/scripts/test007-replication index 07b60921ab..f71a002120 100755 --- a/tests/scripts/test007-replication +++ b/tests/scripts/test007-replication @@ -73,7 +73,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ $LDIFORDERED > /dev/null 2>&1 RC=$? if test $RC != 0 ; then - echo "ldapadd failed!" + echo "ldapadd failed ($RC)!" kill -HUP $PID $SLAVEPID $SLURPPID exit $RC fi @@ -148,7 +148,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $PORT \ 'objectclass=*' > $MASTEROUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID $SLURPPID exit $RC fi @@ -158,7 +158,7 @@ $LDAPSEARCH -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ 'objectclass=*' > $SLAVEOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID $SLURPPID exit $RC fi diff --git a/tests/scripts/test008-concurrency b/tests/scripts/test008-concurrency index 753bcc357a..8110d37e61 100755 --- a/tests/scripts/test008-concurrency +++ b/tests/scripts/test008-concurrency @@ -24,7 +24,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -51,7 +51,7 @@ $SLAPDTESTER -b "$BASEDN" -P "$PROGDIR" -d "$DATADIR" -h localhost -p $PORT -D " RC=$? if test $RC != 0 ; then - echo "slapd-tester failed!" + echo "slapd-tester failed ($RC)!" exit $RC fi @@ -63,7 +63,7 @@ RC=$? kill -HUP $PID if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" exit $RC fi diff --git a/tests/scripts/test009-referral b/tests/scripts/test009-referral index 9cc30645e2..745c9cff99 100755 --- a/tests/scripts/test009-referral +++ b/tests/scripts/test009-referral @@ -26,7 +26,7 @@ echo "Running slapadd to build slapd database..." $LDIF2LDBM -f $CONF -l $LDIF RC=$? if test $RC != 0 ; then - echo "slapadd failed!" + echo "slapadd failed ($RC)!" exit $RC fi @@ -50,7 +50,7 @@ for i in 0 1 2 3 4 5; do done if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID exit $RC fi @@ -72,7 +72,7 @@ echo "Testing exact searching..." $LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ 'sn=jensen' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID exit $RC fi @@ -81,7 +81,7 @@ echo "Testing OR searching..." $LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ '(|(objectclass=groupofnames)(sn=jones))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID exit $RC fi @@ -90,7 +90,7 @@ echo "Testing AND matching and ends-with searching..." $LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ '(&(objectclass=groupofnames)(cn=A*))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID exit $RC fi @@ -99,7 +99,7 @@ echo "Testing NOT searching..." $LDAPSEARCH -C -S "" -b "$BASEDN" -h localhost -p $SLAVEPORT \ '(!(objectclass=person))' >> $SEARCHOUT 2>&1 if test $RC != 0 ; then - echo "ldapsearch failed!" + echo "ldapsearch failed ($RC)!" kill -HUP $PID $SLAVEPID exit $RC fi diff --git a/tests/scripts/test010-passwd b/tests/scripts/test010-passwd index 3d71698224..7c8c12c236 100755 --- a/tests/scripts/test010-passwd +++ b/tests/scripts/test010-passwd @@ -37,7 +37,7 @@ $LDAPADD -D "$MANAGERDN" -h localhost -p $PORT -w $PASSWD < \ $LDIFPASSWD > $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then - echo "ldapadd failed!" + echo "ldapadd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -59,7 +59,7 @@ $LDAPPASSWD -h localhost -p $PORT \ "cn=md5, $BASEDN" >> $TESTOUT 2>&1 RC=$? if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -67,7 +67,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -75,7 +75,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -83,7 +83,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w secret -s newsecret \ "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -95,7 +95,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ "cn=md5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -103,7 +103,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ "cn=smd5, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -111,7 +111,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ "cn=sha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi @@ -119,7 +119,7 @@ $LDAPPASSWD -h localhost -p $PORT \ -w newsecret \ "cn=ssha, $BASEDN" >> $TESTOUT 2>&1 if test $RC != 0 ; then - echo "ldappasswd failed!" + echo "ldappasswd failed ($RC)!" kill -HUP $PID exit $RC fi -- 2.39.5