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

111325 Commits

Author SHA1 Message Date
Martin Schwenke
5815c32d01 ctdb-tests: Define generic setup() function
Create default setup() function that aborts.  This function will be
redefined by each support script and used to do the setup.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
9038759259 ctdb-tests: statd-callout.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
44b29982f4 ctdb-tests: 60.nfs.sh simple 80 column fixups and reordering
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
b526968bcf ctdb-tests: 20.multipathd.sh 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
4430e22d0c ctdb-tests: 11.natgw.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
bfd2d70fc4 ctdb-tests: 10.interface.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
b6cde6ff9f ctdb-tests: 05.system.sh simple 80 column fixups
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
0f78e0b4c4 ctdb-tests: Create statd-callout.sh
Contains testing support used only by tests for statd-callout script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
0f080cebef ctdb-tests: Create 91.lvs.sh
Contains testing support used only by tests for 91.lvs event scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
7d91de549b ctdb-tests: Create 60.nfs.sh and 06.nfs.sh
Contains testing support used only by tests for 60.nfs and 06.nfs
event scripts.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
32d8483b07 ctdb-tests: Create 50.samba.sh
Contains testing support used only by tests for 50.samba event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:18 +02:00
Martin Schwenke
a51e4ea042 ctdb-tests: Create 49.winbind.sh
Contains testing support used only by tests for 49.winbind event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
f33f4b3a23 ctdb-tests: Create 41.httpd.sh
Contains testing support used only by tests for 41.httpd event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
f306c2d807 ctdb-tests: Create 40.vsftpd.sh
Contains testing support used only by tests for 40.vsftpd event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
38b54a60f5 ctdb-tests: Create 20.multipathd.sh
Contains testing support used only by tests for 20.multipathd event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
e489929335 ctdb-tests: Create 13.per_ip_routing.sh
Contains testing support used only by tests for 13.per_ip_routing
event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
916b7f947e ctdb-tests: Create 11.natgw.sh
Contains testing support used only by tests for 11.natgw event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
ee6052e689 ctdb-tests: Create 10.interface.sh
Contains testing support used only by tests for 10.interface event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
f5a70415dd ctdb-tests: Create 05.system.sh
Contains testing support used only by tests for 05.system event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
7b4dd7e539 ctdb-tests: Create 01.reclock.sh
Contains testing support used only by tests for 01.reclock event
script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
bcb6cc2861 ctdb-tests: Create 00.ctdb.sh
Contains testing support used only by tests for 00.ctdb event script.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
bbd96993c8 ctdb-tests: Allow modularisation of event script testing support
local.sh is enormous.  Allow per-event-script customisation.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
26e090dd4e ctdb-tests: Clean up handling of CTDB_SCRIPT_VARDIR
Only set this in ctdb_set_pnn() and always use the PNN in the path.

Generic setup functions like setup_ctdb() will go away soon in favour
of more doing setup that is specific to the script being tested.
Therefore, call ctdb_set_pnn() in define_test() to ensure that
CTDB_SCRIPT_VARDIR is always set.  Note that setup_ctdb() is never
called with an argument so the default PNN has always been 0.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
1d7d4874df ctdb-tests: Clean up fake share handling
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
3c82d3ae3d ctdb-tests: New function setup_numnodes()
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:17 +02:00
Martin Schwenke
6eec33c0a7 ctdb-tests: Tweak debug function
Output to stderr.  Read from stdin if no arguments given, making it
possible to handle long lines using here documents.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
e4a4532e5c ctdb-tests: Make date handling consistent in 00.ctdb tests
This duplicates the filter function but that will be fixed later.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
3571345667 ctdb-tests: New support functions setup_dbdir() and setup_date()
For now, these need to be called from setup_generic() to stop tests
from breaking.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
ab89958817 ctdb-tests: Don't set FAKE_ETHTOOL_LINK_DOWN globally
This variable doesn't need to be set in a generic function and can be
set by the ethtool support functions

This is now a subdirectory of FAKE_NETWORK_STATE.

The down/up functions get reindented because the new 1st line should
be indented according to the new script indent-with-tabs style.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
26329aa035 ctdb-tests: Move variable FAKE_IP_STATE into the ip stub
It is the only user of this variable.

This is now a subdirectory of FAKE_NETWORK_STATE.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
3bbf3e97ca ctdb-tests: Move variable FAKE_CTDB_IFACES_DOWN into ctdb stub
It is the only user of this variable.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
ce1b5b30d3 ctdb-tests: Remove case statement in ctdb stub
This removes a lot of unnecessary clutter.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
713804beec ctdb-tests: Update argument handling of ctdb stub functions
All functions are now called after shifting away the command name.

There is less churn that expected because some functions don't use any
arguments.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
7d1d5fc969 ctdb-tests: Move ctdb stub code from case statement to functions
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
06be4a6529 ctdb-tests: Drop unused ctdb stub scriptstatus and xpnn commands
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
6f730c4b3a ctdb-tests: Fix a bug in the ctdb stub's moveip command
This was writing garbage into the IP layout file and relevant tests
were passing by luck.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
fb2090762e ctdb-tests: New global variable FAKE_NETWORK_STATE
Stash all the network state in this directory.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
ad081f9144 ctdb-tests: Make FAKE_CTDB_STATE globally set
Lots of things depend on it.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:16 +02:00
Martin Schwenke
cf866d66aa ctdb-scripts: Drop unused functions
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:15 +02:00
Martin Schwenke
2f33b18d84 ctdb-script: Drop CTDB_MANAGED_SERVICES configuration option
This seems never to have caught on so reduce complexity.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
2018-03-28 02:57:15 +02:00
Andrew Bartlett
d955ab2239 selftest: Run net.api.become.dc against less roles
This test is slower than many and need not be run five times.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Mar 28 01:53:56 CEST 2018 on sn-devel-144
2018-03-28 01:53:56 +02:00
Andrew Bartlett
a93b1f6fd3 selftest: Do not run *.lock tests against both nt4_dc and ad_dc
This part of the protocol is not changed by being an AD DC.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
f8c429bddf selftest: Move slow raw_protocol test to chgdcpass environment
The ad_dc environment is busy and we need to keep it under 50mins for travis CI, so run
this on a different environment with a shorter runtime.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
f4fe1c836e gitlab-ci: Split up build_samba_others and build_ctdb tasks
These make too much output and the shared runners on GitLab CI object to
sending more than 4MB of output.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
106793a42c selftest: Do not run krb5.kdc machine account test against ad_dc
This code is already well tested against fl2008r2dc and just as per
8f1557a2c4 this test is slow and we can afford to be
more selective here.

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
5509fdea19 selftest: Do not run raw.notify, smb2.oplock and raw.oplock twice
These are slower tests that do not need to be run against the ad_dc configuration
in particular.

This saves time in the ad_dc job which needs to stay under 50mins to
pass on travis-ci (and faster tests are better for everyone anyway).

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
97d0203151 autobuild: Run all envs that depend on ad_dc in the ad_dc job
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
606ba7a0ba gitlab: Run fileserver tests on "private" not "shared"
This might make the delaywrite tests pass

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
56191dcfb7 autobuild: Split up the build further with samba-ad-dc-2
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00
Andrew Bartlett
474b39ce56 gitlab-ci: Set shared and private tags to allow builds that need ext4 to pass
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2018-03-27 23:03:14 +02:00