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

420 Commits

Author SHA1 Message Date
Ronnie Sahlberg
569ea5c4e1 Merge remote branch 'martins/eventscript_tests'
(This used to be ctdb commit 4e670d9bc1bdeb2abd7e846bc36e02f0aa0d7309)
2011-08-15 15:43:15 +10:00
Martin Schwenke
65ff8b4b7b Tests - exportfs stub needs to print out export options.
This is needed due to bd39b91ad12fd05271a7fced0e6f9d8c4eba92e6.

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

(This used to be ctdb commit 92f8e31f6995836b1668639a4dac2862efee269a)
2011-08-15 15:42:20 +10:00
Ronnie Sahlberg
2c5f1d7ccc Merge remote branch 'martins/eventscript.60.nfs.rpc'
(This used to be ctdb commit 2e30a2bb4371a846c7a768affa15883211642d5c)
2011-08-15 15:20:18 +10:00
Ronnie Sahlberg
775e188cb7 Merge remote branch 'martins/test_suite'
(This used to be ctdb commit f9899b1b96056d23628356589c855cf2262e5152)
2011-08-15 15:16:06 +10:00
Martin Schwenke
facd0ce624 Tests - ctdb listvars test should allow alphanumericals in tunable names.
This matches the new "LCP2PublicIPs" tunable.

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

(This used to be ctdb commit 0680437bf5f02aeaed6387370e58bbdba2c04f28)
2011-08-15 13:56:26 +10:00
Martin Schwenke
3b43805a31 Tests: re-enable the NFS eventscript tests - they work again.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 3e145ab1bb61ed2087ec5ce6183ee24802686ed3)
2011-08-12 16:30:54 +10:00
Martin Schwenke
881054a0ad Tests: Re-enable the Samba eventscript tests.
They work again.

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

(This used to be ctdb commit 2036764bfd1a4571fcfcca22099c2b9a95a02c57)
2011-08-11 15:33:46 +10:00
Martin Schwenke
9f98ec85d9 Revert "Tests: tweak some samba tests to cope with debug from ctdb_check_tcp_ports()."
This reverts commit 557ac30e60516742da10b83bfbbbb41430c977a2.

(This used to be ctdb commit 9600cc7a6b7b854fac1a5b080129e3df8fcbd84e)
2011-08-11 15:32:28 +10:00
Ronnie Sahlberg
3c7fb84774 Merge remote branch 'martins/eventscript_tests'
(This used to be ctdb commit ac164a0d731fc5d46ab7d05112484c45ecb21100)
2011-08-10 15:18:16 +10:00
Ronnie Sahlberg
e2bb73a8f3 Merge remote branch 'martins/test_suite'
(This used to be ctdb commit 92eac08764e87bd3042d2a24ed36b2a339a04960)
2011-08-10 15:11:00 +10:00
Martin Schwenke
2042931ae6 Test suite: print debug output after cluster (un)healthy flip-flop on restart.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 0e14213dfa841080c07fa6fce23b192493adb926)
2011-08-08 16:39:12 +10:00
Martin Schwenke
f5115a9ea6 Allow proxy_node to be specified for wait_until_node_has_status().
Default to "any"... but allow specification because sometimes it
matters...

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

(This used to be ctdb commit c12c97598afcd07ce4876b26e0b734bc825e54c1)
2011-08-08 16:38:43 +10:00
Martin Schwenke
47f1a7dd5b Test suite: Fix consistency in 26_ctdb_config_check_error_on_unreachable.
The test currently waits until any node thinks that the test node is
disconnected, and then uses node 0 as a proxy for testing.  However,
nodes may notice at different times that a node is disconnected, so
this test can fail unnecessarily.

We force the proxy node for the wait-until-disconnected to be the same
as the proxy node used to launch the actual tests.

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

(This used to be ctdb commit 73cfc304513358e99e6505c95f44a4d319201309)
2011-08-08 16:35:55 +10:00
Martin Schwenke
6ffeae85d6 Test suite: Fix consistency in 09_ctdb_ping.sh.
Same problem as described in commit
283a85b42d9c0a26acb64d5abcc7f175e31e6e75.

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

