summaryrefslogtreecommitdiff
path: root/source4/torture/smb2
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@samba.org>2016-09-30 21:35:09 +0200
committerRalph Boehme <slow@samba.org>2017-05-10 08:22:18 +0200
commit3361b5fca390c9ab130160dbbdd25a0be97bd818 (patch)
treec10adbaa2f284f81edd7723ff576fc96a0412b00 /source4/torture/smb2
parent3b4d6267d1108d44b79b8bf5d92ec01c917a3397 (diff)
downloadsamba-3361b5fca390c9ab130160dbbdd25a0be97bd818.tar.gz
torture/ioctl: expect dup_extents(dest=compressed) to pass
The MS-FSCC spec doesn't mention anything about dup-extents against compressed files. This can't be tested against Windows, as ReFS doesn't support compression, but COW clones of compressed files work on Btrfs. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Ralph Böhme <slow@samba.org>
Diffstat (limited to 'source4/torture/smb2')
-rw-r--r--source4/torture/smb2/ioctl.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c
index bd8310d4623..81f25a79329 100644
--- a/source4/torture/smb2/ioctl.c
+++ b/source4/torture/smb2/ioctl.c
@@ -5803,7 +5803,7 @@ static bool test_ioctl_dup_extents_compressed_src(struct torture_context *tctx,
}
static bool test_ioctl_dup_extents_compressed_dest(struct torture_context *tctx,
- struct smb2_tree *tree)
+ struct smb2_tree *tree)
{
struct smb2_handle src_h;
struct smb2_handle dest_h;
@@ -5863,8 +5863,13 @@ static bool test_ioctl_dup_extents_compressed_dest(struct torture_context *tctx,
"ndr_push_fsctl_dup_extents_to_file");
status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2);
- torture_assert_ntstatus_equal(tctx, status, NT_STATUS_NOT_SUPPORTED,
- "FSCTL_DUP_EXTENTS_TO_FILE");
+ torture_assert_ntstatus_ok(tctx, status,
+ "FSCTL_DUP_EXTENTS_TO_FILE");
+
+ ok = check_pattern(tctx, tree, tmp_ctx, dest_h, 0, 4096, 0);
+ if (!ok) {
+ torture_fail(tctx, "inconsistent file data");
+ }
smb2_util_close(tree, src_h);
smb2_util_close(tree, dest_h);