[SCM] Samba Shared Repository - branch master updated

Amitay Isaacs amitay at samba.org
Fri Oct 4 10:59:03 UTC 2019


The branch, master has been updated
       via  0bddee8dac0 ctdb-tests: Rename functions to test_header() and test_footer()
       via  435d903ad84 ctdb-tests: Move test duration calculation to ctdb_test_run()
       via  23982477f3d ctdb-tests: Add handling for skipped tests
       via  473a6fed11a ctdb-tests: Add a special failure code when a test error occurs
       via  55dd0f047f5 ctdb-tests: Move test status interpretation to ctdb_test_run()
       via  47c9b79262e ctdb-tests: Move use of show_progress() into ctdb_test_run()
       via  e7e6f4067e4 ctdb-tests: Simplify ctdb_test_run()
       via  dc8ddbb0843 ctdb-tests: Switch TEST_CLEANUP and TEST_TIMEOUT to script variables
       via  0ec83f32fad ctdb-tests: Add new test functions for running commands on nodes
       via  38b838b59cb ctdb-tests: try_command_on_node() should return status of command
       via  e494eb3e8c0 ctdb-tests: Drop unused function ctdb_test_check_real_cluster()
       via  38138b42f7c ctdb-tests: Update preamble for CLUSTER tests
       via  653b35764a2 ctdb-tests: Add cluster.bash include file
       via  5ad356c2820 ctdb-tests: Add function ctdb_test_skip_on_cluster()
       via  59055f4da1a ctdb-tests: Add function ctdb_test_on_cluster()
       via  65ca431c95e ctdb-tests: Add functions for terminating tests on failure, skip, error
      from  2c54f6df716 ctdb-common: Mark VacuumLimit tunable as obsolete

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


- Log -----------------------------------------------------------------
commit 0bddee8dac095016e892731abe9e5a668c38375d
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Oct 3 17:25:10 2019 +1000

    ctdb-tests: Rename functions to test_header() and test_footer()
    
    That's all they do now.
    
    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): Fri Oct  4 10:58:10 UTC 2019 on sn-devel-184

commit 435d903ad84e72e8223ae53ca46bb47c1cfe1293
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 10 10:51:31 2019 +1000

    ctdb-tests: Move test duration calculation to ctdb_test_run()
    
    It makes sense to do this in one place in case other headers/footers
    are added.
    
    Reindent ctdb_test_begin() while touching this function.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 23982477f3d486815974edce08a247d7280c9578
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 18 12:36:05 2019 +1000

    ctdb-tests: Add handling for skipped tests
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 473a6fed11a2e63d9cd557f63fdb646bd040deda
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 18 12:31:10 2019 +1000

    ctdb-tests: Add a special failure code when a test error occurs
    
    Use it when a test is not executable.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 55dd0f047f58f9be2d1a317dfcbebe18e22201a0
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 9 20:57:42 2019 +1000

    ctdb-tests: Move test status interpretation to ctdb_test_run()
    
    It makes sense to do this in one place in case other headers/footers
    are added.
    
    Simplify ctdb_test_end() accordingly, reindenting because nearly all
    lines are modified.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 47c9b79262ee4101d29c977d98933bfcf22f7426
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 18 12:25:06 2019 +1000

    ctdb-tests: Move use of show_progress() into ctdb_test_run()
    
    This allows more variables to be set in this function because they are
    no longer in a sub-shell.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e7e6f4067e4a0de1ccfc8650fb0e87b8b6e0d620
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 9 20:51:51 2019 +1000

    ctdb-tests: Simplify ctdb_test_run()
    
    Only the test file name is ever passed.
    
    Reindent while touching many existing lines.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit dc8ddbb0843abdc547055d57184e6cd1ba8e3147
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Sep 9 16:08:41 2019 +1000

    ctdb-tests: Switch TEST_CLEANUP and TEST_TIMEOUT to script variables
    
    These are not used outside this script so they do not need to be
    environment variables.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 0ec83f32faddf6ef9f5fdd11ecd6d651459dd650