(This used to be ctdb commit 7758fd0591467a758e5d22404aa59fcbc1e1cb8b)
2011-08-08 16:35:22 +10:00
Martin Schwenke
667a743fff Test suite: Strip architecture suffix from CTDB RPM package version.
Later versions of RPM seem to include it but we don't want it.

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

(This used to be ctdb commit 6c8eedb21a5e231d4a26ac26706ea51f348a27e0)
2011-08-08 16:34:48 +10:00
Martin Schwenke
b3db37cd30 Test suite: remove getmonmode test.
This can't be made 100% reliable since the monitor mode can change
underneath us due to some event.  Therefore, the test is useless.

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

Conflicts:

	tests/simple/20_ctdb_getmonmode.sh

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

(This used to be ctdb commit 98ccdc6241a73036c4f210bb510f1cb5cff588cc)
2011-08-08 16:33:47 +10:00
Martin Schwenke
94f0fd9cd5 Test suite: Try much harder to get a healthy cluster when it is restarted.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 91e74cb01a11012e41ef9633c98f13ddbb2e5908)
2011-08-08 16:28:30 +10:00
Martin Schwenke
d8e342d71a Tests - Disable the Samba and NFS eventscript tests.
They're broken and not worth fixing without infrastructure changes so
disable them by taking away the execute bit.  This is somewhat easier
than trying to merge in all the other tests but not these ones.

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

(This used to be ctdb commit 151151353e58f59b15be9313e22b7d4f71ee0de8)
2011-08-08 16:11:14 +10:00
Martin Schwenke
958414ceeb Tests - Tweak 10.interfaces 802.ad bonding test to work with current code.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d3271d316f6d1561e66cbc4cc1b1e8af63895459)
2011-08-08 15:53:28 +10:00
Martin Schwenke
b30143eb78 Tests - implement "ctdb -Y ip -v" in stub for eventscript testing.
This is pretty limited but it gets 10.interfaces tests working.

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

(This used to be ctdb commit 7130963430e530fa4dd5e6fe132bd7122349cc5f)
2011-08-08 15:42:45 +10:00
Martin Schwenke
7e5c48c84c Tests - stub ip program should assume interface name if "dev" not specified.
Currently it fails if you don't use the "dev" keyword.

This makes it behave as expected.

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

(This used to be ctdb commit 4fa2073649f25993de4b8ef6b3e7172068a83a29)
2011-08-08 14:45:30 +10:00
Martin Schwenke
2c9c77f6dc Tests: update tests to work with previous commit.
Issues:

* 10.monitor no longer prints a message when there is no
  public_addresses file.

* Extra bonding test added to check workaround for IEEE 802.3ad
  Dynamic link aggregation bonding mode bug.

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

(This used to be ctdb commit 01c941ab4c764c5aac0d7c0f90fca89775956d41)
2011-08-08 13:47:13 +10:00
Martin Schwenke
506be3cb26 Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.
This sets up a more useful convention and avoids future .gitignore
problems.

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

(This used to be ctdb commit 58c696dc600f1073e693930da061776b6fb199f2)
2011-08-08 13:38:07 +10:00
Martin Schwenke
604eb67102 Tests: tweak some samba tests to cope with debug from ctdb_check_tcp_ports().
This is a bit too static.  However, it can fixed up later if it is a
hassle.

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

(This used to be ctdb commit 557ac30e60516742da10b83bfbbbb41430c977a2)
2011-08-08 13:38:07 +10:00
Martin Schwenke
2396846ca1 Tests: Oops! Add bin directory for eventscript tests.
It was matched by .gitignore.

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

