1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-29 21:47:30 +03:00

686 Commits

Author SHA1 Message Date
Amitay Isaacs
ea1c89566e tests: Add regular expression parsing for hop_count_buckets
This fixes the test to check ctdb statistics output.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 98c633ab4824e0e4d28ab2eb2532e16eb859bd94)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
dbe7fa9ff0 tests: Add a script to run cluster tests and make target "test_cluster"
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 420a10be89c62b4d605f3b972d78fd69dd9f5bb1)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
926f656580 tests: exportfs always outputs with options in brackets
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit bdd8b8ab20169936fa723fa77cead1b76b6cd0b5)
2012-04-13 14:51:13 +10:00
Amitay Isaacs
c985ccf411 tests/tool: New nodestatus test
Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 902d8a4709e7a269d2a75522a998f9a60ae13d78)
2012-04-13 12:07:01 +10:00
Amitay Isaacs
2119438496 tests/tool: Fix the nodestatus test
Although not obvious, when asking each node for nodestatus, it will report
each node is the current node.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 261258c1a4268230b2559bc5d8664b1197b22450)
2012-04-13 12:06:59 +10:00
Ronnie Sahlberg
7698a5105e Add test for NoIPTakeover
(This used to be ctdb commit 79172330d10ae0d5a7e5bf724959c9e5784716b4)
2012-04-12 10:31:17 +10:00
Martin Schwenke
8d328920db Tests - eventscripts - initial policy routing tests
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 7d7488a49bc7e799f39f3da3fa81be7a2e14480a)
2012-03-22 15:30:27 +11:00
Martin Schwenke
c0931a0cde Tests - eventscripts - new function simple_test_command()
Allows running arbitrary command and comparing output against
expected.

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

(This used to be ctdb commit da2e9650a97f99e7d694659926d9958927edd8ad)
2012-03-22 15:30:27 +11:00
Martin Schwenke
2f312355c7 Tests - eventscripts - change summary columns
To accommodate 13.per_ip-routing in output.

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

(This used to be ctdb commit 0142729c96b8bfecfabe35439071557bcc6ed4da)
2012-03-22 15:30:27 +11:00
Martin Schwenke
746d116649 Tests - eventscripts - rationalise CTDB fakery support
Remove functions for marking nodes as down/up.  This is now done via
ctdb disable/enable in the stub.

Also more consistent temporary directory use.

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

(This used to be ctdb commit 1db9a533aacc6e02ddbadf76241429144a949e1c)
2012-03-22 15:30:27 +11:00
Martin Schwenke
42400a155b Tests - eventscripts - improved support functions for handling public IPs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 299ce89fb3deeefcc7c01b20197dc6adee1e8194)
2012-03-22 15:30:27 +11:00
Martin Schwenke
f8a1273fc1 Tests - eventscripts - add support functions for policy routing testing
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 79eec235ac9b051333751186c32924d92e6ebeff)
2012-03-22 15:30:27 +11:00
Martin Schwenke
5ecc348072 Tests - eventscripts - fix hardcoding error
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9c30bf7fd3d94884e27a258571a28dca5e460177)
2012-03-22 15:30:27 +11:00
Martin Schwenke
5afbb43038 Tests - eventscripts - stub ctdb command updates
* Proper IP (re)allocation using ctdbd's IP allocation algorithm.
* Therefore, "ctdb ip" works sensibly.
* Add enable, disable, moveip.

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

(This used to be ctdb commit 6d4b4b1293ba960d8fdf81958d6e8dd23c9d771a)
2012-03-22 15:30:27 +11:00
Martin Schwenke
cb0b0e0ae0 Tests - eventscripts - more public IPs in default setup
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 38396185effbcf313678c2e94d4bd20f534c4f03)
2012-03-22 15:30:27 +11:00
Martin Schwenke
52e7a03853 Tests - eventscripts - add -A/-D options
Make it easier to spot differences between desired output and actual
output.

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

