summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/eventscripts/scripts
diff options
context:
space:
mode:
authorMartin Schwenke <martin@meltin.net>2013-08-02 16:03:42 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-08-14 15:57:03 +1000
commit2afb5632c719bc8bd8569b6af309227401f4d9b4 (patch)
tree05bdab008d26ff23f2e53584d3fa764e588ce245 /ctdb/tests/eventscripts/scripts
parentdf539a66cb92bdfa29bafbe3b33cca36375e8e0e (diff)
tests/eventscripts: Override background_with_logging(), just prepend "&"
That is, output that goes through background_with_logging() just gets "&" prepended to each line. This is cleaner than having the tests grovel through logs. Update some 49.winbind/50.samba tests to deal with this. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3ba933d806106d12bc48b83b22d0f314d9d1e5e5)
Diffstat (limited to 'ctdb/tests/eventscripts/scripts')
-rw-r--r--ctdb/tests/eventscripts/scripts/local.sh23
1 files changed, 12 insertions, 11 deletions
diff --git a/ctdb/tests/eventscripts/scripts/local.sh b/ctdb/tests/eventscripts/scripts/local.sh
index 509e14e51d..594656c413 100644
--- a/ctdb/tests/eventscripts/scripts/local.sh
+++ b/ctdb/tests/eventscripts/scripts/local.sh
@@ -701,8 +701,12 @@ program $_pn version $_ver is not available"
_opts="${STATD_HOSTNAME:+ -n }${STATD_HOSTNAME}"
;;
esac
- case "${_progname}${_action#restart}" in
- nfsd*)
+ case "$_action" in
+ *:b) _bg="&" ;;
+ *) _bg="" ;;
+ esac
+ case "$_progname" in
+ nfsd)
_t="\
Trying to restart NFS service"
@@ -710,23 +714,20 @@ Trying to restart NFS service"
for _pid in $FAKE_NFSD_THREAD_PIDS ; do
_t="\
$_t
-Stack trace for stuck nfsd thread [${_pid}]:
-[<ffffffff87654321>] fake_stack_trace_for_pid_${_pid}/stack+0x0/0xff"
+${_bg}Stack trace for stuck nfsd thread [${_pid}]:
+${_bg}[<ffffffff87654321>] fake_stack_trace_for_pid_${_pid}/stack+0x0/0xff"
done
fi
_t="\
${_t}
-Starting nfslock: OK
-Starting nfs: OK"
- ;;
- nfsd:b)
- _t="Trying to restart NFS service"
+${_bg}Starting nfslock: OK
+${_bg}Starting nfs: OK"
;;
- lockd|lockd:b)
+ lockd)
_t="\
Trying to restart lock manager service
-Starting nfslock: OK"
+${_bg}Starting nfslock: OK"
;;
*)
_t="Trying to restart $_progname [${_p}${_opts}]"