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

97 Commits

Author SHA1 Message Date
Stefan Metzmacher
579bb0a934 s4:torture:smb2:durable_open: remove unused lease variables in the open-oplock test
Signed-off-by: Michael Adam <obnox@samba.org>
2012-03-03 17:03:06 +01:00
Michael Adam
d92b955cca s4:torture:smb2:durable-open: fix a silly access-after-free panic
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Feb 28 08:33:44 CET 2012 on sn-devel-104
2012-02-28 08:33:44 +01:00
Michael Adam
ba4acf05b2 s4:torture:smb2: add durable_open.reopen2a - variant of reopen2 with session reconnect 2012-02-28 00:08:54 +01:00
Michael Adam
681bca6768 s4:torture:smb2: add previous_session argument to torture_smb2_session_setup()
To allow for doing a session reconnect
2012-02-28 00:08:53 +01:00
Michael Adam
8e947f0f5d s4:torture:smb2:durable-open: prevent using a disconnected handle in reopen4
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 27 03:44:16 CET 2012 on sn-devel-104
2012-02-27 03:44:16 +01:00
Michael Adam
6deec81b8e s4:torture:smb2:durable-open: introduce new variable for the new session
This is to clarify the code.
2012-02-27 02:08:28 +01:00
Michael Adam
d5cefee6fc s4:torture:smb2:durable-open: make a comment more precise in the reopen4 test 2012-02-27 02:08:27 +01:00
Michael Adam
b041d28fea s4:torture:smb2:durable_open: use the correct tree in the final close call 2012-02-27 02:08:27 +01:00
Michael Adam
77889f63e6 s4:torture:smb2: add a durable-open.open-oplock test
this is a variant of the open-lease test that does the initial
durable open with a batch oplock instead of a RH lease.

This is e.g. useful do analyse a (mis?) behaviour with current
windows 8 preview versions, compared to w2k8r2

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Tue Feb 21 19:51:21 CET 2012 on sn-devel-104
2012-02-21 19:51:21 +01:00
Michael Adam
1f1ff1cf0a s4:torture:smb2: extend and prettify comment for durable-open.open-lease test 2012-02-21 18:11:07 +01:00
Michael Adam
0d3d8256d8 s4:torture:smb2:durable-open: rename the open test to open-lease 2012-02-21 18:11:06 +01:00
Michael Adam
a36e257160 s4:torture:smb2: move some initialization and call to smb2_create together in durable-open.open test 2012-02-21 18:11:06 +01:00
Michael Adam
65da3b74fa s4:torture:smb2: fix a typo in the durable-open.open test file name 2012-02-21 18:11:06 +01:00
Michael Adam
9d66ad8c30 s4:torture:smb2: invalidate the handle after the connection has been killed
Not to run into using the old handle with a new tree connect in the error case.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Mon Feb 20 18:34:48 CET 2012 on sn-devel-104
2012-02-20 18:34:48 +01:00
Michael Adam
71164cef61 s4:torture: improve comment for the smb2.durable-open.reopen1 test 2012-02-20 17:02:24 +01:00
Michael Adam
877d4e048e s4:torture: add a smb2.durable_open.reopen4 test
open a durable handle, logoff, new sessions setup, try durable reopen (fail),
open tcon, durable reopen (succeed)

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Feb  3 12:45:34 CET 2012 on sn-devel-104
2012-02-03 12:45:34 +01:00
Michael Adam
adb9b7fbf0 s4:torture: add smb2.durable_open test reopen3
Do a durable open, tdis, tree_connect, durable reopen -> fail
2012-02-03 11:10:30 +01:00
Michael Adam
1d8fbff7ff s4:torture: add smb2.durable_open test reopen2
durable open, disconnect, new seession, durable reopen
2012-02-03 11:10:30 +01:00
Michael Adam
f9e85d09b3 s4:torture: add smb2.durable_open test reopen1 2012-02-03 11:10:30 +01:00
Michael Adam
4c52e8f68b s4:torture:smb2: rewrite durable-open.open test to use smb2_*_create functions
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Wed Nov  9 02:36:36 CET 2011 on sn-devel-104
2011-11-09 02:36:36 +01:00
Michael Adam
9d862c00e5 s4:torture:smb2: rewrite the durable-open.lock test to use smb2_lease_create() 2011-11-09 01:02:09 +01:00
Michael Adam
0652b21c68 s4:torture:smb2: rewrite the durable-open.lease test to use smb2_lease_create() 2011-11-09 01:02:09 +01:00
Michael Adam
cda10063ab s4:torture:smb2: rewrite the durable-open.oplock test to use smb2_oplock_create() 2011-11-09 01:02:08 +01:00
Michael Adam
5d3b6aa674 s4:torture:smb2: rewrite the durable-open.file-position test to use smb2_oplock_create() 2011-11-09 01:02:08 +01:00
Michael Adam
6e721fdd43 s4:torture:smb2: rewrite the durable-open.open2 test to use smb2_lease_create_share() 2011-11-09 01:02:08 +01:00
Michael Adam
afc94fea2a s4:torture:smb2: rewrite the durable-open.open1 test to use smb2_oplock_create_share() 2011-11-09 01:02:08 +01:00
Michael Adam
a5d8614e63 s4:torture:smb2: use smb2_util_oplock_level() in the durable-open test for convenience 2011-11-09 01:02:08 +01:00
Michael Adam
b47edad673 s4:torture:smb2: extract map_sharemode() to smb2_util_share_access() in util.c 2011-11-09 01:02:08 +01:00
Michael Adam
33ccdf88f9 s4:torture:smb2: extract map_lease() to util.c as smb2_util_lease_state(). 2011-11-09 01:02:08 +01:00
Michael Adam
8dab942d1c s4:torture:smb2: change the test file name in the durable-open.oplock test
to a more reasonable name. This one must have been copied
from the durable-open.lease test.
2011-11-09 01:02:07 +01:00
Michael Adam
53d1d7b939 s4:torture:smb2: expand durable-open.open2 test matrix by all share-modes 2011-11-01 03:20:37 +01:00
Michael Adam
18ca6c850f s4:torture:smb2: expand durable-open.open1 test matrix by all share-modes 2011-11-01 03:20:37 +01:00
Michael Adam
a4e36df78a s4:torture:smb2: rename the durable-open.basic2 test to durable-open.open2 for clarity 2011-11-01 03:20:37 +01:00
Michael Adam
a9b31e68cf s4:torture:smb2: rename the durable-open.basic1 test to durable-open.open1 for clarity 2011-11-01 03:20:37 +01:00
Michael Adam
a354758da5 s4:torture:smb2: add durable_open_basic2 test: test durable open against all lease types
Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Sun Oct 30 20:17:16 CET 2011 on sn-devel-104
2011-10-30 20:17:16 +01:00
Michael Adam
976f9806c9 s4:torture:smb2: add a new durable_open_basic1 test: test open against all oplock types 2011-10-30 18:41:23 +01:00
Michael Adam
f8aeca1018 s4:torture:smb2: check wheter open was durable in existing tests 2011-10-30 18:41:22 +01:00
Michael Adam
69ca2bd048 s4:torture:smb2: adapt comment in durable-open.lease test according to current information. 2011-10-30 18:41:20 +01:00
Michael Adam
5975e8a3f4 s4:torture:smb2: fix the durable_open test to succeed against w7 and w2k8r2
When a first client that has a durable open with share read/write/delete
and a read-write-handle lease on the file disconnects, a second
client will succeed in opening the file and the new client will be
given a RWH-lease if requested, not only a RH-lease, as was previously
checked in the test.

