summaryrefslogtreecommitdiffstats
path: root/ctdb/tests
Commit message (Collapse)AuthorAgeFilesLines
* In 51_ctdb_bench.sh now allows a 2% difference between positive andMartin Schwenke2009-05-122-4/+5
| | | | | | | | | negative. ctdb_bench.c checks to ensure the timer has advanced from 0 before dividing. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 723413f246399b25166462d2018237920515655f)
* Avoid floating point divide by 0 in ctdb_fetch.c's bench_fetch().Martin Schwenke2009-05-121-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 3c67e164eb92591f8763883430490805c1dfa9ed)
* Bug fixes for tests: simple/12_ctdb_getdebug.sh and scripts/test_wrap.Martin Schwenke2009-05-122-2/+8
| | | | | | | | | | | | | | simple/12_ctdb_getdebug.sh now recognises output with multi-digit node numbers. Sharing the ctdb directory via NFS and testing on a real cluster by setting CTDB_TEST_REAL_CLUSTER didn't work by default. The fix is to hack scripts/test_wrap so that it tries to find a valid bin directory next to the directory containing it is in. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ea2ca769e1d1068fbbad843750b19acfd87360e0)
* Use ctdb_fetch_lock rather than ctdb_call.Martin Schwenke2009-05-121-26/+9
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5f3d2e29a446972ac244e20a08e48f4c2f4ffef4)
* Merge commit 'ronnie/master'Andrew Tridgell2009-02-091-0/+17
|\ | | | | | | (This used to be ctdb commit 1a110993af1706e0c5df500fa7d14e16c0668372)
| * add a simple test script to test ctdb_check_tcp_portsMichael Adam2009-01-301-0/+17
| | | | | | | | | | | | Michael (This used to be ctdb commit 2634f1bd216ce18f061a282a53314cb1650dbd05)
* | Make message in 62_ctdb_persistent_unsafe.sh more informative.Martin Schwenke2009-01-161-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4777b74b1e2eebe54cf27f3303f60e49023e7f6a)
* | 23_ctdb_moveip.sh sanity checks the list of IPs/nodes instead ofMartin Schwenke2009-01-162-0/+24
| | | | | | | | | | | | | | | | looping forever on older versions of CTDB. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 03dfcf9f284c9926479a8dd4e5acf1f5d2b964aa)
* | Remove the sorts from 06_ctdb_getpid.sh - the PIDs should be listed inMartin Schwenke2009-01-131-3/+3
| | | | | | | | | | | | | | | | node order. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 4b97bdba3bc4df20efb1aae7d89a1e3430d35ca3)
* | Use $CTDB_TEST_WRAPPER in other tests that need it.Martin Schwenke2009-01-134-4/+4
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2912c1ade5db1e20bfa3a8017a702cc8a7da36f1)
* | Use $CTDB_TEST_WRAPPER in 51_ctdb_bench.sh.Martin Schwenke2009-01-131-1/+1
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 44ec4c57bf9928ef5d5cc117a6c2d92495dac489)
* | For now, make tests/run_tests.sh runs the new test suite. AddMartin Schwenke2009-01-123-51/+5
| | | | | | | | | | | | | | | | tests/TODO. Remove tests/start_daemons.sh - no longer used. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5cdbef46b74e6a5ba2383ef025e69fe605fa4f6e)
* | 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-096-8/+124
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-0840-199/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 old ctdbd.sh test script. Remove unneeded nodes.txt andMartin Schwenke2008-12-185-85/+2
| | | | | | | | | | | | | | | | | | | | | | public_addresses files - these are now created in tests/var as needed. 09_ctdb_ping.sh now recognises new "node disconnected" message. Replace custom recovery detection code (which could not have been working) with a call to "ctdb recover" in 32_ctdb_enable_simple.sh. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 486ed3b5b483f1c12c2d978ec6564bd33a2c6aee)
* | Remove bench.sh test and replace with new test 51_ctdb_bench.sh.Martin Schwenke2008-12-185-31/+107
| | | | | | | | | | | | | | | | | | 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)
* | Bug fixes for ctdb_bench from Ronnie.Martin Schwenke2008-12-181-33/+52
| | | | | | | | (This used to be ctdb commit 2c055831f0d56e42d055e1d72fb6f0db5f71def1)
* | ctdb_test_env now sets $CTDB_TIMEOUT. FixedMartin Schwenke2008-12-172-1/+5
| | | | | | | | | | | | | | | | | | 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)
* | New test 26_ctdb_config_check_error_on_unreachable_ctdb.sh.Martin Schwenke2008-12-171-0/+72
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit a99204ad8bd4d3b15c8219762442682a3d1285cf)
* | Finish 24_ctdb_getdbmap.sh. New test 25_dumpmemory.sh.Martin Schwenke2008-12-162-9/+71
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f5aeab0390b735291ee82359f50d508619211623)
* | 3 new tests. 24_ctdb_getdbmap.sh is only 1/2 implemented but doesMartin Schwenke2008-12-156-3/+273
| | | | | | | | | | | | | | | | | | 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)
* | Add message about restart to 18_ctdb_freeze.sh.Martin Schwenke2008-12-111-0/+2
| | | | | | | | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 2a069118fee169460bdf68b9a639b0e96ac85266)
* | With local daemons the sockets are now numbered starting from 0. FixMartin Schwenke2008-12-1019-121/+170
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-097-10/+216
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-084-29/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-042-2/+75
| | | | | | | | | | | | | | | | 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-0324-53/+53
| | | | | | | | | | | | | | | | | | $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-275-9/+322
| | | | | | | | | | | | | | | | frozen/unfrozen via ctdb statistics command. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit e040a989096cf7d5c0cdece1713ff903cb7568f8)
* | 4 new tests. Marked more ctdbd.sh tests as done - will remove thisMartin Schwenke2008-11-256-17/+309
| | | | | | | | | | | | | | | | | | file soon. Simplify 06_ctdb_getpid.sh by using -v option to try_command_on_node. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit c6fc68db9061547e73ec2b811e260bd7da7f58fa)
* | New test 09_ctdb_ping.sh. Add documentation and command-lineMartin Schwenke2008-11-2420-95/+560
| | | | | | | | | | | | | | | | | | | | | | | | 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-2113-27/+85
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-2020-2/+1077
|/ | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit eacb2ef82ea4809d874158756db973dd1e3fc8fc)
* add a CTDB_SOCKET variable that can be used to override the defaultRonnie Sahlberg2008-11-111-0/+3
| | | | | | /tmp/ctdb.socket (This used to be ctdb commit b75e2263c565c21ecbbd98fbd2c10787e467bf5c)
* when we collect all ip addresses and sort them for the "ctdb ip -n all" ↵Ronnie Sahlberg2008-08-221-1/+1
| | | | | | output we must look at more than just the first 4 bytes of the sockaddr address or ipv6 wont work (This used to be ctdb commit 4dfbfb4618433d9ed79ca1bdb1e2e51d96d4ee62)
* fix the ipv6 checksum calculation for pseudoheader so that it actually worksRonnie Sahlberg2008-08-191-3/+0
| | | | | | | | add support to send ipv6 "gratious arp" aka neighbor solicitation packets from ctdb Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> (This used to be ctdb commit 0a38ea11af9237501f2951fee698a59b46f8750d)
* remove a file we dont needRonnie Sahlberg2008-08-191-11/+0
| | | | | | Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> (This used to be ctdb commit bf6effef0cc9e5f2eeeb38fce855a90624a76239)
* initial ipv6 patchRonnie Sahlberg2008-08-193-6/+22
| | | | | | Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com> (This used to be ctdb commit 1f131f21386f428bbbbb29098d56c2f64596583b)
* fixed some warningsAndrew Tridgell2008-07-301-20/+20
| | | | (This used to be ctdb commit fe55bfc8fb6dc628f72f220843e829a251d09936)
* fixed a warningAndrew Tridgell2008-07-301-1/+1
| | | | (This used to be ctdb commit 3a71844cfdb9fe69208030432ddb547b0e215726)
* cleanup of the old persistent db testAndrew Tridgell2008-07-301-6/+9
| | | | (This used to be ctdb commit 306af4ccef132ea023f1f01e11f877a3a742ee4c)
* added a new persistent transaction test programAndrew Tridgell2008-07-302-0/+286
| | | | (This used to be ctdb commit d5dcb46e182466e4b51c106f2491178c23babd8d)
* cleanup on SIGINTAndrew Tridgell2008-07-301-0/+2
| | | | (This used to be ctdb commit 008533d971aec9c28c6e4750ef4677dd943633ff)
* - cleanup persistent db at startAndrew Tridgell2008-07-302-1/+9
| | | | | | - catch SIGINT and kill daemons (This used to be ctdb commit d3f5d75665a78ae0081fda57e58384b27a6ae396)
* - show pids during testAndrew Tridgell2008-07-301-8/+5
| | | | | | | - don't use first_time, as it is not safe for multiple clients on a node (This used to be ctdb commit 22f737be0e70fc043affaa4f953f60d852b7999a)
* add a parameter for the tdb-flags to the client functionRonnie Sahlberg2008-06-047-8/+38
| | | | | | | | | | ctdb_attach() so that we can pass TDB_NOSYNC when we attach to a persistent database and want fast unsafe writes instead of slow but safe tdb_transaction writes. enhance the ctdb_persistent test suite to test both safe and unsafe writes (This used to be ctdb commit 4948574f5a290434f3edd0c052cf13f3645deec4)
* run the persistent write test with 4 nodes by defaultRonnie Sahlberg2008-06-031-3/+5
| | | | | | | use the timelimit argument to the persistent writer to run the test for 30 seconds by default (This used to be ctdb commit 181318fea6886c40d0aff02d0de777f28ffeddce)