summaryrefslogtreecommitdiff
path: root/source4/script/tests/selftest.sh
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2007-02-27 02:59:22 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:48:56 -0500
commitad3b40d258e09c7ddbfee387bd46e8b1d22e64c3 (patch)
tree48f1546e4e188e36bbad7628223e8676cbdcdb61 /source4/script/tests/selftest.sh
parente2aa39b0247508df60e719dd01c19bfecae3bcb6 (diff)
downloadsamba-ad3b40d258e09c7ddbfee387bd46e8b1d22e64c3.tar.gz
samba-ad3b40d258e09c7ddbfee387bd46e8b1d22e64c3.tar.bz2
samba-ad3b40d258e09c7ddbfee387bd46e8b1d22e64c3.zip
r21554: Use a snippet from tridge's junkcode to cause us to wait for smbd to
exit. If we kill smbd right away, we can interrupt the gcov data file writeout. Instead, we now wait up to 20 seconds for the process to exit, before sending it a kill -9. Andrew Bartlett (This used to be commit c547bce3d305f64d65961051e6462b8c83871f38)
Diffstat (limited to 'source4/script/tests/selftest.sh')
-rwxr-xr-xsource4/script/tests/selftest.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/source4/script/tests/selftest.sh b/source4/script/tests/selftest.sh
index 70a91d4697..92fba70c4a 100755
--- a/source4/script/tests/selftest.sh
+++ b/source4/script/tests/selftest.sh
@@ -247,7 +247,11 @@ exit $?
) 9>$SMBD_TEST_FIFO
totalfailed=$?
-kill `cat $PIDDIR/smbd.pid`
+smbd_PID=`cat $PIDDIR/smbd.pid`
+waitforpid $smbd_PID 20 || {
+ echo "smbd process $1 took more than 20 seconds to exit, killing"
+ kill -9 $smbd_PID
+}
if [ "$TEST_LDAP"x = "yesx" ]; then
if test -z "$FEDORA_DS_PREFIX"; then