(This used to be ctdb commit ef7e5da6241e326267800cd2bd53fb33a0386c2d)
2011-08-08 13:38:07 +10:00
Martin Schwenke
f43ae500be Tests: initial eventscript unit tests.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit b675ca3c25b7155b9681128822d1280018ef68bb)
2011-08-08 13:38:07 +10:00
Ronnie Sahlberg
c6c3d83477 Merge remote branch 'martins/test_suite'
(This used to be ctdb commit 113c763f15ab1db3810f40504b60bab5d3f2f212)
2011-08-03 16:56:26 +10:00
Ronnie Sahlberg
8f03eed985 Merge remote branch 'martins/onnode_tests'
(This used to be ctdb commit 0384f1902bb64d6683b689de226fff4e54331c24)
2011-08-03 16:26:43 +10:00
Ronnie Sahlberg
8a0e932008 Merge remote branch 'martins/lcp2_sim'
(This used to be ctdb commit cc9a09b2cbe300ad5848932b9273270ad50ea6b0)
2011-08-03 16:25:46 +10:00
Martin Schwenke
000fbb607e Test suite: when the cluster flip-flops (un)healthy, using "ctdb status -Y".
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit d3dc9410501767c07d9b0106bb73c979d869c127)
2011-08-03 16:06:40 +10:00
Martin Schwenke
7e48ba58c6 Test suite: Print debug info from cluster nodes when time jumps occur.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 21cdc7ed6942238faeb42983c862d4abc3f54ffb)
2011-08-03 16:06:40 +10:00
Martin Schwenke
372f0a1bff Test suite: Add debug for cluster (un)healthy flip-flop after restart.
We're seeing the cluster become healthy after a restart and then
revert to being unhealthy.  It looks like there's a race and the
cluster shouldn't have been healthy, given that we seem to see that
the monitor cycle hasn't yet been run.

This collects some state debug info from all nodes after the cluster
becomes healthy.  This is printed if the cluster is then unexpectedly
unhealthy a short time later.

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

(This used to be ctdb commit c2efb5897e4258df649149f9904d7ac47322e1b4)
2011-08-03 16:06:40 +10:00
Martin Schwenke
659f54e61a Test suite: add more debug to time jump post mortem.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit fed3c2b80b8add8d1cf33abdd5dd8d8001af44d4)
2011-08-03 16:06:40 +10:00
Martin Schwenke
e05b902f99 Test suite: add automated checking of time logs.
This depends on the format of onnode output and also depends on
simple/00_ctdb_onnode.sh having been run.

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

(This used to be ctdb commit 93b53b186df55942bf4d9e90cae329f47889af72)
2011-08-03 16:06:40 +10:00
Martin Schwenke
7e5549a54e Test suite: make time log use seconds since epoch.
Easier to implement automatic checking.

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

(This used to be ctdb commit 18db530880849b59445d7aa508bf218bdd77ea1c)
2011-08-03 16:06:40 +10:00
Martin Schwenke
88fc88caf5 Test suite: CTDB_SAMBA_SKIP_SHARE_CHECK test now uses _loadconfig().
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 651e6703b6dc4d11ba7d6d0b44d3be1f485a0f75)
2011-08-03 16:06:40 +10:00
Martin Schwenke
3a18451cef Test suite: CTDB_NFS_SKIP_SHARE_CHECK test now uses _loadconfig().
The manual replacement of loadconfig() had bit rotted and no longer
worked.

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

(This used to be ctdb commit bf23e7166385d305c6860b37c120f70a9aa33aa5)
2011-08-03 16:06:40 +10:00
Martin Schwenke
4f4cf7b100 Test suite: make time logging only happen on a real cluster, not local daemons.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit a6b3a7b7db9aa5fc971aae11b9b012e72c7d240c)
2011-08-03 16:06:40 +10:00
Martin Schwenke
bb32a6cf70 Test suite: add time logging.
We're seeing some weirdness with CTDB controls timing out.  We're
wondering if time is jumping forward, so this creates a time log on
each node that we can examine later if tests fail weirdly.

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

(This used to be ctdb commit 5d82d89ee99f10bead101aebda645a80435ba246)
2011-08-03 16:06:40 +10:00
Martin Schwenke
7cec7807e1 Tests: eventscripts and onnode tests use stubs/ subdirectory instead of bin/.
This sets up a more useful convention and avoids future .gitignore
problems.

