[SCM] Samba Shared Repository - branch master updated
Martin Schwenke
martins at samba.org
Wed Jul 22 06:30:02 UTC 2020
The branch, master has been updated
via 6436c74ebf6 Revert "ctdb-build: Don't build/install tests in top-level build by default"
via bdd89d52761 Revert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"
via 6a3372e8958 Revert "ctdb-tests: Show hung script debugging output"
via e4b1cdc7090 Revert "ctdb-tests: Redirect stderr too when checking for shellcheck"
via a694c07126e Revert "ctdb-tests: Drop unreachable line"
via 4438e44f880 Revert "ctdb-tests: Update preamble for INTEGRATION tests"
via 271ad95e235 Revert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"
via 60d999ad941 Revert "ctdb-tests: Make integration.bash pass shellcheck"
via 548f2021df6 Revert "ctdb-tests: Make unit.sh pass shellcheck"
via da654f97951 Revert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"
via e11526ad542 Revert "ctdb-tests: Separate custom cluster startup from test initialisation"
via 941a2d0a3b7 Revert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"
via c9dfdeaddc9 Revert "ctdb-tests: Drop uses of "onnode any ..." in testcases"
via 635d5cfa31a Revert "ctdb-tests: Improve test portability"
via c83ece42e5b Revert "ctdb-tests: Improve test quality"
via cf3b1fb3900 Revert "ctdb-tests: Improve test portability"
via 979a6c8c5fe Revert "ctdb-tests: Improve test quality"
via d035b69b535 Revert "ctdb-tests: Improve test portability/quality"
via 5948a57920c Revert "ctdb-tests: Stop cat command failure from causing test failure"
from 5707781ccf6 ctdb-tests: Stop cat command failure from causing test failure
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 6436c74ebf6adcbf21abf76567c7b87e61abfaf0
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:43 2020 +1000
Revert "ctdb-build: Don't build/install tests in top-level build by default"
Fix missing Reviewed-by: tag.
This reverts commit 91c36c16c8516359380a00ee3d2229422b048d9f.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
Autobuild-User(master): Martin Schwenke <martins at samba.org>
Autobuild-Date(master): Wed Jul 22 06:29:43 UTC 2020 on sn-devel-184
commit bdd89d52761ea4c1ad22d5ca1252f84544ee2622
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:40 2020 +1000
Revert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"
Fix missing Reviewed-by: tag.
This reverts commit 9694ba6fe4d073c653f49080127ee9efa21a8e9e.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 6a3372e8958bf268c1a229076c3b5273e03fb655
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:36 2020 +1000
Revert "ctdb-tests: Show hung script debugging output"
Fix missing Reviewed-by: tag.
This reverts commit c78de201f84f9fae9916af9592d42cbc71f805c5.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit e4b1cdc7090212c8b2f37b9ba8303439348e00b8
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:31 2020 +1000
Revert "ctdb-tests: Redirect stderr too when checking for shellcheck"
Fix missing Reviewed-by: tag.
This reverts commit 847aa0e367c721944650aa34d67f8073461ae272.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit a694c07126e0dacb3bd30502e83264ffef98e0c0
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:28 2020 +1000
Revert "ctdb-tests: Drop unreachable line"
Fix missing Reviewed-by: tag.
This reverts commit a55dd6f17b6d65db77bcd4f5a011e9aef64729e5.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 4438e44f880249164bb33d783f9a773f44ba1a99
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:24 2020 +1000
Revert "ctdb-tests: Update preamble for INTEGRATION tests"
Fix missing Reviewed-by: tag.
This reverts commit 65f56505e29c01d5891e5bc1050b6c37b8cbdee7.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 271ad95e2359b1c4fc6d73c0c8e941bafb85c97c
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:21 2020 +1000
Revert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"
Fix missing Reviewed-by: tag.
This reverts commit 9a7cabd342d0aed450ed3305931702a7351f814a.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 60d999ad94155da080982c18ab51af187c7d85f2
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:18 2020 +1000
Revert "ctdb-tests: Make integration.bash pass shellcheck"
Fix missing Reviewed-by: tag.
This reverts commit 0f04b8a70be3b8e157a4a88e9e54e87fa380022e.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 548f2021df65250480fe3f0724a91c0dd1a3fada
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:11 2020 +1000
Revert "ctdb-tests: Make unit.sh pass shellcheck"
Fix missing Reviewed-by: tag.
This reverts commit 30293baae5f22628405d327fc0b6bae993e96cd8.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit da654f97951317391154d715c15e064490c1d1c9
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:07 2020 +1000
Revert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"
Fix missing Reviewed-by: tag.
This reverts commit 44e05ac8515be3220a334ae8001db83b06bec59f.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit e11526ad5420f2d062a2703244db6151fac2eab2
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:04 2020 +1000
Revert "ctdb-tests: Separate custom cluster startup from test initialisation"
Fix missing Reviewed-by: tag.
This reverts commit e9df17b500146e62539feac66d0cd4b3ef7aa47a.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 941a2d0a3b714085b58b1501cc18fd466db961b6
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:43:01 2020 +1000
Revert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"
Fix missing Reviewed-by: tag.
This reverts commit 58f9f699f181ac217cda8de512b8385da173f884.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit c9dfdeaddc95bb278a23e43476e1af2a19cd783d
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:57 2020 +1000
Revert "ctdb-tests: Drop uses of "onnode any ..." in testcases"
Fix missing Reviewed-by: tag.
This reverts commit aa5b214eaa88414c87410fd068fe7624e9790185.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 635d5cfa31a8e890f4ae43b465b26a416d96d2bc
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:53 2020 +1000
Revert "ctdb-tests: Improve test portability"
Fix missing Reviewed-by: tag.
This reverts commit 1079d6e3ae5805ef65a3628edf0a3ac2cd7fac1c.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit c83ece42e5b2e12e9a1305476d89522742201ba9
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:49 2020 +1000
Revert "ctdb-tests: Improve test quality"
Fix missing Reviewed-by: tag.
This reverts commit ea1cbff624383fb9d5b83b863fa6bd00a8fb77fa.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit cf3b1fb39003e30c0c5e66d272da09022273238f
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:43 2020 +1000
Revert "ctdb-tests: Improve test portability"
Fix missing Reviewed-by: tag.
This reverts commit 1f6556916e7f3a731d7d760fa6fd857e7f571541.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 979a6c8c5fe3891f8003de60e7d345029f905368
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:36 2020 +1000
Revert "ctdb-tests: Improve test quality"
Fix missing Reviewed-by: tag.
This reverts commit a308f2534d3991866efa2c662921ec63b4238888.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit d035b69b53560083ca7ede2410c2c24e6fe21156
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:42:11 2020 +1000
Revert "ctdb-tests: Improve test portability/quality"
Fix missing Reviewed-by: tag.
This reverts commit d2f8cd835da39784f2d99231f9a1067ae56ede7a.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 5948a57920c5c439802150b2b894b3d27a68d671
Author: Martin Schwenke <martin at meltin.net>
Date: Wed Jul 22 14:41:01 2020 +1000
Revert "ctdb-tests: Stop cat command failure from causing test failure"
Fix missing Reviewed-by: tag.
This reverts commit 5707781ccf682d95a5a05a7c3e00a43003dbe62e.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
-----------------------------------------------------------------------
Summary of changes:
ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh | 8 +-
ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh | 9 +-
.../tests/CLUSTER/complex/34_nfs_tickle_restart.sh | 5 +
.../INTEGRATION/database/basics.001.attach.sh | 77 ++++++++----
.../INTEGRATION/database/basics.002.attach.sh | 39 ++++--
.../INTEGRATION/database/basics.003.detach.sh | 31 ++++-
ctdb/tests/INTEGRATION/database/basics.004.wipe.sh | 35 ++++--
.../database/basics.010.backup_restore.sh | 39 ++++--
ctdb/tests/INTEGRATION/database/fetch.001.ring.sh | 17 ++-
.../INTEGRATION/database/fetch.002.ring-hotkeys.sh | 2 +-
.../INTEGRATION/database/readonly.001.basic.sh | 52 +++++---
.../INTEGRATION/database/recovery.001.volatile.sh | 66 ++++++----
.../INTEGRATION/database/recovery.002.large.sh | 34 +++--
.../database/recovery.003.no_resurrect.sh | 14 ++-
.../database/recovery.010.persistent.sh | 41 ++++--
.../INTEGRATION/database/recovery.011.continue.sh | 35 ++++--
.../INTEGRATION/database/transaction.001.ptrans.sh | 29 ++++-
.../INTEGRATION/database/transaction.002.loop.sh | 17 ++-
.../database/transaction.003.loop_recovery.sh | 23 +++-
.../database/transaction.004.update_record.sh | 49 +++++---
.../database/transaction.010.loop_recovery.sh | 25 ++--
.../tests/INTEGRATION/database/traverse.001.one.sh | 26 ++--
.../INTEGRATION/database/traverse.002.many.sh | 32 +++--
ctdb/tests/INTEGRATION/database/vacuum.001.fast.sh | 2 +-
ctdb/tests/INTEGRATION/database/vacuum.002.full.sh | 2 +-
.../INTEGRATION/database/vacuum.003.recreate.sh | 2 +-
.../INTEGRATION/database/vacuum.030.locked.sh | 2 +-
.../INTEGRATION/database/vacuum.031.locked.sh | 2 +-
.../INTEGRATION/database/vacuum.032.locked.sh | 2 +-
.../INTEGRATION/database/vacuum.033.locked.sh | 2 +-
.../INTEGRATION/database/vacuum.034.locked.sh | 2 +-
ctdb/tests/INTEGRATION/failover/pubips.001.list.sh | 29 ++++-
.../tests/INTEGRATION/failover/pubips.010.addip.sh | 16 ++-
.../tests/INTEGRATION/failover/pubips.011.delip.sh | 16 ++-
.../INTEGRATION/failover/pubips.012.reloadips.sh | 32 +++--
.../failover/pubips.013.failover_noop.sh | 33 ++---
.../INTEGRATION/failover/pubips.014.iface_gc.sh | 13 +-
.../INTEGRATION/failover/pubips.020.moveip.sh | 26 ++--
.../failover/pubips.030.disable_enable.sh | 15 ++-
.../failover/pubips.032.stop_continue.sh | 13 +-
.../failover/pubips.040.NoIPTakeover.sh | 107 ++++++++--------
.../INTEGRATION/failover/pubips.050.missing_ip.sh | 19 ++-
ctdb/tests/INTEGRATION/simple/basics.000.onnode.sh | 25 +++-
.../INTEGRATION/simple/basics.001.listnodes.sh | 28 ++++-
.../INTEGRATION/simple/basics.002.tunables.sh | 13 +-
ctdb/tests/INTEGRATION/simple/basics.003.ping.sh | 44 +++++--
ctdb/tests/INTEGRATION/simple/basics.004.getpid.sh | 28 ++++-
.../simple/basics.005.process_exists.sh | 34 ++++-
.../INTEGRATION/simple/basics.010.statistics.sh | 29 ++++-
.../simple/basics.011.statistics_reset.sh | 31 ++++-
.../simple/cluster.001.isnotrecmaster.sh | 30 ++++-
.../simple/cluster.002.recmaster_yield.sh | 28 ++++-
.../INTEGRATION/simple/cluster.010.getrelock.sh | 40 +++---
.../simple/cluster.012.reclock_command.sh | 21 ++--
.../simple/cluster.015.reclock_remove_lock.sh | 2 +-
.../simple/cluster.016.reclock_move_lock_dir.sh | 2 +-
.../INTEGRATION/simple/cluster.020.message_ring.sh | 17 ++-
.../INTEGRATION/simple/cluster.021.tunnel_ring.sh | 17 ++-
.../INTEGRATION/simple/cluster.090.unreachable.sh | 40 +++++-
.../simple/cluster.091.version_check.sh | 11 +-
.../tests/INTEGRATION/simple/debug.001.getdebug.sh | 26 +++-
.../tests/INTEGRATION/simple/debug.002.setdebug.sh | 19 ++-
.../INTEGRATION/simple/debug.003.dumpmemory.sh | 26 +++-
.../simple/eventscripts.001.zero_scripts.sh | 15 ++-
.../simple/eventscripts.090.debug_hung.sh | 24 ++--
ctdb/tests/UNIT/shellcheck/scripts/local.sh | 3 +-
ctdb/tests/UNIT/shellcheck/tests.sh | 4 +-
ctdb/tests/local_daemons.sh | 1 -
ctdb/tests/scripts/integration.bash | 139 ++++++++-------------
ctdb/tests/scripts/test_wrap | 2 +-
ctdb/tests/scripts/unit.sh | 15 +--
ctdb/wscript | 7 --
72 files changed, 1223 insertions(+), 538 deletions(-)
Changeset truncated at 500 lines:
diff --git a/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh b/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
index 150aeea5f14..f4df2b1b08b 100755
--- a/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
+++ b/ctdb/tests/CLUSTER/complex/18_ctdb_reloadips.sh
@@ -38,7 +38,7 @@ select_test_node_and_ips
# the provided prefix. Note that this is an IPv4-specific test.
echo "Getting public IP information from CTDB..."
-ctdb_onnode "$test_node" "ip -X -v all"
+try_command_on_node any "$CTDB ip -X -v all"
ctdb_ip_info=$(awk -F'|' 'NR > 1 { print $2, $3, $5 }' "$outfile")
echo "Getting IP information from interfaces..."
@@ -215,7 +215,7 @@ do_ctdb_reloadips
check_ips $test_node "$iface" "$prefix" 1 $new_ip_max
-ctdb_onnode "$test_node" sync
+try_command_on_node any $CTDB sync
####################
@@ -229,7 +229,7 @@ do_ctdb_reloadips
check_ips $test_node "$iface" "$prefix" 2 $new_ip_max
-ctdb_onnode "$test_node" sync
+try_command_on_node any $CTDB sync
####################
@@ -244,7 +244,7 @@ do_ctdb_reloadips
check_ips $test_node "$iface" "$prefix" $start $new_ip_max
-ctdb_onnode "$test_node" sync
+try_command_on_node any $CTDB sync
####################
diff --git a/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh b/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
index e3f1540aedb..e3c362c347a 100755
--- a/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
+++ b/ctdb/tests/CLUSTER/complex/31_nfs_tickle.sh
@@ -29,14 +29,15 @@ set -e
ctdb_test_init
+# 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#*= }"
+#echo "Monitor interval on node $test_node is $monitor_interval seconds."
+
select_test_node_and_ips
try_command_on_node $test_node "$CTDB listnodes | wc -l"
numnodes="$out"
-# We need this for later, so we know how long to run nc for.
-ctdb_onnode "$test_node" "getvar MonitorInterval"
-monitor_interval="${out#*= }"
-
test_port=2049
echo "Connecting to node ${test_node} on IP ${test_ip}:${test_port} with netcat..."
diff --git a/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh b/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
index b81510d3722..5ab8a34faec 100755
--- a/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
+++ b/ctdb/tests/CLUSTER/complex/34_nfs_tickle_restart.sh
@@ -27,6 +27,11 @@ set -e
ctdb_test_init
+# 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#*= }"
+#echo "Monitor interval on node $test_node is $monitor_interval seconds."
+
select_test_node_and_ips
try_command_on_node $test_node "$CTDB listnodes -X"
listnodes_output="$out"
diff --git a/ctdb/tests/INTEGRATION/database/basics.001.attach.sh b/ctdb/tests/INTEGRATION/database/basics.001.attach.sh
index 1fbffc58436..bcec20afc5e 100755
--- a/ctdb/tests/INTEGRATION/database/basics.001.attach.sh
+++ b/ctdb/tests/INTEGRATION/database/basics.001.attach.sh
@@ -1,18 +1,44 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb getdbmap' operates as expected
+test_info()
+{
+ cat <<EOF
+Verify that 'ctdb getdbmap' operates as expected.
+
+This test creates some test databases using 'ctdb attach'.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Get the database on using 'ctdb getdbmap'.
+3. Verify that the output is valid.
+
+Expected results:
+
+* 'ctdb getdbmap' shows a valid listing of databases.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
-select_test_node
+make_temp_db_filename ()
+{
+ dd if=/dev/urandom count=1 bs=512 2>/dev/null |
+ md5sum |
+ awk '{printf "%s.tdb\n", $1}'
+}
-# test_node set by select_test_node() above
-# shellcheck disable=SC2154
-ctdb_onnode -v "$test_node" getdbmap
+try_command_on_node -v 0 "$CTDB getdbmap"
dbid='dbid:0x[[:xdigit:]]+'
name='name:[^[:space:]]+'
@@ -21,28 +47,27 @@ opts='( (PERSISTENT|STICKY|READONLY|REPLICATED|UNHEALTHY))*'
line="${dbid} ${name} ${path}${opts}"
dbmap_pattern="^(Number of databases:[[:digit:]]+|${line})\$"
-# outfile set by ctdb_onnode() above
-# shellcheck disable=SC2154
num_db_init=$(sed -n -e '1s/.*://p' "$outfile")
sanity_check_output $(($num_db_init + 1)) "$dbmap_pattern"
for i in $(seq 1 5) ; do
- f="attach_test_${i}.tdb"
- echo "Creating test database: $f"
- ctdb_onnode "$test_node" "attach ${f}"
-
- ctdb_onnode "$test_node" getdbmap
- sanity_check_output $((num_db_init + 1)) "$dbmap_pattern"
- num=$(sed -n -e '1s/^.*://p' "$outfile")
- if [ "$num" = $((num_db_init + i)) ] ; then
- echo "OK: correct number of additional databases"
- else
- ctdb_test_fail "BAD: no additional database"
- fi
- if awk '{print $2}' "$outfile" | grep -Fqx "name:$f" ; then
- echo "OK: getdbmap knows about \"$f\""
- else
- ctdb_test_fail "BAD: getdbmap does not know about \"$f\""
- fi
+ f=$(make_temp_db_filename)
+ echo "Creating test database: $f"
+ try_command_on_node 0 $CTDB attach "$f"
+ try_command_on_node 0 $CTDB getdbmap
+ sanity_check_output $(($num_db_init + 1)) "$dbmap_pattern"
+ num=$(sed -n -e '1s/^.*://p' "$outfile")
+ if [ $num = $(($num_db_init + $i)) ] ; then
+ echo "OK: correct number of additional databases"
+ else
+ echo "BAD: no additional database"
+ exit 1
+ fi
+ if awk '{print $2}' "$outfile" | grep -Fqx "name:$f" ; then
+ echo "OK: getdbmap knows about \"$f\""
+ else
+ echo "BAD: getdbmap does not know about \"$f\""
+ exit 1
+ fi
done
diff --git a/ctdb/tests/INTEGRATION/database/basics.002.attach.sh b/ctdb/tests/INTEGRATION/database/basics.002.attach.sh
index 6a5c812f35a..ae09741f980 100755
--- a/ctdb/tests/INTEGRATION/database/basics.002.attach.sh
+++ b/ctdb/tests/INTEGRATION/database/basics.002.attach.sh
@@ -1,19 +1,38 @@
-#!/usr/bin/env bash
+#!/bin/bash
+
+test_info()
+{
+ cat <<EOF
+Verify the operation of 'ctdb attach' command.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Shut down one of the nodes
+3. Attach test databases
+4. Start shutdown node
+5. Verify that the databases are attached.
+6. Restart one of the nodes
+7. Verify that the databses are attached.
-# Verify that databases are attached a node joins the cluster:
-# 1. Shut down CTDB on one node
-# 2. Attach test databases
-# 3. Check that databases are attached on all up nodes
-# 4. Start CTDB on the node where it is shut down
-# 5. Verify that the test databases are attached on this node
-# 6. Restart one of the nodes
-# 7. Verify that the test databases are attached on this node
+
+Expected results:
+
+* Command 'ctdb attach' command successfully attaches databases.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
######################################################################
diff --git a/ctdb/tests/INTEGRATION/database/basics.003.detach.sh b/ctdb/tests/INTEGRATION/database/basics.003.detach.sh
index cb44955d1e8..5d1e12328c6 100755
--- a/ctdb/tests/INTEGRATION/database/basics.003.detach.sh
+++ b/ctdb/tests/INTEGRATION/database/basics.003.detach.sh
@@ -1,15 +1,34 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb detach' works as expected:
-# 1. Attach test databases
-# 2. Detach test databases
-# 3. Confirm test databases are not attached
+test_info()
+{
+ cat <<EOF
+Verify the operation of 'ctdb detach' command.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Attach test databases
+3. Detach test databases
+4. Verify that the databases are not attached.
+
+Expected results:
+
+* Command 'ctdb detach' command successfully removes attached databases.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
######################################################################
diff --git a/ctdb/tests/INTEGRATION/database/basics.004.wipe.sh b/ctdb/tests/INTEGRATION/database/basics.004.wipe.sh
index 115d64cd606..9305339d1e3 100755
--- a/ctdb/tests/INTEGRATION/database/basics.004.wipe.sh
+++ b/ctdb/tests/INTEGRATION/database/basics.004.wipe.sh
@@ -1,17 +1,36 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Verify that 'ctdb wipedb' can clear a persistent database:
-# 1. Verify that the status on all of the ctdb nodes is 'OK'.
-# 2. Create a persistent test database
-# 3. Add some records to node 0 and node 1
-# 4. Run wipedb on node 0
-# 5. verify the database is empty on both node 0 and 1
+test_info()
+{
+ cat <<EOF
+The command 'ctdb wipedb' is used to clear a database across the whole
+cluster.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Create a persistent test database
+3. Add some records to node #0 and node #1
+4. Perform wipedb on node #0 and verify the database is empty on both node 0 and 1
+
+Expected results:
+
+* An empty database will result
+
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/database/basics.010.backup_restore.sh b/ctdb/tests/INTEGRATION/database/basics.010.backup_restore.sh
index 8c469d4642b..579233e0e80 100755
--- a/ctdb/tests/INTEGRATION/database/basics.010.backup_restore.sh
+++ b/ctdb/tests/INTEGRATION/database/basics.010.backup_restore.sh
@@ -1,18 +1,39 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Confirm that 'ctdb restoredb' works correctly:
-# 1. Create a persistent test database
-# 2. Add some records to test database
-# 3. Backup database
-# 4. Wipe database and verify the database is empty on all nodes
-# 5. Restore database and make sure all the records are restored
-# 6. Make sure no recovery has been triggered
+test_info()
+{
+ cat <<EOF
+The command 'ctdb restoredb' is used to restore a database across the
+whole cluster.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
+
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. Create a persistent test database
+3. Add some records to test database
+4. Backup database
+5. Wipe database and verify the database is empty on all nodes
+6. Restore database and make sure all the records are restored
+7. Make sure no recovery has been triggered
+
+Expected results:
+
+* Database operations should not cause a recovery
+
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 $CTDB status
generation=$(sed -n -e 's/^Generation:\([0-9]*\)/\1/p' "$outfile")
diff --git a/ctdb/tests/INTEGRATION/database/fetch.001.ring.sh b/ctdb/tests/INTEGRATION/database/fetch.001.ring.sh
index 4d7d392240d..33df07b7d88 100755
--- a/ctdb/tests/INTEGRATION/database/fetch.001.ring.sh
+++ b/ctdb/tests/INTEGRATION/database/fetch.001.ring.sh
@@ -1,12 +1,23 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Run the fetch_ring test and sanity check the output
+test_info()
+{
+ cat <<EOF
+Run the fetch_ring test and sanity check the output.
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
try_command_on_node 0 "$CTDB listnodes | wc -l"
num_nodes="$out"
diff --git a/ctdb/tests/INTEGRATION/database/fetch.002.ring-hotkeys.sh b/ctdb/tests/INTEGRATION/database/fetch.002.ring-hotkeys.sh
index 6d442535a21..c4e0023e11c 100755
--- a/ctdb/tests/INTEGRATION/database/fetch.002.ring-hotkeys.sh
+++ b/ctdb/tests/INTEGRATION/database/fetch.002.ring-hotkeys.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/bin/bash
# Run the fetch_ring test, sanity check the output and check hot keys
# statistics
diff --git a/ctdb/tests/INTEGRATION/database/readonly.001.basic.sh b/ctdb/tests/INTEGRATION/database/readonly.001.basic.sh
index aeb974028e6..a83b4d31530 100755
--- a/ctdb/tests/INTEGRATION/database/readonly.001.basic.sh
+++ b/ctdb/tests/INTEGRATION/database/readonly.001.basic.sh
@@ -1,28 +1,46 @@
-#!/usr/bin/env bash
+#!/bin/bash
-# Test support for read-only records
+test_info()
+{
+ cat <<EOF
+Read-only records can be activated at runtime using a ctdb command.
+If read-only records are not activated, then any attempt to fetch a read-only
+copy should be automatically upgraded to a read-write fetch_lock().
+
+If read-only delegations are present, then any attempt to aquire a read-write
+fetch_lock will trigger all delegations to be revoked before the fetch lock
+completes.
+
+
+Prerequisites:
+
+* An active CTDB cluster with at least 2 active nodes.
+
+Steps:
-# Read-only records can be activated at runtime using a ctdb command.
-# If read-only records are not activated, then any attempt to fetch a
-# read-only copy should be automatically upgraded to a read-write
-# fetch_locked().
+1. Verify that the status on all of the ctdb nodes is 'OK'.
+2. create a test database and some records
+3. try to fetch read-only records, this should not result in any delegations
+4. activate read-only support
+5. try to fetch read-only records, this should result in delegations
+6. do a fetchlock and the delegations should be revoked
+7. try to fetch read-only records, this should result in delegations
+8. do a recovery and the delegations should be revoked
-# If read-only delegations are present, then any attempt to acquire a
-# read-write fetch_lock will trigger revocation of all delegations
-# before the fetch_locked().
+Expected results:
-# 1. Create a test database and some records
-# 2. Try to fetch read-only records, this should not result in any delegations
-# 3. Activate read-only support
-# 4. Try to fetch read-only records, this should result in delegations
-# 5. Do a fetchlock and the delegations should be revoked
-# 6. Try to fetch read-only records, this should result in delegations
+Delegations should be created and revoked as above
+
+EOF
+}
. "${TEST_SCRIPTS_DIR}/integration.bash"
+ctdb_test_init
+
set -e
-ctdb_test_init
+cluster_is_healthy
######################################################################
@@ -92,7 +110,7 @@ check_readonly ()
######################################################################
echo "Get list of nodes..."
-ctdb_onnode 0 "-X listnodes"
+try_command_on_node any $CTDB -X listnodes
all_nodes=$(awk -F'|' '{print $2}' "$outfile")
######################################################################
--
Samba Shared Repository
More information about the samba-cvs
mailing list