[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Tue Nov 6 09:31:02 UTC 2018


The branch, master has been updated
       via  6e16e95 ctdb-daemon: Do not fork when CTDB_TEST_MODE is set
       via  01f6fbb ctdb-daemon: Switch interactive variable to a bool
       via  804bdf9 ctdb-tests: Add local_daemons.sh onnode and socket commands
       via  19de5f4 ctdb-tests: Use local_daemons.sh in local_daemons.bash
       via  46fd4f1 ctdb-tests: Add local_daemons.sh
       via  25efb92 ctdb-tests: Allow use of setup_ctdb_base() outside of test cases
       via  9679c9e ctdb-build: Don't set unused variable TEST_BIN_DIR
       via  aa0c7cc ctdb-tests: Move setting of ctdb_dir and top_dir
       via  1d86fd5 ctdb-tests: Use $CTDB_SCRIPTS_TOOLS_BIN_DIR
       via  7ac5e7a ctdb-tests: Use $CTDB_SCRIPTS_TESTS_BINDIR
       via  bde73c7 ctdb-tests: Add new variable CTDB_SCRIPTS_TESTS_BINDIR
       via  2cb82ef ctdb-tests: Change all cluster setup to use ctdb_test_init()
       via  9a2910c ctdb-tests: Drop passing of test arguments to ctdb_test_init()
       via  d762e52 ctdb-tests: Drop ctdb_restart_when_done()
       via  79db138 ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled
       via  bc8df71 ctdb-tests: Drop tests that only start and stop daemons
       via  412fb7b ctdb-tests: Move enabling of event scripts to setup_ctdb()
       via  aa2ee4b ctdb-tests: Improve signal handling trap
       via  9233723 ctdb-tests: Drop cleanup_handler()
       via  0e9ead8 ctdb-tests: Start daemons in ctdb_test_init(), stop them in ctdb_test_exit()
       via  e733e4c ctdb-tests: Ignore SIGPIPE during simple test cleanup
       via  6d9c89b ctdb-tests: Drop setting of unused variable scriptname
       via  5205680 ctdb-tests: Drop use of confusing testfailures variable
       via  9ebcebe ctdb-tests: Drop useless "ctdb version" test
       via  43c26e1 ctdb-tests: Rationalise tunable simple tests
       via  ba86eac ctdb-tests: Rationalise ctdb stop/continue/disable/enable simple tests
       via  5fdac51 ctdb-tests: Use wait_until_node_has_no_ips() in some tests
       via  eda1296 ctdb-tests: Add function wait_until_node_has_no_ips()
       via  698a9ef lib: ldb: Remove use of talloc_autofree_context().
       via  f420e8d lib: talloc: Mark talloc_autofree_context() as deprecated.
       via  44019b5 ctdb-event: Only run talloc report if CTDB_INTERACTIVE is set
       via  e952f03 ctdb-event: Never fork to become daemon in eventd
       via  4e6bd42 ctdb-daemon: Improve documentation for -i option
       via  9c41481 ctdb-daemon: Don't set log_to_stdout for become_daemon()
       via  c84254d ctdb-daemon: Avoid unnecessarily spamming the logs when in test mode
       via  1bbc4fa ctdb-tools: Detect unknown node number
       via  0846940 ctdb-tests: README updates
       via  4f4a835 ctdb-tests: Remove export of CTDB_SOCKET
       via  d246b1d ctdb-tests: Use path_socket() in dummy client
       via  3b1e597 ctdb-tests: Drop incorrect comment, unused function
       via  82e589e ctdb-tests: Drop setting of CTDB_SOCKET and CTDB_PIDFILE
       via  d75fa2c ctdb-daemon: Drop unused function ctdb_set_socketname()
       via  5f478b7 ctdb-daemon: Use path functions for socket and PID file
       via  cd02159 ctdb-tests: Use path_socket() in test client tools
       via  cc3aedd ctdb-tools: Use path_socket() in ctdb tool
       via  3856678 ctdb-tests: Use ctdb-path for fake_ctdbd directory setup
       via  d4a1f89 ctdb-tests: Use ctdb-path-like values for local daemons socket and PID file
       via  32c2ec8 ctdb-common: Allow path_socket() to use $CTDB_SOCKET
      from  2229f46 drs_utils: Avoid invalid dereference of v8 requests

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6e16e95f74c06bf381db666007a30ecb0e1ff7ce
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 18 18:02:13 2018 +1100

    ctdb-daemon: Do not fork when CTDB_TEST_MODE is set
    
    Explicitly background ctdbd instead.
    
    This has the advantage of leaving stdin open.  ctdbd can then be
    enhanced to exit when stdin closes, allowing better cleanup in a test
    environment.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
    Autobuild-Date(master): Tue Nov  6 10:30:14 CET 2018 on sn-devel-144

commit 01f6fbba4e5823f2cc028ba6f094b55812dff6ee
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Nov 6 14:06:14 2018 +1100

    ctdb-daemon: Switch interactive variable to a bool
    
    popt uses an int in place of a bool, so declare an extra int and make
    the conversion explicit.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 804bdf9719cdc128df7ba4dfe7564e5339426b35
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Oct 12 13:49:58 2018 +1100

    ctdb-tests: Add local_daemons.sh onnode and socket commands
    
    These aren't used by simple tests but they will be useful for
    integrating ctdbd local daemons into other test suites and for
    debugging.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 19de5f463d97673a15fecb97af84fc9c288af8ee
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 11 21:55:10 2018 +1100

    ctdb-tests: Use local_daemons.sh in local_daemons.bash
    
    The etc-ctdb/ subdirectory containing the event script moves into the
    top-level tests/ directory because the subdirectory is really now
    owned by local_daemons.sh instead of simple/.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 46fd4f144e7c881887db0deca0ae3b340e19afb3
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 11 19:32:09 2018 +1100

    ctdb-tests: Add local_daemons.sh
    
    This provides a separate script for handling local daemons.  It can be
    used for testing outside of the CTDB simple test suite.  It is
    installed as ctdb_local_daemons.
    
    The logic is copied from ctdb/tests/simple/scripts/local_daemons.bash.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 25efb924bf0c551e3097a116ae8f1cb46d62993f
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 11 20:23:07 2018 +1100

    ctdb-tests: Allow use of setup_ctdb_base() outside of test cases
    
    Always create an empty event script directory.  If $TEST_SUBDIR is
    unset then don't use it to look for etc-ctdb/.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9679c9e9b6c4e41d55dbe326dba9cc8c9321895b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 16:43:12 2018 +1100

    ctdb-build: Don't set unused variable TEST_BIN_DIR
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit aa0c7ccfc8314919437c0c587b2669bf9847798c
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 16:37:11 2018 +1100

    ctdb-tests: Move setting of ctdb_dir and top_dir
    
    These are only used in script_install_paths.sh.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 1d86fd537ac8990ad6babe55911aaa534cae93b6
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 16:33:51 2018 +1100

    ctdb-tests: Use $CTDB_SCRIPTS_TOOLS_BIN_DIR
    
    Don't calculate this locally as _tools_dir.  Add it to PATH
    unconditionally - this may result in duplicate entries in PATH but the
    resulting code is simpler.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 7ac5e7ae4413b23c17044cd16ca5db755d3934df
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 16:30:15 2018 +1100

    ctdb-tests: Use $CTDB_SCRIPTS_TESTS_BINDIR
    
    Don't calculate this locally as _test_bin_dir.  Just calculate
    top_dir, source script_install_paths.sh and use
    $CTDB_SCRIPT_TESTS_BINDIR.
    
    Don't bother sanity checking if TEST_BIN_DIR is set.  It will go away
    soon.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit bde73c7a044a9508bf08bb8c55a37f38d034afe0
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 16:18:49 2018 +1100

    ctdb-tests: Add new variable CTDB_SCRIPTS_TESTS_BINDIR
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 2cb82ef4533a7c10a0ccac5df36f7176f78f9e7b
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 17:25:48 2018 +1100

    ctdb-tests: Change all cluster setup to use ctdb_test_init()
    
    ctdb_test_init() now passes any arguments to setup_ctdb().
    
    Update tests that have custom local daemon configuration to call
    ctdb_test_init() directly.  Remove the redundant, initial call to
    ctdb_test_init() to avoid starting the cluster an extra time.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9a2910c60b0ae3f6bccf133ae210a7c4b9f1a7fc
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 15:04:24 2018 +1100

    ctdb-tests: Drop passing of test arguments to ctdb_test_init()
    
    Arguments are currently ignored anyway.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d762e52e65a574091f498e1305d3125cdab2c392
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:51:01 2018 +1100

    ctdb-tests: Drop ctdb_restart_when_done()
    
    This no longer does anything.  Integration test cases now start and
    shut down the cluster.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 79db138de5f1d9c95edf436d828725fc68f2d104
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:53:16 2018 +1100

    ctdb-tests: Drop dependency on variable ctdb_test_restart_scheduled
    
    The remainder of the scheduled restart logic is about to be removed,
    so produce debugging information any time the cluster is not healthy.
    
    While here, reindent and drop the else since there is already an early
    return before it.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit bc8df7191c0e3acb9763aff7cb659bbb8292b950
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:41:39 2018 +1100

    ctdb-tests: Drop tests that only start and stop daemons
    
    Integration test cases now start and shut down the cluster.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 412fb7b7d50db0ec5b68e849fc08bcb58de038d1
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Oct 9 15:09:38 2018 +1100

    ctdb-tests: Move enabling of event scripts to setup_ctdb()
    
    This is for the real cluster case.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit aa2ee4bea8d87f7095c97622b1382ef27e9105fb
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:39:30 2018 +1100

    ctdb-tests: Improve signal handling trap
    
    Interrupting a test run currently moves on to the next test.  It
    should exit.
    
    Follow the practice of exiting with 128 + signal number.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 92337234e5ebe06397e34861b10cda5dfc5b7ed5
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:38:10 2018 +1100

    ctdb-tests: Drop cleanup_handler()
    
    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 at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 0e9ead8f28fced3ebfa888786a1dc5bb59e734a3
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:30:55 2018 +1100

    ctdb-tests: Start daemons in ctdb_test_init(), stop them in ctdb_test_exit()
    
    This makes tests self-contained.  They can also now be individually
    looped, if necessary.
    
    Most tests (all but 1 complex, more than 50% of simple) restart the
    daemons anyway, so this simplification is worth it.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e733e4cb746c15af17f6df110c0163c565427983
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Nov 2 16:21:26 2018 +1100

    ctdb-tests: Ignore SIGPIPE during simple test cleanup
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 6d9c89bfa3f2bbf0dcb1b33f519e40d96acc4244
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 13:55:08 2018 +1100

    ctdb-tests: Drop setting of unused variable scriptname
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 520568051c143065dd35449ba324eb5d1d38e7ac
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 12:59:33 2018 +1100

    ctdb-tests: Drop use of confusing testfailures variable
    
    Exit on first test failure instead of setting a variable.  The bizarre
    logic in ctdb_test_exit() makes this worth dropping.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9ebcebe519af29e2ee06430d162b16328e2f625f
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 12:07:38 2018 +1100

    ctdb-tests: Drop useless "ctdb version" test
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 43c26e1e645f1f2ac85c7b03a148158534eee567
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 12:05:42 2018 +1100

    ctdb-tests: Rationalise tunable simple tests
    
    These 3 tests duplicate various checks and can easily be handled as a
    single test.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit ba86eacb66e8979781f4b1c3a486c17ca52624f1
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 11:33:08 2018 +1100

    ctdb-tests: Rationalise ctdb stop/continue/disable/enable simple tests
    
    The "continue" and "enable" tests are just extensions of the "stop"
    and "disable" tests, so drop the latter 2.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 5fdac517fa8a945eb272a645bf1e7d3f10812153
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 11:13:15 2018 +1100

    ctdb-tests: Use wait_until_node_has_no_ips() in some tests
    
    This strengthens those tests to ensure that released IPs aren't
    replaced with others.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit eda1296d678f03409471bb3419552865b805edd9
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Oct 8 11:05:41 2018 +1100

    ctdb-tests: Add function wait_until_node_has_no_ips()
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 698a9ef36e0b0f24c1cfb07ac554c942960fac35
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 5 16:57:51 2018 -0800

    lib: ldb: Remove use of talloc_autofree_context().
    
    Just use NULL in test case. talloc_autofree_context() is deprecated.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit f420e8d56fac5b74712700a88ad59da069ef4c92
Author: Jeremy Allison <jra at samba.org>
Date:   Mon Nov 5 16:56:05 2018 -0800

    lib: talloc: Mark talloc_autofree_context() as deprecated.
    
    Signed-off-by: Jeremy Allison <jra at samba.org>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 44019b55779f3e36a10c8dbbf89991177ac6a15d
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Oct 19 17:27:15 2018 +1100

    ctdb-event: Only run talloc report if CTDB_INTERACTIVE is set
    
    This is only really wanted for interactive testing when logging to
    stderr.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e952f0316b34b89a754b6805dad5c33adea7e157
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Oct 19 16:18:13 2018 +1100

    ctdb-event: Never fork to become daemon in eventd
    
    This stops ctdbd from being able to shut down eventd, since the PID it
    records will be invalid.  There's no need for eventd to fork.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 4e6bd4249395a153c1e279a77b7a02e9574c091b
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 18 17:50:09 2018 +1100

    ctdb-daemon: Improve documentation for -i option
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 9c41481f219acd2439d12f6a767dca153b9cd0ee
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 18 17:47:55 2018 +1100

    ctdb-daemon: Don't set log_to_stdout for become_daemon()
    
    ctdbd logs to stderr in interactive mode, not stdout.  This way stdout
    is always closed.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit c84254d23d62d57be8ebdd24659c426210ca0213
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Oct 17 21:24:07 2018 +1100

    ctdb-daemon: Avoid unnecessarily spamming the logs when in test mode
    
    Logging the logging location to syslog can be useful on production
    systems when the configuration goes unexpectedly missing.  However, in
    test mode this just adds noise to the logs on the test system.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 1bbc4fad434a850565fb4f74e529f8824840988a
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Oct 12 14:41:42 2018 +1100

    ctdb-tools: Detect unknown node number
    
    If there aren't enough addresses in the list then the shift will
    silently fail and the printed address will be the unshifted value of
    $1, which is incorrect/unexpected.  So, sanity check the node number.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 08469408c379e37523e76a07ac7264bded1dbf01
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Jul 5 19:04:37 2018 +1000

    ctdb-tests: README updates
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 4f4a835c3411b6e7c4ed55aba31eaf2a44624fdc
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 16:48:31 2018 +1000

    ctdb-tests: Remove export of CTDB_SOCKET
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d246b1dadfca00e09bdd3d8bae2d03e108a70276
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Aug 29 08:23:51 2018 +1000

    ctdb-tests: Use path_socket() in dummy client
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 3b1e5977d81a23553ce63e6aa3ee4c157b6f73dd
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri May 11 21:55:55 2018 +1000

    ctdb-tests: Drop incorrect comment, unused function
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 82e589e3883d861ae74c104d0226feed4593c47c
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 17:36:04 2018 +1000

    ctdb-tests: Drop setting of CTDB_SOCKET and CTDB_PIDFILE
    
    The local daemons ssh stub doesn't need to do this because the ctdbd
    and the ctdb tool now only need CTDB_TEST_MODE and CTDB_BASE for local
    daemon tests.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d75fa2c3fd7150b35c0a2ca646e83e947605166c
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 17:34:19 2018 +1000

    ctdb-daemon: Drop unused function ctdb_set_socketname()
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 5f478b7c5ff66da27cfc12e5272f72c8fbb95c62
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 17:32:33 2018 +1000

    ctdb-daemon: Use path functions for socket and PID file
    
    Drop the use of ctdb_set_sockname() because it complicates the memory
    allocation and this is the only place it is used.  Just assign to the
    relevant pointer.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit cd021596da68baf4ef6be7c2a18c64077c5c8ade
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Jul 6 15:30:31 2018 +1000

    ctdb-tests: Use path_socket() in test client tools
    
    Just leak the memory allocated by path_socket().  This is only used in
    short-lived test programs, so it isn't worth the hassle of plumbing a
    talloc context through several layers to get here.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit cc3aedd307037e20f3d2e452ebf25927cea29708
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 16:46:18 2018 +1000

    ctdb-tools: Use path_socket() in ctdb tool
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 38566780d27a744c5c47737f8f6e9d99c794801d
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu May 10 13:27:28 2018 +1000

    ctdb-tests: Use ctdb-path for fake_ctdbd directory setup
    
    This needs to be done before any of the code changes are made,
    including updating the ctdb tool.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit d4a1f897af2688409f8ed6fd492603cb0f6f7301
Author: Martin Schwenke <martin at meltin.net>
Date:   Fri Apr 20 13:18:09 2018 +1000

    ctdb-tests: Use ctdb-path-like values for local daemons socket and PID file
    
    However, don't use ctdb-path itself because some tests use nested
    instances of onnode.  The outermost instance would set CTDB_SOCKET and
    any inner instance would pick up that value, regardless of CTDB_BASE.
    
    This is a temporary measure to avoid breaking testing while use of the
    path functions is added to ctdbd and the ctdb tool.  When this is
    complete these variables can be removed altogether because the code
    will just depend on CTDB_TEST_MODE and CTDB_BASE.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 32c2ec8fa25ad21b9739a288f4a11db2bac1dc6f
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 18 16:19:40 2018 +1000

    ctdb-common: Allow path_socket() to use $CTDB_SOCKET
    
    Use of CTDB_SOCKET is being generally removed.  However, this override
    is being added to allow test code outside of ctdb/ to be able to
    specify the socket, if desired.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 ctdb/common/path.c                                 |   8 +
 ctdb/doc/ctdbd.1.xml                               |  10 +-
 ctdb/event/event_daemon.c                          |   4 +-
 ctdb/include/ctdb_client.h                         |   1 -
 ctdb/packaging/RPM/ctdb.spec.in                    |   1 +
 ctdb/server/ctdb_client.c                          |  11 -
 ctdb/server/ctdb_daemon.c                          |   2 +-
 ctdb/server/ctdbd.c                                |  55 ++-
 ctdb/tests/README                                  |   7 +-
 ctdb/tests/complex/00_ctdb_init.sh                 |  24 --
 ctdb/tests/complex/11_ctdb_delip_removes_ip.sh     |   5 +-
 ctdb/tests/complex/18_ctdb_reloadips.sh            |   5 +-
 ctdb/tests/complex/30_nfs_tickle_killtcp.sh        |   5 +-
 ctdb/tests/complex/31_nfs_tickle.sh                |   5 +-
 ctdb/tests/complex/32_cifs_tickle.sh               |   8 +-
 ctdb/tests/complex/33_gratuitous_arp.sh            |   8 +-
 ctdb/tests/complex/34_nfs_tickle_restart.sh        |   5 +-
 ctdb/tests/complex/36_smb_reset_server.sh          |   5 +-
 ctdb/tests/complex/37_nfs_reset_server.sh          |   5 +-
 ctdb/tests/complex/41_failover_ping_discrete.sh    |   5 +-
 ctdb/tests/complex/42_failover_ssh_hostname.sh     |   8 +-
 ctdb/tests/complex/43_failover_nfs_basic.sh        |   8 +-
 ctdb/tests/complex/44_failover_nfs_oneway.sh       |   5 +-
 ctdb/tests/complex/45_failover_nfs_kill.sh         |   8 +-
 ctdb/tests/complex/60_rogueip_releaseip.sh         |   5 +-
 ctdb/tests/complex/61_rogueip_takeip.sh            |   5 +-
 .../etc-ctdb/events/legacy/00.test.script          |   0
 ctdb/tests/local_daemons.sh                        | 429 +++++++++++++++++++++
 ctdb/tests/onnode/0010.sh                          |  13 +
 ctdb/tests/onnode/0011.sh                          |  13 +
 ctdb/tests/run_tests.sh                            |  14 +-
 ctdb/tests/scripts/common.sh                       |  44 +--
 ctdb/tests/scripts/integration.bash                |  81 ++--
 ctdb/tests/scripts/script_install_paths.sh         |  20 +-
 ctdb/tests/simple/00_ctdb_init.sh                  |  39 --
 ctdb/tests/simple/00_ctdb_onnode.sh                |   2 +-
 ctdb/tests/simple/01_ctdb_version.sh               |  54 ---
 ctdb/tests/simple/02_ctdb_listvars.sh              |  41 --
 ctdb/tests/simple/02_ctdb_tunables.sh              |  76 ++++
 ctdb/tests/simple/03_ctdb_getvar.sh                |  51 ---
 ctdb/tests/simple/04_ctdb_setvar.sh                |  79 ----
 ctdb/tests/simple/05_ctdb_listnodes.sh             |   4 +-
 ctdb/tests/simple/06_ctdb_getpid.sh                |   8 +-
 ctdb/tests/simple/07_ctdb_process_exists.sh        |   8 +-
 ctdb/tests/simple/08_ctdb_isnotrecmaster.sh        |   8 +-
 ctdb/tests/simple/09_ctdb_ping.sh                  |   5 +-
 ctdb/tests/simple/11_ctdb_ip.sh                    |  23 +-
 ctdb/tests/simple/12_ctdb_getdebug.sh              |   5 +-
 ctdb/tests/simple/13_ctdb_setdebug.sh              |  11 +-
 ctdb/tests/simple/14_ctdb_statistics.sh            |   2 +-
 ctdb/tests/simple/15_ctdb_statisticsreset.sh       |   5 +-
 ctdb/tests/simple/16_ctdb_config_add_ip.sh         |   5 +-
 ctdb/tests/simple/17_ctdb_config_delete_ip.sh      |   5 +-
 ctdb/tests/simple/18_ctdb_reloadips.sh             |   5 +-
 ctdb/tests/simple/19_ip_takeover_noop.sh           |  22 +-
 ctdb/tests/simple/20_delip_iface_gc.sh             |   5 +-
 ctdb/tests/simple/21_ctdb_attach.sh                |   5 +-
 ctdb/tests/simple/23_ctdb_moveip.sh                |   5 +-
 ctdb/tests/simple/24_ctdb_getdbmap.sh              |   5 +-
 ctdb/tests/simple/25_dumpmemory.sh                 |   2 +-
 ..._ctdb_config_check_error_on_unreachable_ctdb.sh |   5 +-
 ctdb/tests/simple/27_ctdb_detach.sh                |   5 +-
 ctdb/tests/simple/28_zero_eventscripts.sh          |  17 +-
 ctdb/tests/simple/31_ctdb_disable.sh               |  34 --
 ...32_ctdb_enable.sh => 32_ctdb_disable_enable.sh} |  18 +-
 ctdb/tests/simple/35_ctdb_getreclock.sh            |   2 +-
 ctdb/tests/simple/41_ctdb_stop.sh                  |  34 --
 ...2_ctdb_continue.sh => 42_ctdb_stop_continue.sh} |  17 +-
 ctdb/tests/simple/43_stop_recmaster_yield.sh       |   5 +-
 ctdb/tests/simple/51_message_ring.sh               |   2 +-
 ctdb/tests/simple/52_fetch_ring.sh                 |   2 +-
 ctdb/tests/simple/53_transaction_loop.sh           |   2 +-
 ctdb/tests/simple/54_transaction_loop_recovery.sh  |   4 +-
 ctdb/tests/simple/55_ctdb_ptrans.sh                |   2 +-
 .../simple/56_replicated_transaction_recovery.sh   |   4 +-
 ctdb/tests/simple/58_ctdb_restoredb.sh             |   2 +-
 ctdb/tests/simple/60_recoverd_missing_ip.sh        |   5 +-
 ctdb/tests/simple/69_recovery_resurrect_deleted.sh |   5 +-
 ctdb/tests/simple/70_recoverpdbbyseqnum.sh         |   5 +-
 ctdb/tests/simple/71_ctdb_wipedb.sh                |   2 +-
 ctdb/tests/simple/72_update_record_persistent.sh   |   2 +-
 ctdb/tests/simple/73_tunable_NoIPTakeover.sh       |   5 +-
 ctdb/tests/simple/75_readonly_records_basic.sh     |   5 +-
 ctdb/tests/simple/76_ctdb_pdb_recovery.sh          |   5 +-
 ctdb/tests/simple/77_ctdb_db_recovery.sh           |   5 +-
 ctdb/tests/simple/78_ctdb_large_db_recovery.sh     |   5 +-
 ctdb/tests/simple/79_volatile_db_traverse.sh       |   5 +-
 ctdb/tests/simple/80_ctdb_traverse.sh              |   5 +-
 ctdb/tests/simple/81_tunnel_ring.sh                |   2 +-
 ctdb/tests/simple/90_debug_hung_script.sh          |   5 +-
 ctdb/tests/simple/99_daemons_shutdown.sh           |  23 --
 ctdb/tests/simple/scripts/local_daemons.bash       | 184 ++-------
 ctdb/tests/simple/scripts/ssh_local_daemons.sh     |  51 ---
 ctdb/tests/src/dummy_client.c                      |  23 +-
 ctdb/tests/src/test_options.c                      |  13 +-
 ctdb/tests/takeover_helper/scripts/local.sh        |  19 +-
 ctdb/tests/tool/scripts/local.sh                   |  10 +-
 ctdb/tools/ctdb.c                                  |   6 +-
 ctdb/tools/onnode                                  |   8 +-
 ctdb/wscript                                       |  14 +-
 lib/ldb/tests/ldb_kv_ops_test.c                    |   4 +-
 lib/talloc/talloc.h                                |  17 +-
 102 files changed, 832 insertions(+), 1068 deletions(-)
 delete mode 100755 ctdb/tests/complex/00_ctdb_init.sh
 rename ctdb/tests/{simple => }/etc-ctdb/events/legacy/00.test.script (100%)
 create mode 100755 ctdb/tests/local_daemons.sh
 create mode 100755 ctdb/tests/onnode/0010.sh
 create mode 100755 ctdb/tests/onnode/0011.sh
 delete mode 100755 ctdb/tests/simple/00_ctdb_init.sh
 delete mode 100755 ctdb/tests/simple/01_ctdb_version.sh
 delete mode 100755 ctdb/tests/simple/02_ctdb_listvars.sh
 create mode 100755 ctdb/tests/simple/02_ctdb_tunables.sh
 delete mode 100755 ctdb/tests/simple/03_ctdb_getvar.sh
 delete mode 100755 ctdb/tests/simple/04_ctdb_setvar.sh
 delete mode 100755 ctdb/tests/simple/31_ctdb_disable.sh
 rename ctdb/tests/simple/{32_ctdb_enable.sh => 32_ctdb_disable_enable.sh} (50%)
 delete mode 100755 ctdb/tests/simple/41_ctdb_stop.sh
 rename ctdb/tests/simple/{42_ctdb_continue.sh => 42_ctdb_stop_continue.sh} (50%)
 delete mode 100755 ctdb/tests/simple/99_daemons_shutdown.sh
 delete mode 100755 ctdb/tests/simple/scripts/ssh_local_daemons.sh