(This used to be ctdb commit d132a8f4a8c0573ac447713a71911f02b6f0d73c)
2012-03-22 15:30:27 +11:00
Martin Schwenke
c394b7d065 Tests - eventscripts - ip stub command should print errors to stderr
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 236d572556e447e2d82d14d2c8a40ed8cb98944d)
2012-03-22 15:30:27 +11:00
Martin Schwenke
6e260553f5 Eventscript tests - implement ip route in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ac2cd2a8cbed97348ceae54167ad83cb074ff6b3)
2012-03-22 15:30:27 +11:00
Martin Schwenke
d0f25b3c37 Eventscript tests - implement ip rule in stub
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 26292f362890ca6cb65d0028d50fa97458e0449f)
2012-03-22 15:30:27 +11:00
Martin Schwenke
60b5ff0e4b Eventscript tests - make ip command stub vaguely maintainable
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8b8e17bea87a8c16f7c0f54fcfe29190f203f673)
2012-03-22 15:30:27 +11:00
Martin Schwenke
3b024ab2bd Eventscript tests - make error message consistent with recent change
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f4949b3c1b36949544e98c9fbb64447f94f9e432)
2012-03-22 15:30:27 +11:00
Ronnie Sahlberg
b3ddf6901d Merge remote branch 'martins/master'
(This used to be ctdb commit af72f8bc05f78983f9624d81788f9d89af474b11)
2012-03-15 16:09:41 +11:00
Ronnie Sahlberg
f7b2adfde6 Test: add test tool and test that UPDATE_RECORD works on persistent databases
(This used to be ctdb commit f06634951331232cddf0b48eac3552b92aca5b93)
2012-03-12 16:10:09 +11:00
Michael Adam
55abb07f51 server: move the code for the update_record control to its own file
It is very misleading in ctdb_persistent.c, since it is used for non-persistent
dbs...

(This used to be ctdb commit a956fa3a27106d0154a3fb46987d61c0a6b7c768)
2012-02-21 17:54:17 +01:00
Ronnie Sahlberg
1cfefb406f TESTS: Add test for wipedb command
(This used to be ctdb commit 4ea05fef886b0680d0ad0936c239a51fd75bf000)
2012-02-16 10:19:15 +11:00
Martin Schwenke
88c74987dc Tests - functions/environment - set and use $CTDB_NODES
"ctdb listnodes" changed so that it never tries to contact the daemon
but reads the local nodes file instead.  This fails if the nodes file
is in a non-default place but $CTDB_NODES isn't set.

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

(This used to be ctdb commit a7ad2fb75f06791508dd928d2a0c305fc7f7b814)
2012-02-13 13:34:57 +11:00
Martin Schwenke
bd41a2ae0d Tests - simple - make disconnected node tests handle changed error message
Recent changes to nodestring parsing generalised the error message
logged when trying to talk to a disconnected node.

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

(This used to be ctdb commit db69a39ca010b2c8853b13466e30792dda350cdb)
2012-02-13 13:32:25 +11:00
Ronnie Sahlberg
5082bba246 READONLY: add test for creating and revoking delegations
(This used to be ctdb commit a7e7fa2169ee12f817336f6d03d5bb72df7ec020)
2012-02-13 11:16:24 +11:00
Ronnie Sahlberg
4af0b6115f READONLY: Update the fetch-readonly-once test tool to use CTDB_SOCKET if set
(This used to be ctdb commit f4d395165816f74839ed48860e3210e05bc16d3d)
2012-02-13 11:06:45 +11:00
Mathieu Parent
938bb15ad9 Load platform dependent objs instead of Linux one
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)
2012-02-11 11:15:06 +11:00
Ronnie Sahlberg
73f8be16c6 ReadOnly: add per-database statistics to view how much delegations/revokes we have
(This used to be ctdb commit 751ed46197661eb841042ab6a02855a51dd0b17c)
2012-02-08 15:29:27 +11:00
Ronnie Sahlberg
770bba6718 TESTS: Add a test that verifies that RecoverPDBBySeqNum works as expected.
If this tunable is set to 1 AND the persistent database contains a record "__db_sequence_number__" then we will recover the whole database as-is instead of doing the record by record recovery

(This used to be ctdb commit 3e5d2b61fcb4d0062d2573d99724f630a4fc4622)
2012-02-08 08:59:53 +11:00
Ronnie Sahlberg
b7f0e0353f TESTS: ctdb_fetch needs to allow tevent nesting
(This used to be ctdb commit 4fa3f109b7ddc40e79c5fbb9688e0e830c0a655e)
2012-02-06 17:32:34 +11:00
Ronnie Sahlberg
0c6178e629 Merge remote branch 'martins/tests'
(This used to be ctdb commit 5f660e5bf321ae5332bf1d32c8af36d6cc2569f4)
2012-02-06 16:34:02 +11:00
Ronnie Sahlberg
307cc316ab Merge remote branch 'martins/takeover'
(This used to be ctdb commit 4948f34676d5bdaaf1ddf8879df618a76013ea1e)
2012-02-06 16:30:49 +11:00
Martin Schwenke
c7c19397cd Test - IP allocation simulation - add -e option to run the daemon's algorithm
A recent change in the deamon's (i.e. real) IP allocation algorithm
uses qsort(3).  This makes it very difficult to get the same results
in Python, since qsort's behaviour on identical keys is undefined.

