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

1008 Commits

Author SHA1 Message Date
Michael Adam
0607148154 selftest: rename env s3dc_schannel to nt4_dc_schannel
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:47 +01:00
Michael Adam
c157baa4b9 selftest: rename env s3dc to nt4_dc
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:47 +01:00
Michael Adam
10afe88e44 selftest: rename env s3member_rfc2307 to ad_member_rfc2307
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
25f9ebf270 selftest: rename env s3member to ad_member.
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
3de5abb954 selftest: rename env dc to ad_dc_ntvfs
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Michael Adam
902aa3c710 selftest: rename env plugin_s4_dc to ad_dc
This is the environment that represents our supported production
setup of an active directory domain controller.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 23:04:46 +01:00
Andreas Schneider
0de85d6eb4 selftest: Add missing variable to @exported_envvars
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-03-16 17:46:08 +01:00
Andrew Bartlett
98d2d8d6cd selftest: Fix comments in provision_promoted_dc
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>
2015-03-16 03:00:07 +01:00
Stefan Metzmacher
44113a45dc selftest: use server_maxtime = 9000 by default
With something like this:

samba.stdout:
[1730(16549)/1735 at 2h9m58s] samba4.blackbox.dbcheck(dc)
ERROR: Testsuite[samba4.blackbox.dbcheck(dc)]
REASON: unable to set up environment dc:local - exiting

samba.stderr:
samba: maximum runtime exceeded - terminating at 1426447450, current ts:
1426447450
samba child process 653 exited with value 0

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-16 03:00:06 +01:00
Günther Deschner
89a036f359 s4-torture: add clusapi torture test.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
2015-03-13 23:58:07 +01:00
Andrew Bartlett
4bebab2146 selftest: Change testsuite to use a samAccountName with a space in it
This shows that the previous patch is correct

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-03-12 17:13:42 +01:00
Andrew Bartlett
d3e0d7e2b0 selftest: Change testsuite to use a UPN with a space in it
This shows that the previous patch is correct

Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-03-12 17:13:42 +01:00
Stefan Metzmacher
979385cd0f selftest: fix the basedn for local accounts in non-DC environments e.g. s4member
open(LDIF, "|$ldbmodify -H $ctx->{privatedir}/sam.ldb");
doesn't generate an error if the command fails...

'testallowed' is a local account here, with a dn of
CN=testallowed,CN=Users,DC=S4MEMBER instead of domain user
CN=testallowed,CN=Users,DC=samba,DC=example,DC=com

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-03-12 17:13:42 +01:00
Michael Adam
a23fccf076 selftest: add a new environment plugin_s4_dc_no_nss
Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
2015-03-12 14:35:06 +01:00
Michael Adam
5ce6851425 selftest: extend setup_plugin_s4_dc to allow for not using nss_winbindd
Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
2015-03-12 14:35:06 +01:00
Michael Adam
79b927ac9e selftest: modify python.samba.test.posixacl to cope with nss_winbind active
It was observed that adding libnss_winbind (via nss_wrapper) lets
the posix acl mapping come out slightly differently with respect
to the owner/domain admin who is not explicitly nailed down in
the original NT acl.

