summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/scripts
Commit message (Collapse)AuthorAgeFilesLines
...
* 23_ctdb_moveip.sh sanity checks the list of IPs/nodes instead ofMartin Schwenke2009-01-161-0/+22
| | | | | | | | looping forever on older versions of CTDB. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 03dfcf9f284c9926479a8dd4e5acf1f5d2b964aa)
* Test binaries now go in tests/bin and ctdb_test_env now adds thisMartin Schwenke2009-01-091-3/+1
| | | | | | | | directory to $PATH if local daemons are being used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a497010f67d6a8e68f4d6d7e516b88d2261b1062)
* Add tests/README. ctdb_test_env and, therefore, run_tests can now beMartin Schwenke2009-01-093-8/+8
| | | | | | | | | | | | | run from the tests subdirectory... and most other sensible places. Rename $CTDB_TEST_REMOTE_SCRIPTS_DIR to $CTDB_TEST_REMOTE_DIR since it is now intented that this directory can contain test binaries too. daemons_start() now passes a full path to the events.d directory when starting ctdbd. Also fixed the path to ctdbd. 41_ctdb_ban.sh and 42_ctdb_unban.sh fail immediately if they fail to select a test node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3ecce31d3a3f72b9fa851ac99291865c119e551e)
* Delete some unstructured tests ({fetch,peristent,transaction}.sh) andMartin Schwenke2009-01-083-10/+39
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* Remove bench.sh test and replace with new test 51_ctdb_bench.sh.Martin Schwenke2008-12-181-4/+11
| | | | | | | | | Function try_command_on_node node passes any options other than -v to onnode. Minor update to 14_ctdb_statistics.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e627f8e5fe8e2e3ea423b7dbd12d74597fb4983b)
* ctdb_test_env now sets $CTDB_TIMEOUT. FixedMartin Schwenke2008-12-171-0/+2
| | | | | | | | | 26_ctdb_config_check_error_on_unreachable_ctdb.sh to work with new generic error message when trying to talk to disconnected node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 33afe9bae732e62994e5957ee143a9c49571898b)
* 3 new tests. 24_ctdb_getdbmap.sh is only 1/2 implemented but doesMartin Schwenke2008-12-151-0/+1
| | | | | | | | | 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)
* Add a recovery to ctdb_test_exit to improve test stability.Martin Schwenke2008-12-121-0/+7
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit b7be3de004cb05dad05704096e2a75e128952b18)
* Rename $CTDB_NUM_NODES to $CTDB_TEST_NUM_DAEMONS and only set it ifMartin Schwenke2008-12-122-5/+11
| | | | | | | | | $CTDB_TEST_REAL_CLUSTER is not set. After a ctdb restart, force a recovery to attempt to help tests that follows. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 497c40f69e06776861a780500da1952eb7ea8fc1)
* With local daemons the sockets are now numbered starting from 0. FixMartin Schwenke2008-12-102-13/+52
| | | | | | | | | | | | | | setup of local daemons so that it correctly assigns no public IPs to a single node each time. Separate out daemon_setup so that the selection of the node with no public IPs is only done once at the beginning of testing. Clean up all current tests, mostly with a view to ensuring that a node selected for testing some kind of failover actually has public addresses assigned. Reenabled 01_ctdb_version.sh - it now passes if rpm doesn't do anything useful on the node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 86807e8b7b179cbe87e559fb3b1f02c8b1990dc4)
* Added use of $ctdb_test_exit_hook to function ctdb_test_exit. RemovedMartin Schwenke2008-12-091-0/+32
| | | | | | | | | | | | | sleeps from ban/unban tests. Now expect "ctdb ping" to return false if it fails, so made relevant change to 09_ctdb_ping.sh. New functions install_eventscript and uninstall_eventscript. New setup/cleanup tests 00_ctdb_install_eventscript.sh and 99_ctdb_uninstall_eventscript.sh. New test 21_ctdb_disablemonitor.sh, which is incredibly complex. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 23bffef2295772f5b795236d60b7fb6ea754b7fb)
* When running with local daemons, provided there is more than 2 ofMartin Schwenke2008-12-081-3/+10
| | | | | | | | | | | | | | | them, randomly pick a single node that will not have any public IPs assigned. This will make life a bit more interesting and will simulate what happens on real clusters with a management node. Some tests were disabling a node to implicitly trigger a ctdb restart - now use an explicit restart of ctdb when it is required. 17_ctdb_config_delete_ip.sh now randomly chooses a public IP on any node to disable - this works around a problem where the hardcoded node might not have any public addresses. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3d59783c0e9478f4766c380945d6200fc654f5d9)
* New test for getmonmode. Overload node_has_status some more toMartin Schwenke2008-12-041-2/+6
| | | | | | | | support checking the monitoring mode. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4e1c079deb0aafb99d4114bb6504ff5ba1cbdeb4)
* ctdb_test_init now contains a trap to force ctdb_test_exit to be runMartin Schwenke2008-12-031-0/+8
| | | | | | | | | | | | | | if the shell exits and ctdb_test_exit cancels this trap. This means that a testcase executing under set -e will call ctdb_test_exit on failure, allowing the cluster to be restarted if necessary so that following tests can complete successfully. ctdb_test_exit now respects $?, so a test will fail if the last thing executed before ctdb_test_exit failed - this probably means the above trap was triggered. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 805a426aaee5ecfc5bd1c097069fe58f8241dfe2)
* $PATH only inludes $CTDB_DIR/bin if we're using local sockets. RenameMartin Schwenke2008-12-032-11/+20
| | | | | | | | | $TEST_WRAP to $CTDB_TEST_WRAPPER - value now set using $CTDB_TEST_REMOTE_SCRIPTS_DIR if that is set. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a69545d7dec78eefb85a1598e5db4667cc210bf9)
* 4 new tests. Hacked function node_has_status to supportMartin Schwenke2008-11-271-9/+18
| | | | | | | | frozen/unfrozen via ctdb statistics command. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e040a989096cf7d5c0cdece1713ff903cb7568f8)
* New test 09_ctdb_ping.sh. Add documentation and command-lineMartin Schwenke2008-11-243-57/+124
| | | | | | | | | | | | processing to all tests. New script ctdb_test_env sets up environment for tests, is now sourced by run_tests, and can also take a test on the command-line, complete with options. Various cleanups and improvements. Document tests that have been properly implemented in ctdbd.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 826e85fe5291067b8d0b9c22918d63024aa6141c)
* Move tests/*.c to tests/src/*.c and adjust Makefile.in accordingly.Martin Schwenke2008-11-212-21/+79
| | | | | | | | | | | | | | | | | | Move setting of $CTDB_NODES_SOCKETS to tests/scripts/run_tests and make it only happen if $CTDB_TEST_REAL_CLUSTER is not set. Bugfix in function ips_are_on_nodeglob. New/proper implementations of functions stop_daemons and start_daemons, now called by function restart_ctdb. In start_daemons.sh, add public addresses file generation/usage, use new option --nopublicipcheck to ctdbd to avoid crazy behaviour and kill ctdbd more carefully to avoid killing real daemons on a real cluster - this should be able to coexist on a node of a real cluster. start_daemons.sh is temporarily incompatible with start_daemons function, but expecting to replace that script with function calls very soon anyway... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4c54772c5c2fa7d2a25963379b5b96caf0c2521c)
* Add some simple tests that can be run from within the tree.Martin Schwenke2008-11-203-0/+389
Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eacb2ef82ea4809d874158756db973dd1e3fc8fc)