Add a -e option to run "../bin/ctdb_takeover_tests ctdb_takeover_run_core"
instead of the internal Python algorithm.  We pass the current cluster
state and read it back from the output of the test program.

This is currently a rough hack.  Perhaps it'll be improved later...
:-)

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

(This used to be ctdb commit eed3f4988290bbe317a7aaa6f61826676dd8365a)
2012-02-06 16:03:01 +11:00
Martin Schwenke
840a9b8702 Tests - IP allocation simulation - LCP2 => non-deterministic
The default in this script is still deterministic IPs.  The LCP2
option should really turn off deterministic IPs.

Also fix a typo...

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

(This used to be ctdb commit c378a059b35fcc9955215a0095826c919d42153c)
2012-02-06 16:03:01 +11:00
Martin Schwenke
c497e4bc19 Tests: eventscripts - fix breakage in some NFS tests
1341329f6125d491b82c873f793af819e677f714 either contains typos or
attempts to influence the test depending on the host system.  Whatever
the cause, a test system (e.g. my laptop) might not have
/etc/sysconfig/nfs, so that can't be used to cause the stub
etc/sysconfig/nfs to be loaded.

We make the tests work by default again, leaving in some flexibility
over configuration file location.

If the goal is to force a Debian-style test mode then:

* The tests are currently probably quite RHEL-centric anyway, so more
  work is probably needed.

* Use an environment variable to indicate the distro test mode and
  make functions like setup_nfs() remove all of the various
  configuration files and create one in the distro-specific location.

I won't do this now... ENOTIME...

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

(This used to be ctdb commit 4aa4a5790ea9ad20e4d25404760c449b358b5260)
2012-02-06 16:02:09 +11:00
Martin Schwenke
4e01fedea5 Tests: eventscripts - make init test pass with recent change to 10.interface
e646142f4d28b5401235cd5edee325f7a29f8193 changes the output on the
init event.  This accommodates that change.

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

(This used to be ctdb commit 48cb55aae47d11487bdf004a79df56779d1825a0)
2012-02-06 16:02:09 +11:00
Martin Schwenke
6ba3e67796 Tests: new test to check that "ctdb delip" removes the IP from interface.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a63e603cb7e21a7334c6a07bc4415ff089dab3c1)
2012-02-06 16:02:09 +11:00
Martin Schwenke
8bcad72c41 Tests - ctdb tool - add verbose option and output filtering
Need to filter dates before comparing...

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

(This used to be ctdb commit 6127515ea62173ff1574d1217129ec05a8fbeb3f)
2012-02-06 16:00:24 +11:00
Martin Schwenke
a856514c28 Tests - ctdb tool - fix "ctdb status" test
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 47e86c33d768816d03817124481bb6aa967bf2a6)
2012-02-06 16:00:24 +11:00
Martin Schwenke
72961bc163 Tests - let run_tests.sh take a list of tests to run
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fa00bbf7d7378eecb5ba77684d01db90c9370bca)
2012-02-06 16:00:24 +11:00
Martin Schwenke
9f2ce614a7 Tests: initial ctdb tool testcases
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 47e9975fa75a7bb2628a751dc19d35e2c5c57ce3)
2012-02-06 16:00:24 +11:00
Martin Schwenke
e420c6b801 Tests: fix usage message in ctdb_tool_libctdb
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit ca1d2bb62e61b7d723a648b3a9b146e258efcabb)
2012-02-06 16:00:24 +11:00
Martin Schwenke
ed9eecb6bb Tests: libctdb stubs should fail when current node disconnected
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit f96954b42b03f810f7b1732b5fe00c5dab2d8cb8)
2012-02-06 16:00:24 +11:00
Martin Schwenke
31487f31df Tests - add a version of the ctdb tool that compiles against libctdb stubs
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 6c79b951c3ae68238f8dbd836ceca6c1187eaabe)
2012-02-06 16:00:24 +11:00
Martin Schwenke
7a1ed19578 Tests - allow tools/ctdb.c:main() to be used
We'll need stubs somewhere else...

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

(This used to be ctdb commit 6f29c39d666485fddef60e9d87bf94082d179ebb)
2012-02-06 16:00:23 +11:00
Martin Schwenke
4bf69a0fff Tests - more libctdb stub test infrastructure
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 25a0136bd773e7ed8dfda635471f0498d4a7afe9)
2012-02-06 16:00:23 +11:00
Martin Schwenke
ea22ce5c72 Tests - more libctdb stubs and supporting state faking functions
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 9bfc3b04ffeca056d8507d1cc8bc20f56c8e1572)
2012-02-06 16:00:23 +11:00