summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/lock.c
AgeCommit message (Collapse)AuthorFilesLines
2009-12-07s4/torture: add test for zero byte read contention with byte range locksSteven Danneman1-0/+120
2009-12-07s4/torture: fix >80 column spacing issuesSteven Danneman1-6/+6
2009-12-02s4/torture: add addition multiple lock testsSteven Danneman1-29/+212
* test that 2 locks in a single LockAndX are transactional * test that 1 unlock and 1 lock in a single LockAndX are not transactional * test that SMB2 doesn't like mixed lock/unlock in a single PDU
2009-11-27s4-torture: fixed error code for s4 in SMB2-LOCK testAndrew Tridgell1-1/+8
s4 returns NETWORK_NAME_DELETED if you attempt to use an invalid tree connection for a lock. This test (correctly I think) happens before we validate the file handle. That implies that when you pass both a closed handle and a invalid tree you should get NT_STATUS_NETWORK_NAME_DELETED.
2009-11-27s4-torture: fixed expected error codes for s4 in SMB2-LOCKAndrew Tridgell1-3/+22
I think the error/success codes returned by windows for these tests are quite bogus. The ones s4 gives are much more reasonable. The locking ones returning NT_STATUS_SUCCESS could lead to data loss, as an application thinks it has a file locked correctly when it fact it doesn't, so it could do an unsafe modify.
2009-11-27torture: fixed SMB2-LOCK valgrind errorAndrew Tridgell1-1/+2
2009-11-25s4/torture: port SMBv1 RAW-LOCK tests to SMBv2Steven Danneman1-20/+2012
RAW-LOCK ported as: RAW-LOCK-LOCK, RAW-LOCK-LOCKX -> SMB2-LOCK-LOCK RAW-PIDHIGH -> removed, no longer relevant RAW-ASYNC -> SMB2-LOCK-ASYNC, SMB2-LOCK-CANCEL, SMB2-LOCK-CANCEL-TDIS, SMB2-LOCK-CANCEL-LOGOFF RAW-ERRORCODE -> SMB2-LOCK-ERRORCODE RAW-CHANGETYPE -> removed, no longer relevant RAW-ZEROBYTELOCKS -> SMB2-LOCK->ZEROBYTELENGTH RAW-UNLOCK -> SMB2-LOCK-UNLOCK RAW-MULTIPLE_UNLOCK -> SMB2-LOCK-MULTIPLE-UNLOCK RAW-STACKING -> SMB2-LOCK-STACKING BASE-LOCK ported as: BASE-LOCK-LOCK1 -> SMB2-LOCK-ERRORCODE, timeout is no longer relevant BASE-LOCK-LOCK2 -> SMB2-LOCK-CONTEND, SMB2-LOCK-LOCK, SMB2-LOCK-CONTEXT BASE-LOCK-LOCK3 -> SMB2-LOCK-RANGE BASE-LOCK-LOCK4 -> SMB2-LOCK-OVERLAP BASE-LOCK-LOCK5 -> SMB2-LOCK-STACKING BASE-LOCK-LOCK6 -> SMB2-LOCK-CANCEL, change_locktype no longer relevant BASE-LOCK-LOCK7 -> SMB2-LOCK-RW-SHARED, SMB2-LOCK-RW-EXCLUSIVE
2009-11-25s4/libcli: rename previously reserved field in SMB2 LOCK structSteven Danneman1-13/+13
The lock.in.reserved field has been renamed lock_sequence in the SMB 2.1 dialect. See MS-SMB 2.2.26.
2009-11-18SMB2-LOCK: make use of torture_assert_*()Stefan Metzmacher1-12/+6
This is needed in order to mark tests as known failures. metze
2009-11-17torture/smb2: make SMB2 BRL tests pass against W2K8R2Steven Danneman1-100/+101
The BRL tests previously based their results off several bugs in the W2K8 byte range lock code. I've fixed up the tests to pass against Win7 which has fixed these bugs, and assume that the Win7 behavior is the default. I have inverted the test behavior for >63-bit lock requests. The tests previously expected NT_STATUS_OK as their default in this case. I've changed that default to expect STATUS_INVALID_LOCK_RANGE. This may requires some changing of make test to compensate. I've also removed a few test scenarios from VALID-REQUEST in preparation of replacing them with separate tests ported from RAW-LOCK.
2009-10-20s4-torture: ran minimal_includes.pl over source4/tortureAndrew Tridgell1-1/+0
This reduces compile time somewhat.
2009-05-20SMB2-LOCK: let the test pass against samba4Stefan Metzmacher1-1/+7
metze
2009-04-01s/NT_STATUS_WIN7_INVALID_RANGE/NT_STATUS_INVALID_LOCK_RANGE/gZach Loafman1-5/+5
2009-03-17s4 torture: Add a string version for NT_STATUS_WIN7_INVALID_RANGEZach Loafman1-10/+29
Also submitted a request to cifs-protocol for a real name for this thing. Use win7 target logic in smb2 lock test, SMB2-LOCK now passes against Win7.
2008-06-04another SMB2-LOCK fix now that we know that the UNLOCK flag is onlyAndrew Tridgell1-5/+1
honoured on the first lock in a set (This used to be commit c014ffabc65c30a6b83c8f9f9f9a80bb79333f59)
2008-06-04fixed SMB2-LOCK test for new semantics (from docs)Andrew Tridgell1-5/+1
(This used to be commit d4d4d62939e325f8529b11fcd2d490e8f63293b0)
2008-05-30don't emulate broken SMB2 locking behaviour from windowsAndrew Tridgell1-4/+66
(This used to be commit c50e7a15f9a7f2c5821b5ee468f9ade6eaa0ed55)
2008-05-28add exceptions for some of the strange windows SMB2 locking behaviourAndrew Tridgell1-2/+10
(This used to be commit 429bbecebe50ce3d8d494eece35b2387556d5893)
2008-05-27re-enable some testsAndrew Tridgell1-3/+3
(This used to be commit c15b24a2f4346b6f07e1d5fd4f2bef7cd09cf350)
2008-05-27enforce lock ordering in SMB2Andrew Tridgell1-4/+70
(This used to be commit 3bec932a89006521ba74bde7943b8cd5b4a660d8)
2008-05-27added some SMB2 locking tests from gentestAndrew Tridgell1-0/+30
(This used to be commit 2932fcb04646bb921fb1daa365dd4c86cadfe4c0)
2008-05-22fixes to the SMB2 lock test after recent SMB2 locking changesAndrew Tridgell1-8/+12
(This used to be commit de7626e1c29f04e54afb6d95f4051bc52b17dd80)
2008-05-21fixed SMB2 lockingAndrew Tridgell1-71/+77
- SMB2 locking is different in several ways from SMB locking. To fix it properly we will need a new generic mapping structure for locking, but for now do a best effort mapping - added locking to gentest_smb2 (This used to be commit ea6d9cf602302adafe0f9d5f5f90a9b26d1ead6f)
2008-02-13updated SMB2 create operation to match WSPP.Andrew Tridgell1-4/+4
Adding some defined for various new create options (This used to be commit d037dc23ced3df6bce98cbf4810fb5f1247336bd)
2007-10-10r25554: Convert last instances of BOOL, True and False to the standard types.Jelmer Vernooij1-9/+9
(This used to be commit 566aa14139510788548a874e9213d91317f83ca9)
2007-10-10r23792: convert Samba4 to GPLv3Andrew Tridgell1-3/+2
There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa)
2007-10-10r22858: - let SMB2-LOCK-VALID-REQUEST pass against longhorn beta3Stefan Metzmacher1-25/+92
- add modify the SMB2-LOCK-BLOCK-WRITE test to also test reading and name in SMB2-LOCK-RW-EXCLUSIV - add SMB2-LOCK-NONE and SMB2-LOCK-SHARED metze (This used to be commit 258555975d3877cff3bc3022f3439cdd61f6c8ac)
2007-10-10r22824: - add a simple test which shows how a lock rejectsStefan Metzmacher1-11/+107
a write on a different file handle. SMB2-LOCK-BLOCK-WRITE - make it possible to run each SMB2-LOCK-* test on its own metze (This used to be commit 9c02f690bc07ebf99cb272e255a24d7061d8e730)
2007-10-10r16951: add the year to the copyright...Stefan Metzmacher1-1/+1
metze (This used to be commit 97157d5c4a829108f1da89b23b91a6cf87879b3a)
2007-10-10r16738: vista beta2 use FILE_CLOSED as error for an invalid file handleStefan Metzmacher1-1/+1
metze (This used to be commit fa35ddcaf9bbeaa4780aa3497cdff56b02af0ab9)
2007-10-10r15816: add SMB2-LOCK torture test, which demonstrates what possible valid ↵Stefan Metzmacher1-0/+215
and invalid requests you can do with it metze (This used to be commit adef1372c118b6c116dfa976d0277be677118fd0)