summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/ioctl.c
AgeCommit message (Collapse)AuthorFilesLines
2013-10-25torture: add FSCTL_SRV_COPYCHUNK_WRITE access testDavid Disseldorp1-2/+51
Check that FSCTL_SRV_COPYCHUNK_WRITE succeeds when the copy-chunk target is opened with SEC_RIGHTS_FILE_WRITE only. 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 Oct 25 22:48:59 CEST 2013 on sn-devel-104
2013-08-15torture: support Windows 2k8 response for compress_invalid_bufDavid Disseldorp1-4/+6
Windows Server 2012 returns NT_STATUS_INVALID_USER_BUFFER, Windows Server 2008r2 returns NT_STATUS_INVALID_PARAMETER. Don't fail the test if either status is returned. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15torture: add more [no-]compress-on-open ioctl testsDavid Disseldorp1-1/+144
compress_create_with_attr: Specifies the FILE_ATTRIBUTE_COMPRESSED attribute at create time, then checks the created file. compress_inherit_disable: Creates under a compressed directory, a file with the NTCREATEX_OPTIONS_NO_COMPRESSION option. Then checks that the newly created file doesn't inherit the parent compression state. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15torture: add file_attribs arg to file create helperDavid Disseldorp1-24/+23
Allows for the testing of file creation with FILE_ATTRIBUTE_COMPRESSED. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15torture: add compressed file attribute ioctl testDavid Disseldorp1-0/+53
After marking a file for compression via FSCTL_SET_COMPRESSION, the FILE_ATTRIBUTE_COMPRESSED flag should be present. Test for this. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15torture: check for filesystem compression capabilityDavid Disseldorp1-18/+59
Only run the compression tests if the compression capability is returned by the server in response to an SMB2_QUERY_INFO(FS attribute info) request. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-08-15torture: extend FSCTL_[GET/SET]_COMPRESSION testsDavid Disseldorp1-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>
2013-08-09torture: add smb2 FSCTL_[GET/SET]_COMPRESSION testDavid Disseldorp1-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
2013-08-09torture: split out ioctl test file creation helperDavid Disseldorp1-56/+43
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
2013-01-16torture: copychunk test suite improvementsDavid Disseldorp1-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>
2013-01-16torture: replace ioctl failure returns with helper callsDavid Disseldorp1-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>
2013-01-16torture: add locking tests for copychunkDavid Disseldorp1-0/+228
Reviewed by: Jeremy Allison <jra@samba.org>
2013-01-16torture: skip FSCTL_SRV_ENUM_SNAPS test when not supportedDavid Disseldorp1-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>
2013-01-16smb2_ioctl: remove ioctl error response assumptionsDavid Disseldorp1-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>
2012-11-30torture: Fix copy and paste error.Andreas Schneider1-1/+1
Found by Coverity.
2012-03-06s4:torture: avoid reporting error on failure of smb2.ioctl testsGregor Beck1-148/+79
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2012-03-01s4:torture/smb2/ioctl.c - quiet format specifier warnings on 32 bitMatthias Dieter Wallnöfer1-5/+6
Achieve this by using platform independent casts.
2011-10-31s4-torture: smb2 copychunk data integrity checksDavid Disseldorp1-0/+72
Perform simple integrity checks on destination file data following a successful copychunk request. Signed-off-by: Stefan Metzmacher <metze@samba.org> Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Mon Oct 31 19:28:20 CET 2011 on sn-devel-104
2011-10-31s4-torture: add smb2 copychunk ioctl testsDavid Disseldorp1-7/+285
test_ioctl_copy_chunk_multi: Issue a copychunk request with multiple chunk descriptors. test_ioctl_copy_chunk_over: Issue a copychunk request with overlapping chunks. test_ioctl_copy_chunk_append: append data as part of a copy chunk test_ioctl_copy_chunk_tiny: issue request with sub FS block size chunk descriptors. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-31s4-torture: split common copychunk ioctl test code into helpersDavid Disseldorp1-53/+112
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-31s4-torture: Add tests for the smb2 copychunk ioctlDavid Disseldorp1-1/+172
Add idls for parsing of copychunk ioctl args. Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-10-19s3: remove duplicate fsctl fn definitionsDavid Disseldorp1-2/+2
Signed-off-by: Stefan Metzmacher <metze@samba.org>
2011-09-29s4: add SMB2_FSCTL opcodesDavid Disseldorp1-3/+3
Also, skip samba4.smb2.ioctl for now. Snapshots are not supported by default. Autobuild-User: David Disseldorp <ddiss@samba.org> Autobuild-Date: Thu Sep 29 14:47:05 CEST 2011 on sn-devel-104
2011-09-29s4-torture: add smb2 ioctl test suiteDavid Disseldorp1-0/+87
Currently only covers FSCTL_GET_SHADOW_COPY_DATA. Signed-off-by: Stefan Metzmacher <metze@samba.org>