Resolved conflict while cherry-picking this:

  Don't take the eventscripts files for this branch.  We'll put them
  elsewhere.

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

(This used to be ctdb commit a9879e37d4e3bb714ef6c0c4144c6949daec0b53)
2011-08-03 15:55:35 +10:00
Martin Schwenke
8006aec7b1 Tests: run_tests script no longer prints filename in summary descriptions.
If filenames should be printed in descriptions in the summary then the
descriptions should include the filename.  A better option is to
include something more human-readable that makes the test just as
easily identifiable.

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

(This used to be ctdb commit 0efdbd61bdc2343e5459959b300bccc9986b1d78)
2011-08-03 15:51:44 +10:00
Martin Schwenke
3ee6a63e47 Tests: onnode tests changed to use a simple define_test() function.
This makes global changes easier.

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

(This used to be ctdb commit 3af086398fecb5f7c501190f9620b9c7b201f0ca)
2011-08-03 15:51:44 +10:00
Martin Schwenke
51ef4b4e55 Tests: add initial onnode tests
Add some simple tests for the onnode command.  These use fake ssh and
ctdb commands that are added to $PATH.  The infrastructure used is
quite flexible and would allow more complex tests to be written.

As-is, these tests expose some bugs in the an older version of onnode
that is included so it can be used to validate some of the tests.

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

(This used to be ctdb commit f7f9d0943474cb2de7832d7ca95210ea9e9c772b)
2011-08-03 15:51:44 +10:00
Martin Schwenke
8d2c726deb Tests: change output format of run_tests script and add -q option
Putting PASSED/FAILED on the left makes it easier to scan the results
and simplifies the code.  Also put starts around the word "*FAILED*"
to make it more obvious.

Also add a -q option to throw away test output and only display the
summary (if -s is also specified).

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

(This used to be ctdb commit c44b632b010b7d57007f3c8f294271c7e0217e0d)
2011-08-03 15:51:44 +10:00
Martin Schwenke
eae91c959e Test suite: add a -d option to the run_tests script.
This causes summary lines (when used with -s) to be pretty printed and
include the test description.  This is the 4th line of the test output
- that is, immediately after the header.

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

(This used to be ctdb commit 0e5cc2a58b0d38e10a2ef9e81dc887c20f3fbdcb)
2011-08-03 15:51:44 +10:00
Ronnie Sahlberg
82d59bbc8e make test: add two missing events to the special test eventscript
(This used to be ctdb commit 771b1e9c2e694ccc8825fb8088174c122532e74d)
2011-08-02 19:25:14 +10:00
Martin Schwenke
7fcfea6141 IP allocation simulation - Pad IPv4 addresses in LCP2 algorithm.
This makes IPv4 addresses comparable with IPv6 but reduces the overall
effectiveness of the algorithm.  The alternative would be to treat
these addresses separately while trying to keep all the IPs in overall
balance...  which is basically the problem that LCP2 solves.  :-)

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

(This used to be ctdb commit 3a7624f9d468b99714a7b6a45313f9e7f66011ed)
2011-07-29 14:32:07 +10:00
Martin Schwenke
0a96e936f2 IP allocation simulation - make stats label for LCP2 imbalance more meaningful.
This time in the stats summary.

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

(This used to be ctdb commit aabb2507dacc63ae026e6c99704a2fb79950e82c)
2011-07-29 14:32:07 +10:00
Martin Schwenke
581375d56d IP allocation simulation - make stats label for LCP2 imbalance more meaningful.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 721a06e28bacf9e03fd8eb4aff53dd17c363ffa1)
2011-07-29 14:32:07 +10:00
Martin Schwenke
adf8dbe8c0 IP allocation simulation - add examples.
Signed-off-by: Martin Schwenke <martin@meltin.net>

(This used to be ctdb commit 8a1ae0c5a3aa788ed0f29c264249ba7bc5d226a7)
2011-07-29 14:32:07 +10:00