This might have been a bug in win7 build 7000, which is what the
comments in the test give as reference.
2011-10-30 13:08:14 +01:00
Michael Adam
ac79427aa0 s4:torture:smb2: avoid leaking tree connects up to the main function from the durable_open test
The tree connects are handed in from the calling wrapper.
Those that are freed and reconnected inside the test function
can not be freed in the wrapper and stick to the torture_context
until this is released in the main function.

Autobuild-User: Michael Adam <obnox@samba.org>
Autobuild-Date: Fri Oct 28 02:37:25 CEST 2011 on sn-devel-104
2011-10-28 02:37:25 +02:00
Jelmer Vernooij
35fbc7bbda s4-smbtorture: Make test names lowercase and dot-separated.
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
2010-12-11 04:16:13 +01:00
Steven Danneman
7f14388721 s4/libcli: rename previously reserved field in SMB2 LOCK struct
The lock.in.reserved field has been renamed lock_sequence in the
SMB 2.1 dialect.  See MS-SMB 2.2.26.
2009-11-25 12:55:48 -08:00
Andrew Tridgell
84d0047377 s4-torture: ran minimal_includes.pl over source4/torture
This reduces compile time somewhat.
2009-10-20 16:04:46 +11:00
Zach Loafman
91e75ea8f6 s4:torture/smb2: Add torture tests for lease breaks, durable opens. 2009-04-01 08:30:25 -07:00
Stefan Metzmacher
742496d252 s4:torture/smb2: fix compiler warnings and bugs
metze
2009-03-27 13:26:50 +01:00
Zach Loafman
a9bc6a3d45 Add durable open / oplock interaction test. Rather than give it a chance to disconnect, Win7 will break a batch oplock immediately on contention. 2009-03-26 16:42:25 -07:00
Zach Loafman
7278c549ea Reorganize old persistent_handles test into durable_open.c, turn it into a suite instead of a solo test (in anticipation of more tests). 2009-03-26 16:42:10 -07:00