Author: Martin Schwenke <martin at meltin.net>
Date:   Mon Aug 12 21:01:20 2019 +1000

    ctdb-tests: Add new test functions for running commands on nodes
    
    * ctdb_onnode()
    * testprog_onnode()
    * function_onnode()
    
    These encapsulate familiar patterns found when running
    try_command_on_node().  The new function names are more concise and
    encourage more readable tests.  Test writers can do less thinking
    about the subtleties of running different types of commands on nodes.
    For example, these functions ensure that $CTDB and $VALGRIND are used
    in the correct contexts.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 38b838b59cbece5c6a7bda40e8d411a6c56d1458
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Aug 13 21:43:32 2019 +1000

    ctdb-tests: try_command_on_node() should return status of command
    
    There is no point folding this down to 1.  Tests should be able to see
    the original value, if required.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit e494eb3e8c054a7aa56d2f201459934d1248642a
Author: Martin Schwenke <martin at meltin.net>
Date:   Thu Sep 12 12:21:13 2019 +1000

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

commit 38138b42f7c42aca01dccd7b61784f0ddc2570f2
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 11 16:07:49 2019 +1000

    ctdb-tests: Update preamble for CLUSTER tests
    
    The main change is to source cluster.bash instead of integration.bash.
    
    While touching the preamble, the following additional changes are also
    made:
    
    * Drop test_info() definition and replace it with a comment
    
      The use of test_info() is pointless.
    
    * Drop call to ctdb_test_check_real_cluster()
    
      cluster.bash now does this.
    
    * Drop call to cluster_is_healthy()
    
      This is a holdover from when the previous test would restart daemons
      to get things ready for a test.  There was also a bug where going
      into recovery during the restart would sometimes cause the cluster
      to become unhealthy.  If we really need something like this then we
      can add it to ctdb_test_init().
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 653b35764a2b4e999dbe6a71c1de2c9554d6fc4d
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 11 15:44:20 2019 +1000

    ctdb-tests: Add cluster.bash include file
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 5ad356c282044db251c395db06900b249ff07544
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Sep 18 11:43:53 2019 +1000

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

commit 59055f4da1ac4747c771a8acf2392b5e4599679b
Author: Martin Schwenke <martin at meltin.net>
Date:   Wed Oct 2 15:08:18 2019 +1000

    ctdb-tests: Add function ctdb_test_on_cluster()
    
    This centralises this logic.  Use it in a subset of tests - there are
    other cases but these will be cleaned up soon.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

commit 65ca431c95e53e8686c2887d8c8ddaf67999305b
Author: Martin Schwenke <martin at meltin.net>
Date:   Tue Sep 17 16:00:13 2019 +1000

    ctdb-tests: Add functions for terminating tests on failure, skip, error
    
    This allows standard exit codes for failed and skipped tests, and test
    errors.
    
    Skipped tests currently just succeed and a test error is the same as a
    failure.  These can be easily changed later when run_tests.sh is ready
    to handle them.
    
    Signed-off-by: Martin Schwenke <martin at meltin.net>
    Reviewed-by: Amitay Isaacs <amitay at gmail.com>

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

