summaryrefslogtreecommitdiff
path: root/selftest/target
Commit message (Collapse)AuthorAgeFilesLines
* s3: tests: Add regression test for smbd crash on share force group change ↵Jeremy Allison2019-02-211-0/+6
| | | | | | | | | | | | with existing connection. Mark as known fail for now. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13690 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> (cherry picked from commit 7b21b4c1f538650f23ec77fb3c02fe1e224d89aa)
* selftest:Samba4: use 'smbcontrol samba shutdown'Stefan Metzmacher2019-02-051-0/+9
| | | | | | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13752 Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Björn Baumbach <bbaumbach@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Wed Jan 30 01:51:48 CET 2019 on sn-devel-144 (cherry picked from commit d03991f569b54ae0a11911b622107fbae701715d)
* s3:selftest: add a VSS test reading a streamRalph Boehme2018-12-131-1/+1
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13455 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit cfffa2e2428b42db65a4ece00602e0cef8ceb5a3)
* s3:script/tests: add a test for VSS write behaviourRalph Boehme2018-12-131-0/+9
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13688 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (backported from commit 12778f015988f7e8755016c72c26939998758dae)
* selftest: Add share to test "delete readonly" optionChristof Schmitt2018-11-071-0/+4
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13673 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit a8e79decbcfbae1b1a53ec81b942ee06db26bf8f)
* s4:torture/smb2/read: add test for cancelling SMB aioRalph Boehme2018-11-061-0/+6
| | | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13667 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit e37ff8c5fe18d400e378bf2591e209b30473d9f9)
* s4:torture: add test for AppleDouble ResourceFork conversionRalph Boehme2018-11-021-0/+18
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13642 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 6f022e61597994bc032e61876f24150d7acb3fc2)
* selftest: add a durable handle test with delayed disconnectRalph Boehme2018-09-051-0/+8
| | | | | | | | Bug: https://bugzilla.samba.org/show_bug.cgi?id=13549 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 5508024a861e7c85e6c837552ad142aa1d5e8eca)
* selftest: Load time_audit and full_audit modules for all testsChristof Schmitt2018-08-231-6/+6
| | | | | | | | | | | | | | | | | | Previously the only test was to load these modules to trigger the smb_vfs_assert_all_fns check. As these modules just pass through the calls, they can be loaded for all tests to ensure that the codepaths are exercised. This would have found the problem in smb_time_audit_offload_read_recv. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13568 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Mon Aug 13 22:35:20 CEST 2018 on sn-devel-144 (cherry picked from commit a98f09a09db2fc7be85f9171b586e65344a39e92)
* s3/script/tests: Add simple (smb1 & smb2) get/set/list tests for smbcquotasNoel Power2018-08-131-0/+9
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13553 Signed-off-by: Noel Power <noel.power@suse.com> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: Add dfq_cache share with 'dfree cache time' setChristof Schmitt2018-06-071-0/+6
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13446 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 7ffcbd5ce1222971cb9879f78765d87cdc4102a8)
* selftest: Add a user with a different userPrincipalNameAndreas Schneider2018-05-241-1/+18
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 5319cae00096dcecc29aa9fa675a983352ad64d8)
* selftest: Make sure we have correct group mappingsAndreas Schneider2018-05-241-0/+9
| | | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13369 Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> (cherry picked from commit 9bc2b922bbc6539341a2056f33f117ac350e61f1)
* s3: tests: Regression test to ensure we can never return a DIRECTORY ↵Jeremy Allison2018-05-071-0/+4
| | | | | | | | | | | | | | | | | | attribute on a stream. Tests streams_xattr and also streams_depot. Inspired from a real-world test case by Andrew Walker <awalker@ixsystems.com>. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13380 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Thu Apr 12 02:04:28 CEST 2018 on sn-devel-144 (cherry picked from commit 82beaf868f252c4bc975ddafd80240af6f679b83)
* selftest: vfs.fruit: add xattr_tdb where possibleRalph Boehme2018-04-061-6/+6
| | | | | | | | | | This makes the tests indepent from fs xattr support. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 49996ca9324596b6cd72eb8051ca3676dab17191)
* selftest: run vfs.fruit_netatalk test against seperate shareRalph Boehme2018-04-061-0/+10
| | | | | | | | | | | These tests require a fs with xattr support. This allows adding xattr_tdb to all other shares in the next commit. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13319 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> (cherry picked from commit 013aaffe7ff0ed4c30495761bb3208c29b3b5de2)
* selftest: fix envvars for creation of default user in wait_for_startJamie McClymont2018-02-121-0/+4
| | | | | | | | | | | | | | | | Resolves failure of ad_member to start up under ad_dc (if the user is determined to be needed). Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andreas Schneider <asn@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=13225 Autobuild-User(master): Garming Sam <garming@samba.org> Autobuild-Date(master): Tue Jan 16 07:12:01 CET 2018 on sn-devel-144 (cherry picked from commit 7a3f97f2662c6197913aeb50e5e3c0c09ff8307f)
* gpo: Add the winbind call to gpupdateDavid Mulder2018-01-131-1/+1
| | | | | | Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Use the ad_dc with smbfs for ad_member envAndreas Schneider2018-01-101-3/+3
| | | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* selftest: split a large system invocation lineRalph Boehme2018-01-101-1/+3
| | | | | | | | | | Small cleanup for better code readability, no change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Jan 10 05:19:26 CET 2018 on sn-devel-144
* selftest: split a large system invocation lineRalph Boehme2018-01-101-1/+5
| | | | | | | Small cleanup for better code readability, no change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: split a large system invocation lineRalph Boehme2018-01-101-1/+4
| | | | | | | Small cleanup for better code readability, no change in behaviour. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: set wrapper env variables when running net groupmapRalph Boehme2018-01-101-6/+19
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: remove second loop waiting for winbindd from wait_for_start()Ralph Boehme2018-01-101-11/+5
| | | | | | | A few lines above we already checked that winbindd is running. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: fix creation of builtin users in wait_for_startRalph Boehme2018-01-101-4/+23
| | | | | | | | | | | | | | | | | | | If "BUILTIN\Users" already exists, attempting to create it would fail, so we should check for the existence prior to the creation. It is unclear *why* the mapping sometimes already exist and sometime not. There are two places where they would have been created: 1. libnet_join_add_dom_rids_to_builtins tries to add the mapping when joining a domain, but at that point winbindd isn't running 2. when a user is authenticated in smbd, which clearly can't have happended when in the function wait_for_start Go figure... Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
* selftest: explicitly configure some dcs with 'server schannel = auto'Stefan Metzmacher2018-01-102-0/+3
| | | | | | | This is required for some tests. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* s4:selftest: replace --option=usespnego= with --option=clientusespnego=Stefan Metzmacher2018-01-101-0/+2
| | | | | | | | | | | I guess that's what we try to test here, as 'use spnego' was only evaluated on in the smb server part. The basically tests the 'raw NTLMv2 auth' option, we set it to yes on some environments, but keep a knownfail for the ad_member. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org>
* selftest: use net rpc join when joining NT4-style domainsRalph Boehme2018-01-081-1/+1
| | | | | | | | | | | | Otherwise net join when failing at the CLDAP ping stage will put a negative entry for the DC in the conncache which can trigger *hard* to debug problems later in winbindd. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Mon Jan 8 15:22:10 CET 2018 on sn-devel-144
* s4/torture: test vfs_fruit "fruit:time machine max size" optionRalph Boehme2018-01-061-0/+8
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: replace global with explicit environment variablesJamie McClymont2017-12-201-14/+27
| | | | | | | | | | | | | | | | | This patch removes setting of NSS_WRAPPER and RESOLV_WRAPPER variables globally in Samba3.pm (because setting them persistently/globally can create hidden ordering dependencies). Instead, they are set on subprocesses as required, which appears to be the following two places (aside from those places where they are already set explicitly): * calls to createuser in provision * calls to wbinfo --ping-dc in wait_for_start Signed-off-by: Jamie McClymont <jamiemcclymont@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Wed Dec 20 08:50:26 CET 2017 on sn-devel-144
* selftest fl2000dc provision with --plaintext-secretsGary Lockyer2017-12-181-1/+7
| | | | | | | | Provision fl2000dc provision with --plaintext-secrets to test that the --plaintext-secrets option functions correctly. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Add share for error injection testingChristof Schmitt2017-12-151-0/+4
| | | | | | | BUG: https://bugzilla.samba.org/show_bug.cgi?id=13189 Signed-off-by: Christof Schmitt <cs@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: add "fruit:veto_appledouble = no" to fruit sharesRalph Boehme2017-11-291-0/+3
| | | | | | | | | | | | | This is needed for a subsequent commit that modifies an existing test to write a ._ file over SMB instead of using the ugly local creation hack. SMB acces of ._ files requires "fruit:veto_appledouble = no", so let's set it. Bug: https://bugzilla.samba.org/show_bug.cgi?id=13155 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* build: Move nss_wrapper to third_partyAndreas Schneider2017-11-251-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Alexander Bokovoy <ab@samba.org>
* gpo: Add gpo testsDavid Mulder2017-11-201-0/+1
| | | | | | | | Lays down a sysvol gpttmpl.inf with password policies, then runs the samba_gpoupdate command. Verifies policies are applied to the samdb. Signed-off-by: David Mulder <dmulder@suse.com> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: run raw.acls test with XDR NFS41 ACLsRalph Boehme2017-11-081-0/+8
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: run raw.acls tests against a share with XDR NFS4 ACLsRalph Boehme2017-11-081-0/+8
| | | | | Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: test vfs_nfs4acl_xattr with NFS 4.1 ACLsRalph Boehme2017-11-081-0/+6
| | | | | | | | Only tests with "nfs4:mode = simple" as mode special is supposed to be broken anyway and simple is recommended. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: add explicit default NFS4 acl versionRalph Boehme2017-11-081-2/+4
| | | | | | | | This is the current default, just make it explicit. A subsequent commit will bump the default to 4.1. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: set ad_dc process model to preforkGary Lockyer2017-10-191-1/+3
| | | | | | | | | Set the process model for ad_dc to prefork, so that the pre-fork gets exercised during self test. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* selftest: Use a unique hostname/IP for the no_nss testenvTim Beale2017-09-262-6/+33
| | | | | | | | | | | | | | The ad_dc_no_nss was re-using the ad_dc testenv but changing an environment variable to disable the NSS wrapper module. Presumably this would setup a second AD DC server with the same hostname/IP as another DC (but with NSS disabled). This doesn't seem like a good thing to be doing in the selftests. This patch changes it so that the no_nss testenv uses a unique IP/hostname. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* selftest: Add new AD DC testenv with NTLM disabledTim Beale2017-09-262-6/+40
| | | | | | | | | | | | | This is so that we test the source4 case as well. Currently the only testenv with NTLM disabled is ktest, and that only exercises the source3 code. I've tried to support the new test environment with minimal changes to the Samba4.pm setup code. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
* getncchanges.py: Add a multi-valued linked attribute testTim Beale2017-09-181-1/+2
| | | | | | | | | | | | | | Add a test where a source object links to multiple different targets. First we do the replication without GET_TGT and check that the server can handle sending a chunk containing only links (in the middle of the replication). Then we repeat the replication forcing GET_TGT to be used. To avoid having to create 1500 objects/links, I've lowered the 'max link sync' setting on the vampire_dc testenv to 250. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>
* s4/smbd: set the process group.Gary Lockyer2017-09-181-1/+1
| | | | | | | | | | | | | Set the process group in the samba daemon, the --no-process-group option allows this to be disabled. The no-process-group option needs to be disabled in self test. Signed-off-by: Gary Lockyer <gary@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Mon Sep 18 04:39:50 CEST 2017 on sn-devel-144
* getncchanges.c: Send linked attributes in each chunkTim Beale2017-09-151-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of sending all the linked attributes at the end, add a configurable option to send the links in each replication chunk. The benefits of this approach are: - it can reduce memory overhead, as we don't have to keep all the links in memory over the entire replication cycle. - the client should never end up knowing about objects but not their links. (Although we're not sure that this has actually resulted in replication problems, i.e. missing links). Note that until we support GET_TGT, this approach can mean we now send a link where the client doesn't know about the target object, causing the client to siliently drop that linked attribute. Hence, this option is switched off by default. Implementation-wise, this code works fairly the same as before. Instead of sorting the entire getnc_state->la_sorted array at the end and then splitting it up over chunks, we now split the links up over chunks and then sort them when we copy them into the message. This should be OK, as I believe the MS-DRSR Doc says the links in the message should be sorted (rather than sorting *all* the links overall). Windows behaviour seems to chunk the links based on USN and then sort them. getnc_state->la_idx now tracks which links in getnc_state->la_list[] have already been sent (instead of tracking getnc_state->la_sorted). This means the la_sorted array no longer needs to be stored in getnc_state and we can free the array's memory once we've copied the links into the message. Unfortunately, the link_given/link_total debug no longer reports the correct information, so I've moved these into getncchanges_state struct (and now free the struct a bit later so it's safe to reference in the debug). The vampire_dc testenv has been updated to use this new behaviour. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org> Autobuild-Date(master): Fri Sep 15 10:07:33 CEST 2017 on sn-devel-144
* s4:bind_dlz: Use the 'binddns dir' if possibleAndreas Schneider2017-09-052-0/+8
| | | | | | | | | | | The code makes sure we are backwards compatible. It will first check if we still have files in the private directory, if yes it will use those. If the the file is not in the private directory it will try the binddns dir. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlet <abartlet@samba.org>
* selftest: enable kernel change notifications in the fileserver environmentRalph Boehme2017-08-261-0/+2
| | | | | | | | | | | | | | This environment is currently not used for any test in the smb2 testsuite, so this change doesn't affect any existing test. A subsequent commit will add a test for change notifications with kernel change notify enabled. It verifies a bug (this one) that only crops up in such a setup and causes rename events to get lost. Bug: https://bugzilla.samba.org/show_bug.cgi?id=12903 Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* selftest: add ad_member_idmap_ad serverRalph Boehme2017-07-123-0/+96
| | | | | | | Add a member server that uses idmap_ad. Gets used in the next commit. Signed-off-by: Ralph Boehme <slow@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
* selftest: Disable NTLM authentication in ktest environmentTim Beale2017-07-041-0/+4
| | | | | | | | | This allows us to prove that "ntlm auth = disabled" works Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Garming Sam <garming@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> BUG: https://bugzilla.samba.org/show_bug.cgi?id=11923
* selftest: Use new ntlmv2-only and mschapv2-and-ntlmv2-only optionsAndrew Bartlett2017-07-041-0/+4
| | | | | | | This will allow the py_credentials test to tell if these are in use Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Garming Sam <garming@catalyst.net.nz>