]> git.ipfire.org Git - thirdparty/samba.git/log
thirdparty/samba.git
5 years agos3: libsmb: Add in (currently unused) function dns_lookup_list().
Jeremy Allison [Tue, 21 Jul 2020 01:31:16 +0000 (18:31 -0700)] 
s3: libsmb: Add in (currently unused) function dns_lookup_list().

This function takes a list of names returned from a DNS SRV
query which didn't have returned IP addresses and returns an
array of struct sockaddr_storage.

Currently synchronous, but this is the function that will
be changed to be asynchronous later.

Compiles but commented out for now so we don't get "unused
function" warnings.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Pass in TALLOC_CTX * parameter to resolve_ads() instead of creating one...
Jeremy Allison [Tue, 21 Jul 2020 00:59:20 +0000 (17:59 -0700)] 
s3: libsmb: Pass in TALLOC_CTX * parameter to resolve_ads() instead of creating one internally.

Pass in talloc_tos() to make it match the other resolve_XXX() functions.

No memory leaks as this is used for transient data and is cleaned up
when the calling frame in internal_resolve_name() is destroyed.

Preparing to have it return a talloc'ed struct sockaddr_storage array
rather than a malloc'ed struct ip_service array.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - ensure ss_list variables are initialized with NULL.
Jeremy Allison [Tue, 21 Jul 2020 03:27:38 +0000 (20:27 -0700)] 
s3: libsmb: Cleanup - ensure ss_list variables are initialized with NULL.

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().
Jeremy Allison [Tue, 21 Jul 2020 00:56:48 +0000 (17:56 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in name_resolve_bcast().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in resolve_wins().
Jeremy Allison [Tue, 21 Jul 2020 00:53:28 +0000 (17:53 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in resolve_wins().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in resolve_lmhosts_file_as_so...
Jeremy Allison [Tue, 21 Jul 2020 00:50:21 +0000 (17:50 -0700)] 
s3/s4: Cleanup. Move TALLOC_CTX * parameter to be first in resolve_lmhosts_file_as_sockaddr() to match modern conventions.

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - put talloc parameter first in resolve_hosts().
Jeremy Allison [Tue, 21 Jul 2020 00:45:44 +0000 (17:45 -0700)] 
s3: libsmb: Cleanup - put talloc parameter first in resolve_hosts().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting name_resolve_bcast() parameters inside internal_re...
Jeremy Allison [Tue, 21 Jul 2020 00:44:03 +0000 (17:44 -0700)] 
s3: libsmb: Cleanup - reformatting name_resolve_bcast() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_wins() parameters inside internal_resolve_...
Jeremy Allison [Tue, 21 Jul 2020 00:43:26 +0000 (17:43 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_wins() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_lmhosts_file_as_sockaddr() parameters...
Jeremy Allison [Tue, 21 Jul 2020 00:42:44 +0000 (17:42 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_lmhosts_file_as_sockaddr() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting 2nd use of resolve_ads() parameters inside interna...
Jeremy Allison [Tue, 21 Jul 2020 00:40:06 +0000 (17:40 -0700)] 
s3: libsmb: Cleanup - reformatting 2nd use of resolve_ads() parameters inside internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_ads() parameters inside internal_resolve_n...
Jeremy Allison [Tue, 21 Jul 2020 00:39:33 +0000 (17:39 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_ads() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - reformatting resolve_hosts() parameters inside internal_resolve...
Jeremy Allison [Tue, 21 Jul 2020 00:38:20 +0000 (17:38 -0700)] 
s3: libsmb: Cleanup - reformatting resolve_hosts() parameters inside internal_resolve_name().

No logic changes.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - Remove incorrect comment in resolve_ads(). The DNS code copes...
Jeremy Allison [Tue, 21 Jul 2020 00:35:22 +0000 (17:35 -0700)] 
s3: libsmb: Cleanup - Remove incorrect comment in resolve_ads(). The DNS code copes fine with IPv6 addresses.

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - modernize DEBUG -> DBG_ in internal_resolve_name()
Jeremy Allison [Tue, 21 Jul 2020 00:32:47 +0000 (17:32 -0700)] 
s3: libsmb: Cleanup - modernize DEBUG -> DBG_ in internal_resolve_name()

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - split allocation and NULL check in internal_resolve_name().
Jeremy Allison [Tue, 21 Jul 2020 00:28:41 +0000 (17:28 -0700)] 
s3: libsmb: Cleanup - split allocation and NULL check in internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for internal_resolve_name().
Jeremy Allison [Tue, 21 Jul 2020 00:27:13 +0000 (17:27 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for internal_resolve_name().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for name_resolve_bcast().
Jeremy Allison [Tue, 21 Jul 2020 00:05:27 +0000 (17:05 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for name_resolve_bcast().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_wins().
Jeremy Allison [Tue, 21 Jul 2020 00:04:57 +0000 (17:04 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_lmhosts_file_as_sockaddr().
Jeremy Allison [Tue, 21 Jul 2020 00:03:21 +0000 (17:03 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_lmhosts_file_as_sockaddr().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts().
Jeremy Allison [Tue, 21 Jul 2020 00:02:15 +0000 (17:02 -0700)] 
s3: libsmb: Cleanup - use helper 'ok' bool for resolve_hosts().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for name_re...
Jeremy Allison [Tue, 21 Jul 2020 00:01:04 +0000 (17:01 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for name_resolve_bcast().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Tue, 21 Jul 2020 00:00:35 +0000 (17:00 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for 0x1D...
Jeremy Allison [Mon, 20 Jul 2020 23:59:38 +0000 (16:59 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for 0x1D name in resolve_wins().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:58:46 +0000 (16:58 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_lmhosts_file_as_sockaddr().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:57:43 +0000 (16:57 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_ads().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC...
Jeremy Allison [Mon, 20 Jul 2020 23:56:14 +0000 (16:56 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for KDC resolve_ads().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve...
Jeremy Allison [Mon, 20 Jul 2020 23:54:45 +0000 (16:54 -0700)] 
s3: libsmb: Cleanup - change to early continue in internal_resolve_name() for resolve_hosts().

No logic change.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: libsmb: Cleanup - ensure we don't try and continue resolving names on failure...
Jeremy Allison [Tue, 21 Jul 2020 03:57:44 +0000 (20:57 -0700)] 
s3: libsmb: Cleanup - ensure we don't try and continue resolving names on failure of convert_ss2service().

Logic change, but correct error cleanup - jump to new 'fail:' label.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
5 years agos3: scripts: Selfttest. samba3.blackbox.smbclient_iconv.*
Jeremy Allison [Mon, 3 Aug 2020 22:06:03 +0000 (15:06 -0700)] 
s3: scripts: Selfttest. samba3.blackbox.smbclient_iconv.*

Fix missing 'include' in temporary client smb.conf file.

The current temporary generated smb.conf file for the client, "client_cp850_smbconf"
doesn't include the normal client smb.conf file "client.conf".

This means it's missing the:

interfaces = XXXX,YYYY

line we needed to find the server via socketwrapper. Currently this test is finding the server by accident :-).

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Tue Aug  4 06:30:25 UTC 2020 on sn-devel-184

5 years agolib: relicense smb_strtoul(l) under LGPLv3
Ralph Boehme [Fri, 3 Jul 2020 06:11:20 +0000 (08:11 +0200)] 
lib: relicense smb_strtoul(l) under LGPLv3

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Swen Schillig <swen@linux.ibm.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Mon Aug  3 22:21:04 UTC 2020 on sn-devel-184

5 years agoldap_server: fix hurd build
Samuel Thibault [Sun, 2 Aug 2020 18:06:08 +0000 (18:06 +0000)] 
ldap_server: fix hurd build

There is no hardcoded IOV_MAX iov limitation on GNU/Hurd. We however do
not want unbound allocation, so define it to a reasonable amount.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Mon Aug  3 09:39:02 UTC 2020 on sn-devel-184

5 years agoREADME.Coding: target Python 3.6+
Douglas Bagnall [Wed, 29 Jul 2020 03:35:12 +0000 (15:35 +1200)] 
README.Coding: target Python 3.6+

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Mon Aug  3 04:13:37 UTC 2020 on sn-devel-184

5 years agopython tests: drop python 2.6 compatibility functions
Douglas Bagnall [Sat, 4 Jul 2020 02:28:40 +0000 (14:28 +1200)] 
python tests: drop python 2.6 compatibility functions

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agondr: avoid excessive reallocing in pull_string_array
Douglas Bagnall [Thu, 30 Jul 2020 00:06:10 +0000 (12:06 +1200)] 
ndr: avoid excessive reallocing in pull_string_array

Before, talloc_realloc() was being called n times for an array of
length n. This could be very expensive on long string arrays since it
is reasonable to assume each realloc moves O(n) bytes.

This addresses at least one OSS-Fuzz bug, making a timing out test case
100 times faster. Credit to OSS-Fuzz.

REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19706

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agondr: maintain proper talloc tree in pull_string_array
Douglas Bagnall [Wed, 29 Jul 2020 22:46:17 +0000 (10:46 +1200)] 
ndr: maintain proper talloc tree in pull_string_array

We don't want to leave other parts of the ndr struct hanging off this
string array just because LIBNDR_FLAG_REMAINING is used.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agooss-fuzz: use uninstrumented dynamic python
Douglas Bagnall [Fri, 31 Jul 2020 03:36:16 +0000 (15:36 +1200)] 
oss-fuzz: use uninstrumented dynamic python

We can't link to the instrumented statically built Python, so instead
we use the system Python in the docker image.

REF: https://github.com/google/oss-fuzz/issues/4223
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22618
BUG: https://bugzilla.samba.org/show_bug.cgi?id=14451

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
5 years agosmbd: remove get_current_vuid()
Ralph Boehme [Wed, 29 Jul 2020 12:17:52 +0000 (14:17 +0200)] 
smbd: remove get_current_vuid()

The last user was removed by 3d09993725412bb0e856cc2ebf6ac68f8e762730.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Ralph Böhme <slow@samba.org>
Autobuild-Date(master): Wed Jul 29 13:44:47 UTC 2020 on sn-devel-184

5 years agoldb_controls: control_to_string avoids crash
Douglas Bagnall [Fri, 24 Jul 2020 00:41:29 +0000 (12:41 +1200)] 
ldb_controls: control_to_string avoids crash

Otherwise a malformed control with unexpected NULL data will segfault
ldb_control_to_string(), though this is not very likely to affect
anyone in practice as converting controls to strings is rarely
necessary. If it happens at all in Samba it is in Python code.

Found by Honggfuzz using fuzz_ldb_parse_control.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Wed Jul 29 04:43:23 UTC 2020 on sn-devel-184

5 years agodbcheck: Allow a dangling forward link outside our known NCs
Andrew Bartlett [Sun, 26 Jul 2020 23:37:29 +0000 (11:37 +1200)] 
dbcheck: Allow a dangling forward link outside our known NCs

If we do not have the NC of the target object we can not be really sure
that the object is redundent and so we want to keep it for now
and not (as happened until now) break the dbcheck run made during the
replication stage of a "samba-tool domain backup rename".

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14450

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
5 years agokdc:db-glue: ignore KRB5_PROG_ETYPE_NOSUPP also for Primary:Kerberos
Stefan Metzmacher [Thu, 23 Apr 2020 09:56:54 +0000 (11:56 +0200)] 
kdc:db-glue: ignore KRB5_PROG_ETYPE_NOSUPP also for Primary:Kerberos

Currently we only ignore KRB5_PROG_ETYPE_NOSUPP for
Primary:Kerberos-Newer-Keys, but not for Primary:Kerberos.

If a service account has msDS-SupportedEncryptionTypes: 31
and DES keys stored in Primary:Kerberos, we'll pass the
DES key to smb_krb5_keyblock_init_contents(), but may get
KRB5_PROG_ETYPE_NOSUPP.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14354

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Isaac Boukris <iboukris@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Jul 28 14:04:26 UTC 2020 on sn-devel-184

5 years agoAdd a test with old msDS-SupportedEncryptionTypes
Isaac Boukris [Mon, 27 Apr 2020 12:00:38 +0000 (14:00 +0200)] 
Add a test with old msDS-SupportedEncryptionTypes

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14354

Signed-off-by: Isaac Boukris <iboukris@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
5 years agonsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h
Khem Raj [Thu, 23 Jul 2020 05:42:09 +0000 (22:42 -0700)] 
nsswitch/nsstest.c: Avoid nss function conflicts with glibc nss.h

glibc 2.32 will define these varibles [1] which results in conflicts
with these static function names, therefore prefix these function names
with samba_ to avoid it

[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=499a92df8b9fc64a054cf3b7f728f8967fc1da7d

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Noel Power <npower@samba.org>
Autobuild-User(master): Noel Power <npower@samba.org>
Autobuild-Date(master): Tue Jul 28 10:52:00 UTC 2020 on sn-devel-184

5 years agoctdb-scripts: Use nfsconf as a last resort get nfsd thread count
Martin Schwenke [Mon, 20 Jul 2020 02:02:45 +0000 (12:02 +1000)] 
ctdb-scripts: Use nfsconf as a last resort get nfsd thread count

If nfsconf exists then use it as last resort to attempt to extract
[nfsd]:threads from /etc/nfs.conf.

Invocation of nfsconf requires "|| true" because this script uses "set
-e".  Add a stub that always fails to at least test this much.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14444
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Mon Jul 27 07:06:58 UTC 2020 on sn-devel-184

5 years agoctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME
Martin Schwenke [Mon, 13 Jul 2020 00:16:33 +0000 (10:16 +1000)] 
ctdb-scripts: Use nfsconf as a last resort to set NFS_HOSTNAME

If nfsconf exists then use it as last resort to attempt to extract
[statd]:name from /etc/nfs.conf.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14444
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoWHATSNEW: Fix description of CTDB NAT gateway and LVS changes
Martin Schwenke [Sat, 25 Jul 2020 20:50:22 +0000 (06:50 +1000)] 
WHATSNEW: Fix description of CTDB NAT gateway and LVS changes

Oops!  Using parentheses makes it harder to get this wrong.

Reported-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Sun Jul 26 13:01:09 UTC 2020 on sn-devel-184

5 years agoWHATSNEW: Document CTDB NAT gateway and LVS changes
Martin Schwenke [Fri, 17 Jul 2020 10:38:12 +0000 (20:38 +1000)] 
WHATSNEW: Document CTDB NAT gateway and LVS changes

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Fri Jul 24 09:58:53 UTC 2020 on sn-devel-184

5 years agoctdb: Change LVS to use leader/follower
Martin Schwenke [Fri, 17 Jul 2020 10:46:07 +0000 (20:46 +1000)] 
ctdb: Change LVS to use leader/follower

Instead of master/slave.

Nearly all of these are simple textual substitutions, which preserve
the case of the original.    A couple of minor cleanups were made in the
documentation (such as "LVSMASTER" -> "LVS leader").

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb: Change NAT gateway to use leader/follower
Martin Schwenke [Wed, 24 Jun 2020 01:20:24 +0000 (11:20 +1000)] 
ctdb: Change NAT gateway to use leader/follower

Instead of master/slave.

Nearly all of these are simple textual substitutions, which preserve
the case of the original.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Simplify calculation of new flags
Martin Schwenke [Tue, 14 Jul 2020 04:29:09 +0000 (14:29 +1000)] 
ctdb-recoverd: Simplify calculation of new flags

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Fri Jul 24 06:03:23 UTC 2020 on sn-devel-184

5 years agoctdb-recoverd: Correctly find nodemap entry for pnn
Martin Schwenke [Tue, 14 Jul 2020 04:22:15 +0000 (14:22 +1000)] 
ctdb-recoverd: Correctly find nodemap entry for pnn

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Do not retrieve nodemap from recovery master
Martin Schwenke [Tue, 5 May 2020 13:49:05 +0000 (23:49 +1000)] 
ctdb-recoverd: Do not retrieve nodemap from recovery master

It is already in rec->nodemap.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Flatten update_flags_on_all_nodes()
Martin Schwenke [Fri, 28 Sep 2018 00:46:17 +0000 (10:46 +1000)] 
ctdb-recoverd: Flatten update_flags_on_all_nodes()

The logic currently in ctdb_ctrl_modflags() will be optimised so that
it no longer matches the pattern for a control function.  So, remove
this function and squash its functionality into the only caller.

Although there are some superficial changes, the behaviour is
unchanged.

Flattening the 2 functions produces some seriously weird logic for
setting the new flags, to the point where using ctdb_ctrl_modflags()
for this purpose now looks very strange.  The weirdness will be
cleaned up in a subsequent commit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Move ctdb_ctrl_modflags() to ctdb_recoverd.c
Martin Schwenke [Tue, 5 May 2020 13:37:57 +0000 (23:37 +1000)] 
ctdb-recoverd: Move ctdb_ctrl_modflags() to ctdb_recoverd.c

This file is the only user of this function.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Improve a call to update_flags_on_all_nodes()
Martin Schwenke [Tue, 14 Jul 2020 04:43:04 +0000 (14:43 +1000)] 
ctdb-recoverd: Improve a call to update_flags_on_all_nodes()

This should take a PNN, not an array index.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Use update_flags_on_all_nodes()
Martin Schwenke [Fri, 14 Jun 2019 21:20:19 +0000 (07:20 +1000)] 
ctdb-recoverd: Use update_flags_on_all_nodes()

This is clearer than using the MODFLAGS control directly.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Introduce some local variables to improve readability
Martin Schwenke [Fri, 14 Jun 2019 21:19:26 +0000 (07:19 +1000)] 
ctdb-recoverd: Introduce some local variables to improve readability

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Change update_flags_on_all_nodes() to take rec argument
Martin Schwenke [Tue, 5 May 2020 13:45:15 +0000 (23:45 +1000)] 
ctdb-recoverd: Change update_flags_on_all_nodes() to take rec argument

This makes fields such as recmaster and nodemap easily available if
required.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-recoverd: Drop unused nodemap argument from update_flags_on_all_nodes()
Martin Schwenke [Thu, 18 Jan 2018 09:25:07 +0000 (20:25 +1100)] 
ctdb-recoverd: Drop unused nodemap argument from update_flags_on_all_nodes()

An unused argument needlessly extends the length of function calls.  A
subsequent change will allow rec->nodemap to be used if necessary.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability/quality
Martin Schwenke [Thu, 5 Mar 2020 18:10:05 +0000 (05:10 +1100)] 
ctdb-tests: Improve test portability/quality

Avoid use of non-portable md5sum by constructing database names using
index.  Improve indentation, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 22 09:14:35 UTC 2020 on sn-devel-184

5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 10:53:33 +0000 (21:53 +1100)] 
ctdb-tests: Improve test quality

Simplify code, use more modern commands, code improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 10:48:59 +0000 (21:48 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces, so
strip them.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 09:42:01 +0000 (20:42 +1100)] 
ctdb-tests: Improve test quality

Select test node with IPs instead of using a fixed node.  Remove
unnecessary code, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Improve test portability
Martin Schwenke [Thu, 5 Mar 2020 09:21:26 +0000 (20:21 +1100)] 
ctdb-tests: Improve test portability

"wc -l" on some platforms (e.g. FreeBSD) contains leading spaces and
stops "$num from being a number.  Create a more portable solution and
put it in a function instead of repeating the logic.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Drop uses of "onnode any ..." in testcases
Martin Schwenke [Tue, 10 Dec 2019 00:33:02 +0000 (11:33 +1100)] 
ctdb-tests: Drop uses of "onnode any ..." in testcases

It would be nice to get rid of "onnode any".  There's no use making
tests nondeterministic.  If covering different cases matters then they
should be explicitly handled.

In most places "any" is replaced by "$test_node".  In some cases,
where $test_node is not set, a fixed node that is already used
elsewhere can be reused.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Don't bother shutting down daemons in ctdb_init()
Martin Schwenke [Tue, 10 Dec 2019 03:47:23 +0000 (14:47 +1100)] 
ctdb-tests: Don't bother shutting down daemons in ctdb_init()

They'll never be up here...

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Separate custom cluster startup from test initialisation
Martin Schwenke [Tue, 10 Dec 2019 03:44:45 +0000 (14:44 +1100)] 
ctdb-tests: Separate custom cluster startup from test initialisation

Separate cluster startup from test initialisation for tests that start
the cluster with customised configuration.  In these cases the result
of the cluster startup is actually the point of the test.
Additionally, pubips.013.failover_noop.sh claims to have completed
test initialisation twice, which just seems wrong.

The result is:

* ctdb_test_init() takes one option (-n) to indicate when it should
  not configure/start the cluster

* New function ctdb_nodes_start_custom() accepts options for special
  cluster configuration, only operates on local daemons and triggers a
  test failure rather than a test error on failure.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()
Martin Schwenke [Mon, 6 Jul 2020 01:56:16 +0000 (11:56 +1000)] 
ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()

The only caller calls ctdb_test_error() on failure and nesting this
calls can be confusing.  A future change will make this even more
confusing.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Make unit.sh pass shellcheck
Martin Schwenke [Thu, 30 Apr 2020 04:35:12 +0000 (14:35 +1000)] 
ctdb-tests: Make unit.sh pass shellcheck

Mostly avoidance of quoting warnings.

Silencing warnings about unquoted $CTDB_TEST_CAT_RESULTS_OPTS is
handled by passing '-' to cat when that variable's value is empty.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Make integration.bash pass shellcheck
Martin Schwenke [Thu, 5 Mar 2020 18:58:26 +0000 (05:58 +1100)] 
ctdb-tests: Make integration.bash pass shellcheck

Apart from the non-constant sourcing of include files.

Mostly avoidance of quoting warnings.

One subtle change is to simply pass "120" to wait_until_ready() to
stop warnings that it expects arguments but none are passed (both
SC2119 and SC2120).  There seems no way to indicate to structure
function argument handling so that shellcheck realises arguments are
optional.  In later shellcheck versions, disabling SC2120 for a
function also silences complaints about its callers... but not all of
our testing uses "later" shellcheck versions.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Use "#!/usr/bin/env bash" for improved portability
Martin Schwenke [Wed, 4 Mar 2020 02:55:07 +0000 (13:55 +1100)] 
ctdb-tests: Use "#!/usr/bin/env bash" for improved portability

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Update preamble for INTEGRATION tests
Martin Schwenke [Tue, 10 Dec 2019 03:50:42 +0000 (14:50 +1100)] 
ctdb-tests: Update preamble for INTEGRATION tests

* Use "#!/usr/bin/env bash" for improved portability

* Drop test_info() definition and replace it with a comment

  The use of test_info() is pointless.

* Drop call to cluster_is_healthy()

  This is a holdover from when the previous test would restart daemons
  to get things ready for a test.  There was also a bug where going
  into recovery during the restart would sometimes cause the cluster
  to become unhealthy.  If we really need something like this then we
  can add it to ctdb_test_init().

* Make order of preamble consistent

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Drop unreachable line
Martin Schwenke [Thu, 30 Apr 2020 04:14:43 +0000 (14:14 +1000)] 
ctdb-tests: Drop unreachable line

ctdb_test_skip() will exit.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Redirect stderr too when checking for shellcheck
Martin Schwenke [Wed, 11 Mar 2020 05:33:27 +0000 (16:33 +1100)] 
ctdb-tests: Redirect stderr too when checking for shellcheck

Avoid:

  .../UNIT/shellcheck/scripts/local.sh: line 14: type: shellcheck: not found

The "type" command in dash prints the "not found" message to stdout
but the bash version prints to stderr, so redirect stderr too.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Show hung script debugging output
Martin Schwenke [Tue, 21 Apr 2020 01:34:12 +0000 (11:34 +1000)] 
ctdb-tests: Show hung script debugging output

The output in a test failure appears to contain no pstree output
because "00\.test\.script,.*" does not match.  However, this is just a
guess because the output is not shown.

Showing the output makes it easier to understand test failures.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG
Martin Schwenke [Wed, 13 May 2020 04:04:36 +0000 (14:04 +1000)] 
ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG

This will allow local daemons to be used in more contexts, especially
in tests run by Jenkins where the directory names for some targets can
be very long.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-build: Don't build/install tests in top-level build by default
Martin Schwenke [Thu, 16 Feb 2017 08:23:44 +0000 (19:23 +1100)] 
ctdb-build: Don't build/install tests in top-level build by default

The standalone build still includes tests, as does the top-level build
when --enable-selftest is used.  The latter is consistent with the use
of --enable-selftest in the rest of the tree.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Stop cat command failure from causing test failure
Martin Schwenke [Mon, 6 Jul 2020 04:02:49 +0000 (14:02 +1000)] 
ctdb-tests: Stop cat command failure from causing test failure

In certain circumstance, which aren't obvious, cat(1) can fail when
attempting to write a lot of data.  This is due to something (probably
write(2)) returning EAGAIN.

Given that the -v option should only really be used for test
debugging, ignore the failure instead of spending time debugging it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14446
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-build: Don't build/install tests in top-level build by default"
Martin Schwenke [Wed, 22 Jul 2020 04:43:43 +0000 (14:43 +1000)] 
Revert "ctdb-build: Don't build/install tests in top-level build by default"

Fix missing Reviewed-by: tag.

This reverts commit 91c36c16c8516359380a00ee3d2229422b048d9f.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Autobuild-User(master): Martin Schwenke <martins@samba.org>
Autobuild-Date(master): Wed Jul 22 06:29:43 UTC 2020 on sn-devel-184

5 years agoRevert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"
Martin Schwenke [Wed, 22 Jul 2020 04:43:40 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Enable SOCKET_WRAPPER_DIR_ALLOW_ORIG"

Fix missing Reviewed-by: tag.

This reverts commit 9694ba6fe4d073c653f49080127ee9efa21a8e9e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Show hung script debugging output"
Martin Schwenke [Wed, 22 Jul 2020 04:43:36 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Show hung script debugging output"

Fix missing Reviewed-by: tag.

This reverts commit c78de201f84f9fae9916af9592d42cbc71f805c5.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Redirect stderr too when checking for shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:31 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Redirect stderr too when checking for shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 847aa0e367c721944650aa34d67f8073461ae272.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Drop unreachable line"
Martin Schwenke [Wed, 22 Jul 2020 04:43:28 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Drop unreachable line"

Fix missing Reviewed-by: tag.

This reverts commit a55dd6f17b6d65db77bcd4f5a011e9aef64729e5.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Update preamble for INTEGRATION tests"
Martin Schwenke [Wed, 22 Jul 2020 04:43:24 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Update preamble for INTEGRATION tests"

Fix missing Reviewed-by: tag.

This reverts commit 65f56505e29c01d5891e5bc1050b6c37b8cbdee7.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"
Martin Schwenke [Wed, 22 Jul 2020 04:43:21 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Use "#!/usr/bin/env bash" for improved portability"

Fix missing Reviewed-by: tag.

This reverts commit 9a7cabd342d0aed450ed3305931702a7351f814a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Make integration.bash pass shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:18 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Make integration.bash pass shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 0f04b8a70be3b8e157a4a88e9e54e87fa380022e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Make unit.sh pass shellcheck"
Martin Schwenke [Wed, 22 Jul 2020 04:43:11 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Make unit.sh pass shellcheck"

Fix missing Reviewed-by: tag.

This reverts commit 30293baae5f22628405d327fc0b6bae993e96cd8.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"
Martin Schwenke [Wed, 22 Jul 2020 04:43:07 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Do not trigger ctdb_test_error() from ctdb_init()"

Fix missing Reviewed-by: tag.

This reverts commit 44e05ac8515be3220a334ae8001db83b06bec59f.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Separate custom cluster startup from test initialisation"
Martin Schwenke [Wed, 22 Jul 2020 04:43:04 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Separate custom cluster startup from test initialisation"

Fix missing Reviewed-by: tag.

This reverts commit e9df17b500146e62539feac66d0cd4b3ef7aa47a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"
Martin Schwenke [Wed, 22 Jul 2020 04:43:01 +0000 (14:43 +1000)] 
Revert "ctdb-tests: Don't bother shutting down daemons in ctdb_init()"

Fix missing Reviewed-by: tag.

This reverts commit 58f9f699f181ac217cda8de512b8385da173f884.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Drop uses of "onnode any ..." in testcases"
Martin Schwenke [Wed, 22 Jul 2020 04:42:57 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Drop uses of "onnode any ..." in testcases"

Fix missing Reviewed-by: tag.

This reverts commit aa5b214eaa88414c87410fd068fe7624e9790185.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability"
Martin Schwenke [Wed, 22 Jul 2020 04:42:53 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability"

Fix missing Reviewed-by: tag.

This reverts commit 1079d6e3ae5805ef65a3628edf0a3ac2cd7fac1c.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:49 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test quality"

Fix missing Reviewed-by: tag.

This reverts commit ea1cbff624383fb9d5b83b863fa6bd00a8fb77fa.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability"
Martin Schwenke [Wed, 22 Jul 2020 04:42:43 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability"

Fix missing Reviewed-by: tag.

This reverts commit 1f6556916e7f3a731d7d760fa6fd857e7f571541.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:36 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test quality"

Fix missing Reviewed-by: tag.

This reverts commit a308f2534d3991866efa2c662921ec63b4238888.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Improve test portability/quality"
Martin Schwenke [Wed, 22 Jul 2020 04:42:11 +0000 (14:42 +1000)] 
Revert "ctdb-tests: Improve test portability/quality"

Fix missing Reviewed-by: tag.

This reverts commit d2f8cd835da39784f2d99231f9a1067ae56ede7a.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoRevert "ctdb-tests: Stop cat command failure from causing test failure"
Martin Schwenke [Wed, 22 Jul 2020 04:41:01 +0000 (14:41 +1000)] 
Revert "ctdb-tests: Stop cat command failure from causing test failure"

Fix missing Reviewed-by: tag.

This reverts commit 5707781ccf682d95a5a05a7c3e00a43003dbe62e.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
5 years agoctdb-tests: Stop cat command failure from causing test failure
Martin Schwenke [Mon, 6 Jul 2020 04:02:49 +0000 (14:02 +1000)] 
ctdb-tests: Stop cat command failure from causing test failure

In certain circumstance, which aren't obvious, cat(1) can fail when
attempting to write a lot of data.  This is due to something (probably
write(2)) returning EAGAIN.

Given that the -v option should only really be used for test
debugging, ignore the failure instead of spending time debugging it.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14446
Signed-off-by: Martin Schwenke <martin@meltin.net>
Autobuild-User(master): Amitay Isaacs <amitay@samba.org>
Autobuild-Date(master): Wed Jul 22 04:10:47 UTC 2020 on sn-devel-184

5 years agoctdb-tests: Improve test portability/quality
Martin Schwenke [Thu, 5 Mar 2020 18:10:05 +0000 (05:10 +1100)] 
ctdb-tests: Improve test portability/quality

Avoid use of non-portable md5sum by constructing database names using
index.  Improve indentation, use more modern commands, code
improvements (shellcheck).

Signed-off-by: Martin Schwenke <martin@meltin.net>
5 years agoctdb-tests: Improve test quality
Martin Schwenke [Thu, 5 Mar 2020 10:53:33 +0000 (21:53 +1100)] 
ctdb-tests: Improve test quality

Simplify code, use more modern commands, code improvements (shellcheck).

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