Summary of changes:
 .../CLUSTER/complex/11_ctdb_delip_removes_ip.sh    |  15 +--
 ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh    |  33 ++---
 .../tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh |  37 ++----
 ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh        |  39 +++---
 ctdb/tests/CLUSTER/complex/32_cifs_tickle.sh       |  39 +++---
 ctdb/tests/CLUSTER/complex/33_gratuitous_arp.sh    |  57 ++++----
 .../tests/CLUSTER/complex/34_nfs_tickle_restart.sh |  35 ++---
 ctdb/tests/CLUSTER/complex/36_smb_reset_server.sh  |  31 ++---
 ctdb/tests/CLUSTER/complex/37_nfs_reset_server.sh  |  31 ++---
 .../CLUSTER/complex/41_failover_ping_discrete.sh   |  45 +++----
 .../CLUSTER/complex/42_failover_ssh_hostname.sh    |  45 +++----
 .../tests/CLUSTER/complex/43_failover_nfs_basic.sh |  53 +++-----
 .../CLUSTER/complex/44_failover_nfs_oneway.sh      |  57 ++++----
 ctdb/tests/CLUSTER/complex/45_failover_nfs_kill.sh |  53 +++-----
 ctdb/tests/CLUSTER/complex/60_rogueip_releaseip.sh |  15 +--
 ctdb/tests/CLUSTER/complex/61_rogueip_takeip.sh    |  15 +--
 ctdb/tests/CLUSTER/complex/scripts/local.bash      |  15 ---
 ctdb/tests/INTEGRATION/failover/pubips.001.list.sh |   2 +-
 .../failover/pubips.013.failover_noop.sh           |   5 +-
 .../INTEGRATION/failover/pubips.050.missing_ip.sh  |   4 +-
 .../simple/cluster.012.reclock_command.sh          |   5 +-
 .../simple/cluster.091.version_check.sh            |   5 +-
 .../simple/eventscripts.001.zero_scripts.sh        |   5 +-
 .../simple/eventscripts.090.debug_hung.sh          |   7 +-
 ctdb/tests/UNIT/shellcheck/tests.sh                |   1 +
 ctdb/tests/run_tests.sh                            | 148 ++++++++++++---------
 ctdb/tests/scripts/cluster.bash                    |  18 +++
 ctdb/tests/scripts/common.sh                       |  24 ++++
 ctdb/tests/scripts/integration.bash                |  59 +++++++-
 ctdb/wscript                                       |   1 +
 30 files changed, 422 insertions(+), 477 deletions(-)
 create mode 100755 ctdb/tests/scripts/cluster.bash


Changeset truncated at 500 lines:

diff --git a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh
index 543472c0f22..dba6d075c8d 100755
--- a/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh
+++ b/ctdb/tests/CLUSTER/complex/11_ctdb_delip_removes_ip.sh
@@ -1,24 +1,15 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a node's public IP address can be deleted using 'ctdb deleteip'.
+# Verify that a node's public IP address can be deleted using 'ctdb deleteip'.
 
-This is an extended version of simple/17_ctdb_config_delete_ip.sh
-EOF
-}
+# This is an extended version of simple/17_ctdb_config_delete_ip.sh
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 get_test_ip_mask_and_iface
 
diff --git a/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh b/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
index 26782130430..f4df2b1b08b 100755
--- a/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
+++ b/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that adding/deleting IPs using 'ctdb reloadips' works
+# Verify that adding/deleting IPs using 'ctdb reloadips' works
 
-Checks that when IPs are added to and deleted from a single node then
-those IPs are actually assigned and unassigned from the specified
-interface.
+# Checks that when IPs are added to and deleted from a single node then
+# those IPs are actually assigned and unassigned from the specified
+# interface.
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with public IP addresses configured
+# * An active CTDB cluster with public IP addresses configured
 
-Expected results:
+# Expected results:
 
-* When IPs are added to a single node then they are assigned to an
-  interface.
+# * When IPs are added to a single node then they are assigned to an
+#   interface.
 
-* When IPs are deleted from a single node then they disappear from an
-  interface.
-EOF
-}
+# * When IPs are deleted from a single node then they disappear from an
+#   interface.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 ####################
diff --git a/ctdb/tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh b/ctdb/tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh
index a9b86d42d62..4d8f6174d86 100755
--- a/ctdb/tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh
+++ b/ctdb/tests/CLUSTER/complex/30_nfs_tickle_killtcp.sh
@@ -1,42 +1,33 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that NFS connections are monitored and that NFS tickles are sent.
+# Verify that NFS connections are monitored and that NFS tickles are sent.
 
-Create a connection to the NFS server on a node. Then disable the
-relevant NFS server node and ensure that it sends an appropriate reset
-packet.  The packet must come from the releasing node.
+# Create a connection to the NFS server on a node. Then disable the
+# relevant NFS server node and ensure that it sends an appropriate reset
+# packet.  The packet must come from the releasing node.
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+# * Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:
+# Expected results:
 
