From 626d7e6db5a5a8467693c6c1fb261aa4066a0021 Mon Sep 17 00:00:00 2001 From: Quanah Gibson-Mount Date: Tue, 13 Feb 2018 00:34:09 +0000 Subject: [PATCH] Wait for slapd to stop before proceeding. Otherwise this test may fail. Fix variable usage so it doesn't delete data/slapd.conf after running --- tests/data/regressions/its8752/its8752 | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/tests/data/regressions/its8752/its8752 b/tests/data/regressions/its8752/its8752 index c851f561c1..0a8150fb0a 100755 --- a/tests/data/regressions/its8752/its8752 +++ b/tests/data/regressions/its8752/its8752 @@ -150,6 +150,7 @@ fi echo "Stopping slapd and reworking configuration for MMR..." test $KILLSERVERS != no && kill -HUP $KILLPIDS +wait $KILLPIDS KILLPIDS= n=1 @@ -158,19 +159,19 @@ while [ $n -le $MMR ]; do MYLOG=`eval echo '$LOG'$n` MYCONF=`eval echo '$CONF'$n` echo "Starting provider slapd on TCP/IP URI $MYURI" - . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mmr > $CONF - sed -e "s/MMR/$n/g" $CONF > $MYCONF + . $CONFFILTER $BACKEND $MONITORDB < $ITSDIR/slapd.conf.mmr > $TESTDIR/slapd.conf + sed -e "s/MMR/$n/g" $TESTDIR/slapd.conf > $MYCONF j=1 while [ $j -le $MMR ]; do MMCURI=`eval echo '$URI'$j` - sed -e "s|MMC${j}|${MMCURI}|" $MYCONF > $CONF - mv $CONF $MYCONF + sed -e "s|MMC${j}|${MMCURI}|" $MYCONF > $TESTDIR/slapd.conf + mv $TESTDIR/slapd.conf $MYCONF j=`expr $j + 1` done - if [ -f $CONF ]; then - rm -f $CONF + if [ -f $TESTDIR/slapd.conf ]; then + rm -f $TESTDIR/slapd.conf fi - $SLAPD -f $MYCONF -h $MYURI -d $LVL $TIMING > $MYLOG 2>&1 & + $SLAPD -f $MYCONF -h $MYURI -d $LVL $TIMING >> $MYLOG 2>&1 & PID=$! if test $WAIT != 0 ; then echo PID $PID -- 2.39.5