summaryrefslogtreecommitdiffstats
path: root/source4/torture/smb2
Commit message (Collapse)AuthorAgeFilesLines
...
* torture: extend FSCTL_[GET/SET]_COMPRESSION testsDavid Disseldorp2013-08-151-39/+234
| | | | | | | | Check for inheritance of compression attributes from parent directories. Also, test error handling for invalid requests. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: add smb2 FSCTL_[GET/SET]_COMPRESSION testDavid Disseldorp2013-08-091-0/+84
| | | | | | | | | | | | | | | | | | This test simply creates a file and checks the compression state before and after FSCTL_SET_COMPRESSION(COMPRESSION_FORMAT_DEFAULT). The test expects the compression state to be COMPRESSION_FORMAT_LZNT1 after set, conforming to Windows Server behaviour. If the server responds to the first FSCTL_GET_COMPRESSION request with NT_STATUS_NOT_SUPPORTED or NT_STATUS_INVALID_DEVICE_REQUEST, then the test is skipped. This allows it to run during selftest. 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): Fri Aug 9 22:03:39 CEST 2013 on sn-devel-104
* torture: split out ioctl test file creation helperDavid Disseldorp2013-08-091-56/+43
| | | | | Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* torture: Don't segfault in smb2.session on error.Andreas Schneider2013-07-021-1/+1
| | | | | Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
* s4:torture fix a build break on AIXChristian Ambach2013-05-091-1/+0
| | | | | | | | Signed-off-by: Christian Ambach <ambi@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Thu May 9 08:05:12 CEST 2013 on sn-devel-104
* Tests processing an oplock break within a compound SMB2 request.Richard Sharpe2013-05-071-0/+163
| | | | | | | | Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Tue May 7 19:45:36 CEST 2013 on sn-devel-104
* 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
* torture: Use ZERO_STRUCTPN instead of explicit derefVolker Lendecke2013-04-271-1/+1
| | | | Signed-off-by: Volker Lendecke <vl@samba.org>
* 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: add smb2_lease_v2_create_share() helperStefan Metzmacher2013-04-181-0/+28
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture/smb2: add NTCREATEX_SHARE_ACCESS_DELETE in ↵Stefan Metzmacher2013-04-181-1/+0
| | | | | | | smb2_generic_create_share() Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
* s4:torture:smb2 delete temp memory context in ↵Gregor Beck2013-04-181-2/+2
| | | | | | | | | | | test_durable_open_oplock_disconnect Signed-off-by: Gregor Beck <gbeck@sernet.de> Reviewed-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Apr 18 15:10:31 CEST 2013 on sn-devel-104
* s4:torture:smb2:durable_v2: remove an unused variableMichael Adam2013-04-181-1/+0
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Add a test that shows the difference between Windows and Samba with respect ↵Richard Sharpe2013-04-163-1/+540
| | | | | | | | | | to DeleteOnClose. Signed-off-by: Richard Sharpe <realrichardsharpe@gmail.com> Reviewed-by: Jeremy Allison <jra@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Tue Apr 16 00:46:54 CEST 2013 on sn-devel-104
* Add a test to show that zero-length EA's are never returned over SMB2.Jeremy Allison2013-04-021-0/+121
| | | | | | | | | | | | Zero length EA's only delete an EA, never store. Proves we should never return zero-length EA's even if they have been set on the POSIX side. ntvfs server doesn't implement the FULL_EA_INFORMATION setinfo call, so add to selftest/knownfail. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: David Disseldorp <ddiss@suse.de>
* torture: Make sure we don't overrun the buffer.Andreas Schneider2013-02-221-1/+1
| | | | Reviewed-by: Alexander Bokovoy <ab@samba.org>
* s4:torture: fix segfault in test_durable_open_open2_oplock()Stefan Metzmacher2013-02-181-2/+4
| | | | | Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
* s4:torture:smb2: fix segfault on error condition in the ↵Michael Adam2013-02-181-5/+7
| | | | | | | durable-open.delete_on_close2 test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix segfault on error condition in the ↵Michael Adam2013-02-181-5/+7
| | | | | | | durable-open.delete_on_close1 test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix segfault on error condition in the durable-open.reopen4 ↵Michael Adam2013-02-181-5/+7
| | | | | | | test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix segfault on error condition in the durable-open.reopen3 ↵Michael Adam2013-02-181-5/+7
| | | | | | | test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix segfault on error condition in the ↵Michael Adam2013-02-181-5/+7
| | | | | | | durable-open.reopen2a test Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2: fix segfault on error condition in durable-open.reopen2 testMichael Adam2013-02-181-5/+7
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture:smb2:durable: make test functions staticMichael Adam2013-02-181-40/+40
| | | | | Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* s4:torture: add a durable-open-disconnect test (suite)Michael Adam2013-02-182-0/+64
| | | | | | | this opens a durable, disconnects it and exits Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
* Fix the compound tests to correctly pass against Windows when run with ↵Jeremy Allison2013-01-311-6/+6
| | | | | | | | | | --signing=required. Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Richard Sharpe <realrichardsharpe@gmail.org> Autobuild-User(master): Richard Sharpe <sharpe@samba.org> Autobuild-Date(master): Thu Jan 31 03:53:55 CET 2013 on sn-devel-104
* torture: copychunk test suite improvementsDavid Disseldorp2013-01-161-8/+719
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow for large files in test_setup_copy_chunk(): Write test data in 1M IOs, rather than attempting to do the whole thing in one go. Add copychunk bad resume key test: Send a copy chunk request with an intentionally bogus resume key (source key handle). Add copychunk src=dest test: Test copychunk requests where the source and destination handles refer to the same file. Add copychunk src=dest overlap test. Add desired access args to test_setup_copy_chunk(). Add copychunk_bad_access test: Open the copychunk source and destination files with differing desired_access values. Confirm copychunk response matches 2k8 and 2k12 behaviour. Add copy_chunk_src_exceed test: Attempts to copy more data than is present in the copychunk source file. Add copy_chunk_src_exceed_multi test: Test whether the first chunk in a multi-chunk copychunk request is written to disk, where the second chunk is invalid due to src file overrun. Add copy_chunk_sparse_dest test: Issue a request where the target offset exceeds the file size, resulting in a sparse region. Add copy_chunk_max_output_sz test. Reviewed by: Jeremy Allison <jra@samba.org>
* torture: replace ioctl failure returns with helper callsDavid Disseldorp2013-01-161-33/+25
| | | | | | | Also change test_ioctl_get_shadow_copy() to use torture_skip(), and clean up test output. Reviewed by: Jeremy Allison <jra@samba.org>
* torture: add locking tests for copychunkDavid Disseldorp2013-01-161-0/+228
| | | | Reviewed by: Jeremy Allison <jra@samba.org>
* torture: skip FSCTL_SRV_ENUM_SNAPS test when not supportedDavid Disseldorp2013-01-161-0/+6
| | | | | | | | If FSCTL_SRV_ENUM_SNAPS fails with NT_STATUS_NOT_SUPPORTED then skip the test, this means we can run the full ioctl test suite as part of autobuild. Reviewed by: Jeremy Allison <jra@samba.org>
* smb2_ioctl: remove ioctl error response assumptionsDavid Disseldorp2013-01-161-0/+58
| | | | | | | | | | | | MS-SMB2 3.3.4.4 documents cases where a ntstatus indicating an error should not be considered a failure. In such a case the output data buffer should be sent to the client rather than an error response packet. Add a new fsctl copy_chunk test to confirm field limits are sent back in response to an oversize chunk request. Reviewed by: Jeremy Allison <jra@samba.org>
* torture: Fix copy and paste error.Andreas Schneider2012-11-301-1/+1
| | | | Found by Coverity.
* torture: Fix smb2.create.blob test.Andreas Schneider2012-11-091-1/+4
| | | | | | | Reviewed-by: David Disseldorp <ddiss@samba.org> Autobuild-User(master): David Disseldorp <ddiss@samba.org> Autobuild-Date(master): Fri Nov 9 14:53:27 CET 2012 on sn-devel-104
* s4:torture/smb2: remove samba specific stuff from smb2.oplockStefan Metzmacher2012-09-261-10/+0
| | | | metze
* s4:torture:smb2: add a durable-open.read-only testMichael Adam2012-09-231-0/+95
| | | | | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Sun Sep 23 05:47:30 CEST 2012 on sn-devel-104
* s4:torture:smb2:compound: remove two unused macrosMichael Adam2012-09-221-3/+0
|
* s4:torture:smb2: don't skip the compound.interim2 test for non win7/win2k8Michael Adam2012-09-221-4/+0
|
* s4:torture:smb2: don't skip the compound.interim1 test for non win7/win2k8Michael Adam2012-09-221-4/+0
|
* s4:torture:smb2: extend the compound.invalid1 testStefan Metzmacher2012-09-221-3/+8
| | | | | | | | Test that when turning the related flag back off for the last compound request, the return code changes from invalid parameter to file closed. Pair-Programmed-With: Michael Adam <obnox@samba.org>
* s4:torture:smb2: fix the compound.invalid3 test to work against windowsMichael Adam2012-09-221-2/+2
|
* s4:torture:smb2: fix compound.related3 test to work against windowsMichael Adam2012-09-221-2/+2
|
* s4:torture:smb2: add a new test durable-v2-open.app-instanceMichael Adam2012-09-191-0/+134
| | | | Pair-Programmed-With: Stefan Metzmacher <metze@samba.org>
* s4:torture/smb2: improve the smb2.create.blob testStefan Metzmacher2012-09-191-2/+91
| | | | metze
* s4:torture:smb2: fix error reporting in the oplock-brl3 testMichael Adam2012-09-111-2/+1
| | | | | | | (Error was set to an unused variable) Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Tue Sep 11 22:09:18 CEST 2012 on sn-devel-104
* s4:torture:smb2: fix error reporting in the oplock-brl2 testMichael Adam2012-09-111-2/+1
| | | | (Error was set to an unused variable)
* s4:torture:smb2: fix error reporting in the oplock-brl1 testMichael Adam2012-09-111-2/+1
| | | | (Error was set to an unused variable)
* s4:torture:smb2: remove an unused variable from the oplock-exclusive2 testMichael Adam2012-09-111-3/+0
|
* s4:torture:smb2: remove an unused variable from the oplock-exclusive1 testMichael Adam2012-09-111-3/+0
|
* s4:torture:smb2: add a durable-open.delete_on_close2 testMichael Adam2012-09-111-0/+110
| | | | | | This test verifies that the delete on close flag is kept during a disconnect and is still active on the reconnected handle. When the reconnected handle is closed, the file is deleted.
* s4:torture:smb2: fix the durable-open.delete_on_close1 testMichael Adam2012-09-111-53/+16
| | | | | | | | | | | This test used to flap because there was an invalid check of the file-id. This might or might not be the same after a new open. Hence the flapping. The new version simply opens a file as durable handle with delete_on_close set, writes a byte and closes the file. Then on a new connect, the file is opened again, and it is checked that the file has been created (again) and that it is empty.