-* CTDB on the releasing node should correctly send a reset packet when
-  the node is disabled.
-EOF
-}
+# * CTDB on the releasing node should correctly send a reset packet when
+#   the node is disabled.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 test_port=2049
diff --git a/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh b/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
index 099527a3eb0..e3c362c347a 100755
--- a/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
+++ b/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
@@ -1,43 +1,34 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that NFS connections are monitored and that NFS tickles are sent.
+# Verify that NFS connections are monitored and that NFS tickles are sent.
 
-We create a connection to the NFS server on a node and confirm that
-this connection is registered in the nfs-tickles/ subdirectory in
-shared storage.  Then kill ctdbd on the relevant NFS server node and
-ensure that the takeover node sends an appropriate reset packet.
+# We create a connection to the NFS server on a node and confirm that
+# this connection is registered in the nfs-tickles/ subdirectory in
+# shared storage.  Then kill ctdbd on the relevant NFS server node and
+# ensure that the takeover node sends an appropriate reset packet.
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+# * Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:
+# Expected results:
 
-* CTDB should correctly record the socket and on failover the takeover
-  node should send a reset packet.
-EOF
-}
+# * CTDB should correctly record the socket and on failover the takeover
+#   node should send a reset packet.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # 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/CLUSTER/complex/32_cifs_tickle.sh b/ctdb/tests/CLUSTER/complex/32_cifs_tickle.sh
index bfe3df4e82f..c5b583d4cc3 100755
--- a/ctdb/tests/CLUSTER/complex/32_cifs_tickle.sh
+++ b/ctdb/tests/CLUSTER/complex/32_cifs_tickle.sh
@@ -1,43 +1,34 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that CIFS connections are monitored and that CIFS tickles are sent.
+# Verify that CIFS connections are monitored and that CIFS tickles are sent.
 
-We create a connection to the CIFS server on a node and confirm that
-this connection is registered by CTDB.  Then disable the relevant CIFS
-server node and ensure that the takeover node sends an appropriate
-reset packet.
+# We create a connection to the CIFS server on a node and confirm that
+# this connection is registered by CTDB.  Then disable the relevant CIFS
+# server node and ensure that the takeover node sends an appropriate
+# reset packet.
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-* Clustered Samba must be listening on TCP port 445.
+# * Clustered Samba must be listening on TCP port 445.
 
-Expected results:
+# Expected results:
 
-* CTDB should correctly record the connection and the takeover node
-  should send a reset packet.
-EOF
-}
+# * CTDB should correctly record the connection and the takeover node
+#   should send a reset packet.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # 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/CLUSTER/complex/33_gratuitous_arp.sh b/ctdb/tests/CLUSTER/complex/33_gratuitous_arp.sh
index f67a1fac71b..7a0944fc829 100755
--- a/ctdb/tests/CLUSTER/complex/33_gratuitous_arp.sh
+++ b/ctdb/tests/CLUSTER/complex/33_gratuitous_arp.sh
@@ -1,53 +1,44 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a gratuitous ARP is sent when a node is failed out.
+# Verify that a gratuitous ARP is sent when a node is failed out.
 
-We ping a public IP and lookup the MAC address in the ARP table.  We
-then disable the node and check the ARP table again - the MAC address
-should have changed.  This test does NOT test connectivity after the
-failover.
+# We ping a public IP and lookup the MAC address in the ARP table.  We
+# then disable the node and check the ARP table again - the MAC address
+# should have changed.  This test does NOT test connectivity after the
+# failover.
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-Steps:
+# Steps:
 