This patch extends the test to react to the presence of
nss_winbind in environment and adapts the expected results.
This in particular fixes the run of the test against the
(changed) plugin_s4_dc environment while keeping the possibility
to successfully run it against an env without nss_winbind.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
2015-03-12 14:35:06 +01:00
Jelmer Vernooij
02da1b3798 Remove another call to addUnexpectedSuccess with too many arguments.
Change-Id: I5f1917e74ffd57b5ae228231c27fbdf70de2992f
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:49 +01:00
Jelmer Vernooij
5d4a938c06 TestCase.addUnexpectedSuccess doesn't take an error.
Change-Id: I90f7dd225d9ed3cbc515292de9a37a816ac0639f
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:49 +01:00
Jelmer Vernooij
0acb1d49a7 Use samba TestCase so we get all compatibility functions on Python < 2.7.
Change-Id: Iba87e3c8fa9331c4d5438ab60a8385379da634d7
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
cef4861906 Use Samba TestCase class, as the python 2.6 one doesn't have assertIs, assertIsInstance or addCleanup.
Change-Id: I3daeffade0dac9795f61f91ee0da35fee0143a38
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
b0cba7950a Drop support for failfast mode, rather than adding support for it everywhere.
Change-Id: I4d6070a0e3b89d5e390f84754dddba9ec17ddf21
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
495e980fcd Fix use of iso8601.Utc.
Change-Id: Id592571a173eff36e2fb9b395f61a6fb53d580e6
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
b2af53db74 Set failfast property for test reporters that need it.
Change-Id: Ibd632b9f569c23e60bcd13bcff805e367dd2e71c
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
850b3938e1 Support using third party iso8601 module if system doesn't provide one.
Change-Id: I5d035738d244d66d33788636c8ee8b322c227a0e
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:48 +01:00
Jelmer Vernooij
8c6d85b817 subunithelper: Fix progress support.
Change-Id: I5dd2ca0f3bc02821d5c9e1dc878bba577667d162
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
80e387adfa Use iso8601 from the system, rather than the one bundled with subunit.
Change-Id: I681bf79eb9ebe45b6972b3783c8e799eb612400b
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
6363a2d8e9 format-subunit: Remove import of unnecessary third party modules testtools and subunit.
Change-Id: I3403ceacf8bbdf075c1c540081f7c3e82f4751bc
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
77e702460e filter-subunit: Remove import of unnecessary third party modules testtools and subunit.
Change-Id: I6ed0c560c18b4001c7adb9af6f67535640a1b374
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
cc4f5372af Add basic tap2subunit converter, rather than relying on the one from subunit-tools.
Change-Id: I39ec5ec68c7c3c9d329d8f1a8ce01445b85c7ab8
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
ee0b548e9d Fix handling of unexpected failures in subunithelper.
Change-Id: I0da9fcec4a54c43c171b76bb9015ea84389c9bc6
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
3f88e978a3 Use samba.subunit in selftest.subunithelper, except for iso8601.
Change-Id: Iec43e0368db91dbe981b39ac8388b50c1eafee0c
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:47 +01:00
Jelmer Vernooij
ed65e04fa3 Use samba.subunit in selftest/selftest.py.
Change-Id: I804c16cdfcfddc5643a5af158ee62c4ddf478979
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:46 +01:00
Jelmer Vernooij
8487f4afc1 Use Samba-only subunit module in selftest/tests/.
Change-Id: I48c61f975c1fa49f6e244ad39dd720fe507db45b
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:46 +01:00
Jelmer Vernooij
de60dfd389 Use samba.subunit.run to run subunit tests.
Change-Id: Id9bdd33b7ac5e4db40ab8bef4dbe0f04c36d8da7
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:46 +01:00
Jelmer Vernooij
3f1ecfd2d0 selftest/tests/*.py: remove use of testtools.
Change-Id: Ia692c6b3037b7d867310c3793980f9f953d31680
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
2015-03-06 04:41:46 +01:00
Michael Adam
f5a0ccc228 selftest: re-enable nsswrapper integration testing for dc and member environments.
There are some failures:

- The dc environment fails consistently due to duplicate uid,
  (for the calling user and the domain administrator).
  ==> Marked as knownfail.

- The s3member environment only fails under very strange
  circumstances:
  - one needs to run the unix.whoami test in the
    member and s3member environment for the local.nss
    test to fail in the s3member:local env. The failure
    is then related to builtin administrators sharing
    a gid with a different group.
    --> This is really really strange!!!
    ==> Marked as knownfail.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Günther Deschner <gd@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Mon Mar  2 19:50:55 CET 2015 on sn-devel-104
2015-03-02 19:50:55 +01:00
David Disseldorp
debf8ff316 selftest: shuffle msdfs-share DFS referral responses
Add a secondary server path to the msdfs-src1 DFS link, and test "msdfs
shuffle referrals" behaviour during selftest using the existing
samba3.blackbox.smbclient_s3 suite.

Signed-off-by: David Disseldorp <ddiss@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>

Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Sat Feb 28 01:22:36 CET 2015 on sn-devel-104
2015-02-28 01:22:36 +01:00
Andreas Schneider
6e5debf33b torture: Add netr_setPassword(2) schannel test.
Thanks to Florian Weimer <fweimer@redhat.com> for the help to write
this torture test.

Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Andreas Schneider <asn@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>

Autobuild-User(master): Karolin Seeger <kseeger@samba.org>
Autobuild-Date(master): Mon Feb 23 20:01:01 CET 2015 on sn-devel-104
2015-02-23 20:01:01 +01:00
Jelmer Vernooij
21c04ae404 Remove documentation for testsuite-count subunit extension, which is no longer used.
Change-Id: Ie7f671fdac4f878e1eea157ee7e300977a68deb0
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-17 15:41:10 +01:00
Jelmer Vernooij
f1f49e807c Update selftest README to point at upstream subunit repository for protocol description.
Change-Id: I50c2a5e9847d269486cb5157357592004779704a
Signed-Off-By: Jelmer Vernooij <jelmer@samba.org>

Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-17 15:41:10 +01:00
Günther Deschner
14cbc791ee selftest: re-enable nss_winbind via nss_wrapper in the test-envs.
Without exporting these new variables, we can never access or test nss_winbind
from the selftest environments.

This shows that our posixacl test probably needs fixing since now
two subtests fail against plugin_s4_dc:local. This env was just
not complete without winbind in nsswitch. The test failure is
probably due to the strangeness of the AD/DC setup that the
domain administrator uses the same uid as the root user, which
in the selftest case is overridden to be the calling user.

Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Pair-Programmed-With: Michael Adam <obnox@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Günther Deschner <gd@samba.org>
Autobuild-Date(master): Fri Feb 13 20:57:12 CET 2015 on sn-devel-104
2015-02-13 20:57:11 +01:00
Günther Deschner
88f7361c21 s4-selftest: push up the "users" gid to make gid collision more unlikely.
Guenther

Signed-off-by: Günther Deschner <gd@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
2015-02-13 18:25:41 +01:00
Michael Adam
8c819f3c6b s4:selftest: avoid creating two groups with GID 0 in provision
Pair-Programmed-With: Guenther Deschner <gd@samba.org>
Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-13 18:25:41 +01:00
Michael Adam
26fc3eba76 s4:selftest: avoid creating two entries for UID 0 in provision
Pair-Programmed-With: Guenther Deschner <gd@samba.org>

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Guenther Deschner <gd@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>
2015-02-13 18:25:41 +01:00
Michael Adam
fd783b04bb selftest: run the samba.nss tests against :local environments
Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-13 18:25:41 +01:00
Michael Adam
6cab59e016 selftest/knownfail: add newline to end of file.
git always complains about what vim does to the file...

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Guenther Deschner <gd@samba.org>
2015-02-13 18:25:40 +01:00
Andrew Bartlett
32e2b75a96 selftest: Run krb5.kdc with an account that has a UPN and an SPN
Signed-off-by: Andrew Bartlett <abartlet@samba.org>
Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
2015-02-08 08:07:07 +01:00
Stefan Metzmacher
bba753b53c selftest: fix check for RODC and RID Set allocation
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Jelmer Vernooij <jelmer@samba.org>

Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Mon Feb  2 01:10:18 CET 2015 on sn-devel-104
2015-02-02 01:10:18 +01:00
Jelmer Vernooij
3b48274035 selftest: Fix typo namerserver -> nameserver.
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andreas Schneider <asn@samba.org>

Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org>
Autobuild-Date(master): Fri Jan 30 19:59:40 CET 2015 on sn-devel-104
2015-01-30 19:59:40 +01:00
Andrew Bartlett
fba69f4a89 selftest: Run krb5.kdc test against users with a UPN
This tests both a UPN in our own realm, and a UPN with a non-realm suffix.

Pair-programmed-with: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Garming Sam <garming@catalyst.net.nz>
Signed-off-by: Andrew Bartlett <abartlet@samba.org>

Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Jan 23 08:10:07 CET 2015 on sn-devel-104
2015-01-23 08:10:07 +01:00