ctdb-tests: Fix racy test for debugging hung scripts
commita7c55007659ab768293f15c5f5fc00c5d9e5c814
authorMartin Schwenke <martin@meltin.net>
Thu, 26 Jun 2014 05:16:12 +0000 (26 15:16 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 3 Jul 2014 06:19:22 +0000 (3 08:19 +0200)
tree97aca7f6a1aa8be46221d7cb6217f9038a79d270
parentb0c191e5de15e54646b02925e37458d6a56db015
ctdb-tests: Fix racy test for debugging hung scripts

Debugging can still be running when a monitor event times out and
scriptstatus output changes.

When debugging a hung script to a log file, write to a temporary file
and move the temporary file over the log file when done.  The test
then waits for the log file to appear.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Thu Jul  3 08:19:23 CEST 2014 on sn-devel-104
ctdb/config/debug-hung-script.sh
ctdb/tests/complex/90_debug_hung_script.sh