Changeset truncated at 500 lines:

diff --git a/ctdb/common/path.c b/ctdb/common/path.c
index 1656646..69e606b 100644
--- a/ctdb/common/path.c
+++ b/ctdb/common/path.c
@@ -188,6 +188,14 @@ char *path_config(TALLOC_CTX *mem_ctx)
 
 char *path_socket(TALLOC_CTX *mem_ctx, const char *daemon)
 {
+	if (strcmp(daemon, "ctdbd") == 0) {
+		const char *t = getenv("CTDB_SOCKET");
+
+		if (t != NULL) {
+			return talloc_strdup(mem_ctx, t);
+		}
+	}
+
 	return talloc_asprintf(mem_ctx,
 			       "%s/%s.socket",
 			       path_rundir(),
diff --git a/ctdb/doc/ctdbd.1.xml b/ctdb/doc/ctdbd.1.xml
index 07838fe..41521ba 100644
--- a/ctdb/doc/ctdbd.1.xml
+++ b/ctdb/doc/ctdbd.1.xml
@@ -51,9 +51,13 @@
 	<listitem>
 	  <para>
 	    Enable interactive mode.  This will make ctdbd run in the
-	    foreground and not detach from the terminal.  By default
-	    ctdbd will detach itself and run in the background as a
-	    daemon.
+	    foreground and not detach from the terminal.  In this mode
+	    ctdbd will log to stderr.
+	  </para>
+	  <para>
+	    By default ctdbd will detach itself and run in the
+	    background as a daemon, logging to the configured
+	    destination.
 	  </para>
 	</listitem>
       </varlistentry>
diff --git a/ctdb/event/event_daemon.c b/ctdb/event/event_daemon.c
index 3cab330..3f9827c 100644
--- a/ctdb/event/event_daemon.c
+++ b/ctdb/event/event_daemon.c
@@ -354,14 +354,14 @@ int main(int argc, const char **argv)
 	ret = sock_daemon_run(e_state->ev,
 			      e_state->sockd,
 			      e_state->pidfile,
-			      (interactive == 1),
+			      false,
 			      false,
 			      options.pid);
 	if (ret == EINTR) {
 		ret = 0;
 	}
 
-	if (getenv("CTDB_TEST_MODE") != NULL) {
+	if (t != NULL) {
 		talloc_report_full(e_state->mem_ctx, stderr);
 	}
 
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index 323df7f..a48e506 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -243,7 +243,6 @@ int ctdb_ctrl_get_all_tunables(struct ctdb_context *ctdb,
 */
 void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags);
 
-int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname);
 const char *ctdb_get_socketname(struct ctdb_context *ctdb);
 
 /* return pnn of this node */
diff --git a/ctdb/packaging/RPM/ctdb.spec.in b/ctdb/packaging/RPM/ctdb.spec.in
index 4c9cae4..537f158 100644
--- a/ctdb/packaging/RPM/ctdb.spec.in
+++ b/ctdb/packaging/RPM/ctdb.spec.in
@@ -270,6 +270,7 @@ test suite for ctdb
 %{_libexecdir}/%{name}/tests/*
 %{_bindir}/ctdb_run_tests
 %{_bindir}/ctdb_run_cluster_tests
+%{_bindir}/ctdb_local_daemons
 %doc tests/README
 
 %if %with_pcp_pmda
diff --git a/ctdb/server/ctdb_client.c b/ctdb/server/ctdb_client.c
index 98c61cb..f66ecbe 100644
--- a/ctdb/server/ctdb_client.c
+++ b/ctdb/server/ctdb_client.c
@@ -1586,17 +1586,6 @@ void ctdb_set_flags(struct ctdb_context *ctdb, unsigned flags)
 	ctdb->flags |= flags;
 }
 
-/*
-  setup the local socket name
-*/
-int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname)
-{
-	ctdb->daemon.name = talloc_strdup(ctdb, socketname);
-	CTDB_NO_MEMORY(ctdb, ctdb->daemon.name);
-
-	return 0;
-}
-
 const char *ctdb_get_socketname(struct ctdb_context *ctdb)
 {
 	return ctdb->daemon.name;
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 8247859..aac331d 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -1230,7 +1230,7 @@ int ctdb_start_daemon(struct ctdb_context *ctdb, bool do_fork)
 	int res, ret = -1;
 	struct tevent_fd *fde;
 
-	become_daemon(do_fork, !do_fork, !do_fork);
+	become_daemon(do_fork, !do_fork, false);
 
 	ignore_signal(SIGPIPE);
 	ignore_signal(SIGUSR1);
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 721347c..a2870d0 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -38,6 +38,7 @@
 #include "common/reqid.h"
 #include "common/system.h"
 #include "common/common.h"
+#include "common/path.h"
 #include "common/logging.h"
 #include "common/logging_conf.h"
 
@@ -100,9 +101,16 @@ static struct ctdb_context *ctdb_init(struct tevent_context *ev)
 		return NULL;
 	}
 
-	ret = ctdb_set_socketname(ctdb, CTDB_SOCKET);
-	if (ret != 0) {
-		DBG_ERR("ctdb_set_socketname failed.\n");
+	ctdb->daemon.name = path_socket(ctdb, "ctdbd");
+	if (ctdb->daemon.name == NULL) {
+		DBG_ERR("Memory allocation error\n");
+		talloc_free(ctdb);
+		return NULL;
+	}
+
+	ctdbd_pidfile = path_pidfile(ctdb, "ctdbd");
+	if (ctdbd_pidfile == NULL) {
+		DBG_ERR("Memory allocation error\n");
 		talloc_free(ctdb);
 		return NULL;
 	}
@@ -144,13 +152,13 @@ static struct ctdb_context *ctdb_init(struct tevent_context *ev)
 int main(int argc, const char *argv[])
 {
 	struct ctdb_context *ctdb = NULL;
-	int interactive = 0;
-	const char *ctdb_socket;
+	int interactive_opt = 0;
+	bool interactive = false;
 
 	struct poptOption popt_options[] = {
 		POPT_AUTOHELP
-		{ "interactive", 'i', POPT_ARG_NONE, &interactive, 0,
-		  "don't fork", NULL },
+		{ "interactive", 'i', POPT_ARG_NONE, &interactive_opt, 0,
+		  "don't fork, log to stderr", NULL },
 		POPT_TABLEEND
 	};
 	int opt, ret;
@@ -160,7 +168,7 @@ int main(int argc, const char *argv[])
 	const char *ctdb_base;
 	struct conf_context *conf;
 	const char *logging_location;
-	const char *t;
+	const char *test_mode;
 	bool ok;
 
 	/*
@@ -217,6 +225,8 @@ int main(int argc, const char *argv[])
 		}
 	}
 
+	interactive = (interactive_opt != 0);
+
 	/*
 	 * Configuration file handling
 	 */
@@ -231,6 +241,8 @@ int main(int argc, const char *argv[])
 	 * Logging setup/options
 	 */
 
+	test_mode = getenv("CTDB_TEST_MODE");
+
 	/* Log to stderr (ignoring configuration) when running as interactive */
 	if (interactive) {
 		logging_location = "file:";
@@ -239,7 +251,7 @@ int main(int argc, const char *argv[])
 		logging_location = logging_conf_location(conf);
 	}
 
-	if (strcmp(logging_location, "syslog") != 0) {
+	if (strcmp(logging_location, "syslog") != 0 && test_mode == NULL) {
 		/* This can help when CTDB logging is misconfigured */
 		syslog(LOG_DAEMON|LOG_NOTICE,
 		       "CTDB logging to location %s",
@@ -356,32 +368,17 @@ int main(int argc, const char *argv[])
 	 * Testing and debug options
 	 */
 
-	/* Environment variable overrides default */
-	ctdbd_pidfile = getenv("CTDB_PIDFILE");
-	if (ctdbd_pidfile == NULL) {
-		ctdbd_pidfile = CTDB_RUNDIR "/ctdbd.pid";
-	}
-
-	/* Environment variable overrides default */
-	ctdb_socket = getenv("CTDB_SOCKET");
-	if (ctdb_socket == NULL) {
-		ctdb_socket = CTDB_SOCKET;
-	}
-	ret = ctdb_set_socketname(ctdb, ctdb_socket);
-	if (ret == -1) {
-		D_ERR("ctdb_set_socketname() failed\n");
-		goto fail;
-	}
-
-	t = getenv("CTDB_TEST_MODE");
-	if (t != NULL) {
+	if (test_mode != NULL) {
 		ctdb->do_setsched = false;
 		ctdb->do_checkpublicip = false;
 		fast_start = true;
 	}
 
+	/* Don't fork when running in test mode */
+	interactive = interactive || test_mode != NULL;
+
 	/* start the protocol running (as a child) */
-	return ctdb_start_daemon(ctdb, interactive?false:true);
+	return ctdb_start_daemon(ctdb, !interactive);
 
 fail:
 	talloc_free(ctdb);
diff --git a/ctdb/tests/README b/ctdb/tests/README
index 1cbd765..c911dd8 100644
--- a/ctdb/tests/README
+++ b/ctdb/tests/README
@@ -128,8 +128,11 @@ Test and debugging variable options
 
 	   Set this environment variable to enable test mode.
 
+	   This enables daemons and tools to locate their socket and
+	   PID file relative to CTDB_BASE.
+
 	   When testing with multiple local daemons on a single
-	   machine this does 3 things:
+	   machine this does 3 extra things:
 
 	   * Disables checks related to public IP addresses
 
@@ -155,7 +158,7 @@ Test and debugging variable options
 
        CTDB_RUN_TIMEOUT_MONITOR=yes|no
 	   Whether CTDB should simulate timing out monitor
-	   events. This uses the 99.timeout eventscript.
+	   events in local daemon tests.
 
 	   Default is no.
 
diff --git a/ctdb/tests/complex/00_ctdb_init.sh b/ctdb/tests/complex/00_ctdb_init.sh
deleted file mode 100755
index 41eeac0..0000000
--- a/ctdb/tests/complex/00_ctdb_init.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-test_info()
-{
-    cat <<EOF
-Restart the ctdbd daemons of a CTDB cluster.
-
-Ensure that event script reequired for cluster tests are enabled.
-EOF
-}
-
-. "${TEST_SCRIPTS_DIR}/integration.bash"
-
-ctdb_test_init "$@"
-
-set -e
-
-ctdb_test_check_real_cluster
-
-ctdb_stop_all >/dev/null 2>&1 || true
-
-ctdb_enable_cluster_test_event_scripts
-
-ctdb_init
diff --git a/ctdb/tests/complex/11_ctdb_delip_removes_ip.sh b/ctdb/tests/complex/11_ctdb_delip_removes_ip.sh
index d6a3b3c..b5c8866 100755
--- a/ctdb/tests/complex/11_ctdb_delip_removes_ip.sh
+++ b/ctdb/tests/complex/11_ctdb_delip_removes_ip.sh
@@ -13,15 +13,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 select_test_node_and_ips
 get_test_ip_mask_and_iface
 
diff --git a/ctdb/tests/complex/18_ctdb_reloadips.sh b/ctdb/tests/complex/18_ctdb_reloadips.sh
index e0632f3..2beff77 100755
--- a/ctdb/tests/complex/18_ctdb_reloadips.sh
+++ b/ctdb/tests/complex/18_ctdb_reloadips.sh
@@ -27,15 +27,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 select_test_node_and_ips
 
 ####################
diff --git a/ctdb/tests/complex/30_nfs_tickle_killtcp.sh b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
index 40ec6ba..a9b86d4 100755
--- a/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
+++ b/ctdb/tests/complex/30_nfs_tickle_killtcp.sh
@@ -31,15 +31,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 select_test_node_and_ips
 
 test_port=2049
diff --git a/ctdb/tests/complex/31_nfs_tickle.sh b/ctdb/tests/complex/31_nfs_tickle.sh
index 0b6990f..099527a 100755
--- a/ctdb/tests/complex/31_nfs_tickle.sh
+++ b/ctdb/tests/complex/31_nfs_tickle.sh
@@ -32,15 +32,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 # We need this for later, so we know how long to run nc for.
 try_command_on_node any $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
diff --git a/ctdb/tests/complex/32_cifs_tickle.sh b/ctdb/tests/complex/32_cifs_tickle.sh
index 3668245..4f2cdad 100755
--- a/ctdb/tests/complex/32_cifs_tickle.sh
+++ b/ctdb/tests/complex/32_cifs_tickle.sh
@@ -32,15 +32,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 # We need this for later, so we know how long to sleep.
 try_command_on_node 0 $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
@@ -69,8 +66,7 @@ echo "$out"
 if [ "${out/SRC: ${src_socket} /}" != "$out" ] ; then
     echo "GOOD: CIFS connection tracked OK by CTDB."
 else
-    echo "BAD: Socket not tracked by CTDB."
-    testfailures=1
+    die "BAD: Socket not tracked by CTDB."
 fi
 
 # This is almost immediate.  However, it is sent between nodes
diff --git a/ctdb/tests/complex/33_gratuitous_arp.sh b/ctdb/tests/complex/33_gratuitous_arp.sh
index 2ee2e06..f67a1fa 100755
--- a/ctdb/tests/complex/33_gratuitous_arp.sh
+++ b/ctdb/tests/complex/33_gratuitous_arp.sh
@@ -42,15 +42,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 select_test_node_and_ips
 
 echo "Removing ${test_ip} from the local ARP table..."
@@ -82,6 +79,5 @@ echo "MAC address is: ${new_mac}"
 if [ "$original_mac" != "$new_mac" ] ; then
     echo "GOOD: MAC address changed"
 else
-    echo "BAD: MAC address did not change"
-    testfailures=1
+    die "BAD: MAC address did not change"
 fi
diff --git a/ctdb/tests/complex/34_nfs_tickle_restart.sh b/ctdb/tests/complex/34_nfs_tickle_restart.sh
index 2aab061..aceebc8 100755
--- a/ctdb/tests/complex/34_nfs_tickle_restart.sh
+++ b/ctdb/tests/complex/34_nfs_tickle_restart.sh
@@ -30,15 +30,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 # We need this for later, so we know how long to run nc for.
 try_command_on_node any $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
diff --git a/ctdb/tests/complex/36_smb_reset_server.sh b/ctdb/tests/complex/36_smb_reset_server.sh
index beff1a2..0de7772 100755
--- a/ctdb/tests/complex/36_smb_reset_server.sh
+++ b/ctdb/tests/complex/36_smb_reset_server.sh
@@ -27,15 +27,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy
 
-# Reset configuration
-ctdb_restart_when_done
-
 # We need this for later, so we know how long to sleep.
 try_command_on_node 0 $CTDB getvar MonitorInterval
 monitor_interval="${out#*= }"
diff --git a/ctdb/tests/complex/37_nfs_reset_server.sh b/ctdb/tests/complex/37_nfs_reset_server.sh
index 07bd034..7190af0 100755
--- a/ctdb/tests/complex/37_nfs_reset_server.sh
+++ b/ctdb/tests/complex/37_nfs_reset_server.sh
@@ -27,15 +27,12 @@ EOF
 
 set -e
 
-ctdb_test_init "$@"
+ctdb_test_init
 
 ctdb_test_check_real_cluster
 
 cluster_is_healthy


-- 
Samba Shared Repository



More information about the samba-cvs mailing list