-1. Verify that the cluster is healthy.
-2. Select a public address and its corresponding node.
-3. Remove any entries for the chosen address from the ARP table.
-4. Send a single ping request packet to the selected public address.
-5. Determine the MAC address corresponding to the public address by
-   checking the ARP table.
-6. Disable the selected node.
-7. Check the ARP table and check the MAC associated with the public
-   address.
+# 1. Verify that the cluster is healthy.
+# 2. Select a public address and its corresponding node.
+# 3. Remove any entries for the chosen address from the ARP table.
+# 4. Send a single ping request packet to the selected public address.
+# 5. Determine the MAC address corresponding to the public address by
+#    checking the ARP table.
+# 6. Disable the selected node.
+# 7. Check the ARP table and check the MAC associated with the public
+#    address.
 
-Expected results:
+# Expected results:
 
-* When a node is disabled the MAC address associated with public
-  addresses on that node should change.
-EOF
-}
+# * When a node is disabled the MAC address associated with public
+#   addresses on that node should change.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 select_test_node_and_ips
 
 echo "Removing ${test_ip} from the local ARP table..."
diff --git a/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh b/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
index aceebc875b1..04d87af1b2e 100755
--- a/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
+++ b/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
@@ -1,41 +1,32 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that a newly started CTDB node gets updated tickle details
+# Verify that a newly started CTDB node gets updated tickle details
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+# * Cluster nodes must be listening on the NFS TCP port (2049).
 
-Steps:
+# Steps:
 
-As with 31_nfs_tickle.sh but restart a node after the tickle is
-registered.
+# As with 31_nfs_tickle.sh but restart a node after the tickle is
+# registered.
 
-Expected results:
+# Expected results:
 
-* CTDB should correctly communicated tickles to new CTDB instances as
-  they join the cluster.
-EOF
-}
+# * CTDB should correctly communicated tickles to new CTDB instances as
+#   they join the cluster.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # 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/CLUSTER/complex/36_smb_reset_server.sh b/ctdb/tests/CLUSTER/complex/36_smb_reset_server.sh
index 870b80661aa..d0f3d081146 100755
--- a/ctdb/tests/CLUSTER/complex/36_smb_reset_server.sh
+++ b/ctdb/tests/CLUSTER/complex/36_smb_reset_server.sh
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that the server end of an SMB connection is correctly reset
+# Verify that the server end of an SMB connection is correctly reset
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-* Clustered Samba must be listening on TCP port 445.
+# * Clustered Samba must be listening on TCP port 445.
 
-Expected results:
+# Expected results:
 
-* CTDB should correctly record the connection and the releasing node
-  should reset the server end of the connection.
-EOF
-}
+# * CTDB should correctly record the connection and the releasing node
+#   should reset the server end of the connection.
 
-. "${TEST_SCRIPTS_DIR}/integration.bash"
+. "${TEST_SCRIPTS_DIR}/cluster.bash"
 
 set -e
 
 ctdb_test_init
 
-ctdb_test_check_real_cluster
-
-cluster_is_healthy
-
 # 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/CLUSTER/complex/37_nfs_reset_server.sh b/ctdb/tests/CLUSTER/complex/37_nfs_reset_server.sh
index 32ff9295cc6..3e249f9483a 100755
--- a/ctdb/tests/CLUSTER/complex/37_nfs_reset_server.sh
+++ b/ctdb/tests/CLUSTER/complex/37_nfs_reset_server.sh
@@ -1,38 +1,29 @@
 #!/bin/bash
 
-test_info()
-{
-    cat <<EOF
-Verify that the server end of an NFS connection is correctly reset
+# Verify that the server end of an NFS connection is correctly reset
 
-Prerequisites:
+# Prerequisites:
 
-* An active CTDB cluster with at least 2 nodes with public addresses.
+# * An active CTDB cluster with at least 2 nodes with public addresses.
 
-* Test must be run on a real or virtual cluster rather than against
-  local daemons.
+# * Test must be run on a real or virtual cluster rather than against
+#   local daemons.
 
-* Test must not be run from a cluster node.
+# * Test must not be run from a cluster node.
 
-* Cluster nodes must be listening on the NFS TCP port (2049).
+# * Cluster nodes must be listening on the NFS TCP port (2049).
 
-Expected results:


-- 
Samba Shared Repository



More information about the samba-cvs mailing list