ctdb-tests: Drop cleanup_handler()
authorMartin Schwenke <martin@meltin.net>
Mon, 8 Oct 2018 02:38:10 +0000 (13:38 +1100)
committerAmitay Isaacs <amitay@samba.org>
Tue, 6 Nov 2018 06:16:16 +0000 (07:16 +0100)
Running testsuite-specific code here isn't a good option.

Daemons are now shut down in ctdb_test_exit(), even when testing is
interrupted.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/tests/run_tests.sh

index 8eead527b33bae016078104b5b0d3d3205ae7283..dc9027df99687829820d47fb9889049510aa1598 100755 (executable)
@@ -284,18 +284,7 @@ do_cleanup ()
     fi
 }
 
-cleanup_handler ()
-{
-    if $TEST_CLEANUP ; then
-       if [ -n "$TEST_LOCAL_DAEMONS" -a "$f" = "simple" ] ; then
-           echo "***** shutting down daemons *****"
-           find_and_run_one_test simple/99_daemons_shutdown.sh "$tests_dir"
-       fi
-    fi
-    do_cleanup
-}
-
-trap cleanup_handler SIGINT SIGTERM
+trap do_cleanup SIGINT SIGTERM
 
 declare -a tests
 i=0