summaryrefslogtreecommitdiffstats
path: root/source4/torture/smb2/lease.c
Commit message (Collapse)AuthorAgeFilesLines
* s4:torture:smb2: add new lease.upgrade3 test to test the contended upgradeMichael Adam2013-11-111-0/+143
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Test what upgrades work when there is another lease already held, in addition to the lease to be upgraded. The summary of the behaviour is this: ------------------------------------- If we have two leases (lease1 and lease2) on the same file, then attempt to upgrade lease1 results in a change if and only if the requested lease state: - is valid, - is strictly a superset of lease1, and - can held together with lease2. In that case, the resuling lease state of the upgraded lease1 is the state requested in the upgrade. lease2 is not broken and remains unchanged. Note that this contrasts the case of directly opening with an initial requested lease state, in which case you get that portion of the requested state that can be shared with the already existing leases (or the states that they get broken to). Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Mon Nov 11 18:04:47 CET 2013 on sn-devel-104
* s4:torture:smb2: add comment explaining lease upgrade in the non-contended caseMichael Adam2013-11-111-0/+11
| | | | | | | | | | | | | | | The summary of the behaviour is this: ------------------------------------- An uncontended lease upgrade results in a change if and only if the requested lease state is - valid, and - strictly a superset of the lease state already held. In that case the resulting lease state is the one requested in the upgrade. Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: David Disseldorp <ddiss@samba.org>
* torture: Only test leases if supportedVolker Lendecke2013-04-271-0/+37
| | | | | | | | Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.com> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Sat Apr 27 18:09:37 CEST 2013 on sn-devel-104
* s4:torture/smb2: add v2 lease requestsStefan Metzmacher2013-04-181-1/+209
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:smb2: move the smb2_create_*() utility functions from lease.c to ↵Michael Adam2011-11-091-54/+0
| | | | util.c for re-use
* s4:torture:smb2: lease: oplock_level is uint8_t, not uint32_t or intMichael Adam2011-11-091-4/+4
|
* s4:torture:smb2: move oplock() from lease.c to smb2_util_oplock_level() in ↵Michael Adam2011-11-091-35/+15
| | | | util.c for re-use
* s4:torture:smb2: use common smb2_util_lease_state() in the lease testsMichael Adam2011-11-091-55/+34
|
* s4:torture:smb2: fix illegal write/uninitialized data bug in the ↵Michael Adam2011-11-091-0/+1
| | | | lease.multibreak test
* s4:torture:smb2: lease.update2: some more reasonable struct names and a commentMichael Adam2011-11-091-3/+7
|
* s4:torture:smb2: add a new durable-open.upgrade2 test to test all upgrade ↵Michael Adam2011-11-011-0/+90
| | | | | | | combinations Autobuild-User: Michael Adam <obnox@samba.org> Autobuild-Date: Tue Nov 1 04:58:03 CET 2011 on sn-devel-104
* s4:torture: test also break semantics between batch-oplocks and leasesMichael Adam2011-10-301-1/+1
| | | | | | This must have been a typo (listing EXCLUSIVE twice). But BATCH and EXCLUSIVE oplocks apparently share the same break semantics with respect to leases.
* s4-smbtorture: Make test names lowercase and dot-separated.Jelmer Vernooij2010-12-111-6/+6
| | | | | | | | This is consistent with the test names used by selftest, should make the names less confusing and easier to integrate with other tools. Autobuild-User: Jelmer Vernooij <jelmer@samba.org> Autobuild-Date: Sat Dec 11 04:16:13 CET 2010 on sn-devel-104
* s3/s4: merge msleep and smb_msleepBjörn Jacke2010-09-161-1/+1
| | | | | the merged variant is renamed to smb_msleep as some platforms already have a msleep function.
* s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell2009-10-201-2/+0
| | | | This reduces compile time somewhat.
* s4:torture/smb2: Add torture tests for lease breaks, durable opens.Zach Loafman2009-04-011-76/+628
|
* s4:torture/smb2: Add torture tests for leases.Zach Loafman2009-03-281-0/+296