summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/src
Commit message (Collapse)AuthorAgeFilesLines
...
* Load platform dependent objs instead of Linux oneMathieu Parent2012-02-112-6/+0
| | | | | | | | | | | This fix compilation on Gnu/Hurd and kFreeBSD See also: https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=hurd-i386&ver=1.12%2Bgit20120201-1&stamp=1328211119 https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-amd64&ver=1.12%2Bgit20120201-1&stamp=1328214761 https://buildd.debian.org/status/fetch.php?pkg=ctdb&arch=kfreebsd-i386&ver=1.12%2Bgit20120201-1&stamp=1328215875 (This used to be ctdb commit 496e8f8540f78606ef23ee8fa100eb2b2cf3f106)
* ReadOnly: add per-database statistics to view how much delegations/revokes ↵Ronnie Sahlberg2012-02-081-0/+17
| | | | | | we have (This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
* TESTS: ctdb_fetch needs to allow tevent nestingRonnie Sahlberg2012-02-061-0/+1
| | | | (This used to be ctdb commit 4fa3f109b7ddc40e79c5fbb9688e0e830c0a655e)
* Tests: fix usage message in ctdb_tool_libctdbMartin Schwenke2012-02-061-1/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ca1d2bb62e61b7d723a648b3a9b146e258efcabb)
* Tests: libctdb stubs should fail when current node disconnectedMartin Schwenke2012-02-061-0/+46
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit f96954b42b03f810f7b1732b5fe00c5dab2d8cb8)
* Tests - add a version of the ctdb tool that compiles against libctdb stubsMartin Schwenke2012-02-061-0/+49
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6c79b951c3ae68238f8dbd836ceca6c1187eaabe)
* Tests - allow tools/ctdb.c:main() to be usedMartin Schwenke2012-02-061-0/+30
| | | | | | | | We'll need stubs somewhere else... Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 6f29c39d666485fddef60e9d87bf94082d179ebb)
* Tests - more libctdb stub test infrastructureMartin Schwenke2012-02-062-3/+86
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 25a0136bd773e7ed8dfda635471f0498d4a7afe9)
* Tests - more libctdb stubs and supporting state faking functionsMartin Schwenke2012-02-061-5/+197
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9bfc3b04ffeca056d8507d1cc8bc20f56c8e1572)
* Tests - update test code for ctdb tool code and libctdb stubsMartin Schwenke2012-02-061-2/+3
| | | | | | | | | Rename ctdb_parse_nodestring.c to ctdb_tool_libctdb.c. It can contain many tests. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d597020af01dfcdf0d39e1cf579bf33f43f87dda)
* ReadOnly: update the loop test tool to print number of fetches per secondRonnie Sahlberg2012-02-011-2/+11
| | | | (This used to be ctdb commit f53c66a5e0dc5351b86b81dc5b1faea757981d4c)
* Tests - make a comment more accurateMartin Schwenke2011-12-081-2/+1
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 726b598076132a5a73f9259d6b65ee2a4012099f)
* Tests - test code for parse_nodestring() functionMartin Schwenke2011-12-083-0/+417
| | | | | | | | | | | This function is fairly complex so here is some test code. This reworks Makefile a bit and also provides test stubs for some libctdb functions. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 5b11f990404c26c279c9ae389483e560f1c01a81)
* Tests: change ctdb_takeover_tests.c to include ctdbd codeMartin Schwenke2011-11-112-10/+95
| | | | | | | | | | | | | | | | | | Do this instead of linking to it. This means that, after previous cleanups, we can fix ctdb_takeover.c to use static functions when appropriate and simply include all the code we need to run tests. To make this reusable in other tests, new file ctdbd_tests.c does all of the relevant including. ctdb_takeover_tests.c just includes that file. Test objects built in this way can depend on new Makefile macro $(CTDB_TEST_C), which contains ctdbd_tests.c and everything it includes. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 41869d42194b74db43a176a068e96e411007e5f2)
* Clean up warnings: remove set but unused variable from rb_testMartin Schwenke2011-11-091-4/+0
| | | | | | Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit d0244fec8d0dd2abd31a8677e2c2b254b030c47b)
* Clean up warnings: log some unchecked return codes from function callsMartin Schwenke2011-11-091-0/+6
| | | | | | | | | | | | | | | | | | In a few places functions are called, the return code is assigned into a variable but it is not checked. This generates a compiler warning like this: warning: variable ‘ret’ set but not used [-Wunused-but-set-variable] Instead we remove the warning by checking the return code variable and log a warning at DEBUG level if the return code indicates an error. The justification is that there may have been a future intent to check the return code but it hasn't been important enough to follow-up. If it matters, it will be logged for easy debugging. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1932466c76de2b184c2a257120768ab8c9d6c12a)
* Merge remote branch 'martins/lcp2fix'Ronnie Sahlberg2011-11-081-21/+163
|\ | | | | | | (This used to be ctdb commit 7c02d242af552aa732f5c70ea4eeefbc8a8542e2)
| * Tests - Allow some tests in ctdb_takover_tests to specify allowed nodesMartin Schwenke2011-11-011-21/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This mainly applies to ctdb_takeover_run_core when you might want to specify that some IPs can only be hosted by some nodes. Syntax on each line is now: IP current_pnn allowed_pnns where allowed_pnns is a comma-separated list. allowed_pnns is optional. If not specified then address can be assigned to all nodes that aren't included in an allowed_pnns list. Just think of it as all PNNs and that the behaviour is undefined when you only specify allowed_pnns for some IPs. ;-) current_pnn is optional and defaults to -1. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit ed83604da82ebe566d6eb330ab7119e861e853c8)
* | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-11-081-5/+34
|\ \ | |/ |/| | | (This used to be ctdb commit d772743e9a4d4d40eb95cd8d5178708e77057b79)
| * RB_TREE: Add mechanism to abort a traverseRonnie Sahlberg2011-11-081-5/+34
| | | | | | | | | | | | | | | | This patch changes the callback signature for traversal functions to allow a client to abort a traverse before it finishes. Updates to all callers and examples as well as rb-test tool. (This used to be ctdb commit 8ab0c63ad36cfbbb1e5fed46a1f4c47b1fdb581f)
* | Merge branch 'master' of 10.1.1.27:/shared/ctdb/ctdb-masterRonnie Sahlberg2011-10-281-41/+49
|\| | | | | | | (This used to be ctdb commit bdcaf531e07ad5a08841aab2f396849c554a0fa6)
| * Tests: convert test tool for fetching a readonly lock to libctdbRonnie Sahlberg2011-10-281-41/+49
| | | | | | | | (This used to be ctdb commit 18b6969dd1760521f839e5a928f1c7e9b3c34d4e)
* | Merge remote branch 'martins/tests'Ronnie Sahlberg2011-10-181-11/+16
|\ \ | |/ |/| | | (This used to be ctdb commit 99de5bceb788ba56ebc052c05d29a834ba2496fa)
| * Tests - IP allocation - allow more interesting node states to be specifiedMartin Schwenke2011-09-251-11/+16
| | | | | | | | | | | | | | | | | | Node states on the command line are now comma-separated hex numbers, so all flag states can be expressed. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 1f1534435b9d5f464604e28a8cce2cd0a779ef68)
* | Typo deamon -> daemonMathieu Parent2011-10-121-1/+1
|/ | | | | | Thanks to lintian (This used to be ctdb commit dd9e508c947613cc7a5046a35c80fbeced408803)
* fix some compiler warnings for the test toolsRonnie Sahlberg2011-09-132-5/+5
| | | | (This used to be ctdb commit dbfd5abafbe66c20c413a4335b2cdbd9cc24052a)
* Fix additional breakage from the merge for change in signature for ↵Ronnie Sahlberg2011-09-124-10/+8
| | | | | | ctdb_cmdline_client() and ctdb_attach() (This used to be ctdb commit 14656eaa01a8951693fa146b3d35258f7daaafd5)
* Merge branch 'master-readonly-records' into fooRonnie Sahlberg2011-09-124-0/+562
|\ | | | | | | | | | | | | | | | | Conflicts: Makefile.in tools/ctdb.c (This used to be ctdb commit 0fedef0ffba4178126eee9544c5e2db52f5db893)
| * LibCTDB : change the ctdb_fetch_lock_once test tool to use libctdb instead ↵Ronnie Sahlberg2011-08-231-31/+55
| | | | | | | | | | | | of the old client (This used to be ctdb commit 231f16b3e0c9c44fc85c95bde7951ccfab50af91)
| * ReadOnly: Change the update_record test tool to use the new fetchlock ↵Ronnie Sahlberg2011-08-231-3/+1
| | | | | | | | | | | | routine that can do either normal or readonly fetchlock (This used to be ctdb commit 6d5d79367f7d04e2a9a6ad5d8be70d609b764629)
| * ReadOnly: Add a test tool that requests a readonly delegation in a loopRonnie Sahlberg2011-08-231-0/+134
| | | | | | | | (This used to be ctdb commit 72a6e77fe56a4a6d11b1d02fa049b6dd347ac0f1)
| * ReadOnly: Add a test tool to fetch a record, requesting a readonly ↵Ronnie Sahlberg2011-08-231-0/+134
| | | | | | | | | | | | delegation and lock the record once (This used to be ctdb commit 29c77c249d0454057ce28003e018e126c7c01513)
| * ReadOnly: add a new test tool that does a fetchlock on a record, then bunps ↵Ronnie Sahlberg2011-08-231-0/+160
| | | | | | | | | | | | the RSN by 10 and writes the new content to the record as sprintf("%d", rsn) (This used to be ctdb commit 151b25798f2a2c182fc9557c1c1ea0f3ef0ad3fe)
| * ReadOnly: Add test tool to validate the functions to manipulate and ↵Ronnie Sahlberg2011-08-231-0/+136
| | | | | | | | | | | | enumerate the bitmap of nodes to where we have readonly delegations (This used to be ctdb commit bfdeda30ee0e359f06dd5714864f8beae22b0736)
* | client: add timeout argument to ctdb_attachDavid Disseldorp2011-09-068-10/+18
| | | | | | | | | | | | Rather than using a fixed 2 second CTDB_CONTROL_GETDBPATH timeout. (This used to be ctdb commit 9e178671560cb95121e11d718a76b05380ecd6c5)
* | client: add req timeout argument to ctdb_cmdline_clientDavid Disseldorp2011-09-068-8/+8
| | | | | | | | | | | | | | | | | | | | | | Following connection to the local ctdbd, ctdb_cmdline_client() currently issues a CTDB_CONTROL_GET_PNN request with a fixed 3 second timeout. The ctdb cmd line client accepts a --timelimit argument for specifying a per request timeout, pass this value through to ctdb_cmdline_client() for use as a CTDB_CONTROL_GET_PNN request timeout. (This used to be ctdb commit 0634d0305f42f17048b6830733767e8dc300e11c)
* | LibCTDB : change the ctdb_fetch_lock_once test tool to use libctdb instead ↵Ronnie Sahlberg2011-08-231-31/+55
|/ | | | | | of the old client (This used to be ctdb commit cd1080726d7787b335ab4bfb64a7991237ab92f5)
* Tests: Initial test code for LCP2 IP allocation algorithm.Martin Schwenke2011-07-291-0/+378
| | | | | | | | | | | | Move struct ctdb_public_ip_list to ctdb_private.h and put some definitions for some functions from ctdb_takeover.c there. This allows those functions to be called from unit tests. Add ctdb_takeover_tests.c and the Makefile support to build it. Signed-off-by: Martin Schwenke <martin@meltin.net> (This used to be ctdb commit 9d34be0233edf3bc022345c0494c4b2a4d7f8480)
* test: send SCHEDULE_FOR_DELETION control from randrec test.Michael Adam2011-03-141-1/+42
| | | | (This used to be ctdb commit 30aa55b3efc6fbd4078f93da386b6aeb337c1a0c)
* tests: fix segfault in store test when connection to ctdbd failed.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 43a15d2906b3f9d08af234f55a3a0f614571d3a7)
* tests: fix segfault in fetch_one test when connection to ctdbd failsMichael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 89c8e52de3878b8e29c6a24725eb66c18fd1f52a)
* tests: fix segfault in fetch test when connection to ctdb failed.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit f493eb31abf956fd38347c2ff77026e380a9664d)
* tests: fix segfault in randrec test when connection to daemon fails.Michael Adam2011-03-091-0/+5
| | | | (This used to be ctdb commit 715999d7ffbf10f3a57de3ee08a293165333553a)
* Add a new test tool that fetch locks a record and then blocks until it receivesRonnie Sahlberg2011-01-241-0/+120
| | | | | | user input to unlock the record again. (This used to be ctdb commit 1b3c5278aa1bf712606e2ec138e6be7b2e8a6ad1)
* event: Update events to latest Samba version 0.9.8Rusty Russell2010-08-189-9/+9
| | | | | | | | | | | | | In Samba this is now called "tevent", and while we use the backwards compatibility wrappers they don't offer EVENT_FD_AUTOCLOSE: that is now a separate tevent_fd_set_auto_close() function. This is based on Samba version 7f29f817fa939ef1bbb740584f09e76e2ecd5b06. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 85e5e760cc91eb3157d3a88996ce474491646726)
* rename ctdb_set_message_handler to ctdb_client_set_message_handlerRonnie Sahlberg2010-06-022-3/+3
| | | | | | to avoid a colission with the function of the same name in libctdb (This used to be ctdb commit 41dbdd4fc0ab560420fb0e24a3179ff7c94c5bb7)
* rename ctdb_send_message to ctdb_client_send_message to resolve colission ↵Ronnie Sahlberg2010-06-022-3/+3
| | | | | | with the function of the same name in libctdb (This used to be ctdb commit ac3292c12832484a22715f1d46aa23f3b7c8a6f6)
* Merge commit 'rusty/libctdb2'Ronnie Sahlberg2010-05-251-1/+1
|\ | | | | | | (This used to be ctdb commit d41b802250ddc0a89581eb6285edfd66bdc7a78a)
| * libctdb: reorganize headers: remove ctdb.h, add ctdb_client.h and ↵Rusty Russell2010-05-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ctdb_protocol.h ctdb_client.h is the existing internal client interface (which was mainly in ctdb.h), and ctdb_protocol.h is the information needed for the wire protocol only. ctdb.h will be the new, shiny, libctdb API. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> (This used to be ctdb commit 4bba6b8cd47b352f98d41f9f06258d5ac3c9adef)
* | tests:ctdb_bench: make send_start_messages() static - eliminates compile warningMichael Adam2010-05-111-1/+1
| | | | | | | | | | | | Michael (This used to be ctdb commit e1a16c23d7dbf011ad220572f1bf081331efa8f8)