1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-25 23:21:54 +03:00
Commit Graph

7 Commits

Author SHA1 Message Date
Martin Schwenke
bf197d097f tests: Rename ctdb_test_functions.bash to integration.bash
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 79adb50b3ce3873c3baf9e6715c1d1c3f181ce43)
2012-04-27 15:40:43 +10:00
Martin Schwenke
96b3517356 Test suite: better debug info when the cluster is unexpectedly unhealthy.
cluster_is_healthy() is now run locally in tests and internally causes
_cluster_is_healthy() to be run on node 0.  When it detects that the
cluster is unhealthy and $ctdb_test_restart_scheduled is not true,
debug information is printed.  This replaces the previous use of
$CTDB_TEST_CLEANING_UP.

To avoid spurious debug on expected restarts, added scheduled
restarts to several tests.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ee7caae3a55a64fb50cd28fa2fd4663c5dd83b4f)
2009-07-06 17:52:11 +10:00
Martin Schwenke
0d425a07d4 Separate test cleanup code in output and clean up ctdb restart code.
* ctdb_restart_when_done() now schedules a restart by setting an
  explicit variable that is respected in ctdb_test_exit(), rather than
  adding a restart to $ctdb_test_exit_hook.  This means that restarts
  are all done in one place.

* ctdb_test_exit() turns off "set -e" to make sure that all cleanup
  happens.

* ctdb_test_exit() now prints a clear message indicating where the
  test ends and the cleanup begins.  This message also includes the
  return code of the test.

* Add debug in cluster_is_healthy to try to capture information about
  unexpected unhealthiness when a test starts.

* Simplify simple/07_ctdb_process_exists.sh so that the exit code is
  generated more obviously.

* Remove redundant calls to ctdb_test_exit at the end of tests, since
  they're done automatically via a trap.  Also remove any preceding
  warnings of restarts or final hints about test success/failure.

* Allow multi-digit debug levels in simple/12_ctdb_getdebug.sh and
  simple/13_ctdb_setdebug.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit b6fa044a1364cbb3008085041453ee4885f7ced1)
2009-07-03 17:40:16 +10:00
Martin Schwenke
62871fbcd5 Clean up handling the of CTDB restarts in testcases.
Glitches during restarts of the CTDB cluster have been causing some
tests to fail.  This is because restarts are initiated in the body of
many tests.  This adds a simple function ctdb_restart_when_done, which
schedules a restart using an existing hook in the test exit code.
This function is now used in tests that need to restart CTDB.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d440e83bb4f0c19c085915d0f0e87cc0dabbc569)
2009-06-19 11:40:09 +10:00
Martin Schwenke
a70327ce1a Delete some unstructured tests ({fetch,peristent,transaction}.sh) and
replace them with new simple tests (52_ctdb_fetch.sh,
53_ctdb_transaction.sh, 61_ctdb_persistent_safe.sh,
62_ctdb_persistent_unsafe.sh).  Remove "_simple" from some test
filenames in the simple subdirectory - that's redundant.  Always run
ctdb as $CTDB to allow $VALGRIND magic to be used.  Use pgrep/pkill to
detect/kill local daemons so those running under valgrind can be found
too - to support this, always run local daemons with the full path to
the executable.  run_tests now supports -s option to print sumamry
when done - with more and more tests, it is getting hard to follow
progress.  Sort the output of commands in 06_ctdb_getpid.sh to make
sure they compare nicely and also allow the processes' executables to
be called "memcheck" to catch those running under valgrind.  Remove
redundant calls to onnode in commands run from calls
try_command_on_node in some tests.  41_ctdb_ban.sh and
42_ctdb_unban.sh avoid banning the recmaster, since this causes the
recmaster to be reassigned and all nodes to be unbanned.  Minor
cleanups.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 33cdf3e4bcfadf8e20822ca352babf7acca16821)
2009-01-08 17:12:03 +11:00
Martin Schwenke
331f39d340 Finish 24_ctdb_getdbmap.sh. New test 25_dumpmemory.sh.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f5aeab0390b735291ee82359f50d508619211623)
2008-12-16 17:22:22 +11:00
Martin Schwenke
b3dbc3f3aa 3 new tests. 24_ctdb_getdbmap.sh is only 1/2 implemented but does
something vaguely useful.  ctdb_test_exit unsets $ctdb_test_exit_hook.
Fix bug in 17_ctdb_config_delete_ip.sh.

Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f90f6e19952d58b8590fe550ecf2308bd9b065dc)
2008-12-15 17:52:12 +11:00