From e0bda35cf5f3b4d0da9a1c1a6b84a49390d4e3e2 Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Tue, 13 Aug 2013 18:07:28 +0200 Subject: torture: support Windows 2k8 response for compress_invalid_buf 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 Reviewed-by: Jeremy Allison --- source4/torture/smb2/ioctl.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source4/torture/smb2') diff --git a/source4/torture/smb2/ioctl.c b/source4/torture/smb2/ioctl.c index bc2b4cd33c4..75379af0e66 100644 --- a/source4/torture/smb2/ioctl.c +++ b/source4/torture/smb2/ioctl.c @@ -1830,10 +1830,12 @@ static bool test_ioctl_compress_invalid_buf(struct torture_context *torture, ioctl.smb2.in.flags = SMB2_IOCTL_FLAG_IS_FSCTL; status = smb2_ioctl(tree, tmp_ctx, &ioctl.smb2); - /* expect Server 2k12 response status */ - torture_assert_ntstatus_equal(torture, status, - NT_STATUS_INVALID_USER_BUFFER, - "invalid FSCTL_SET_COMPRESSION"); + if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_USER_BUFFER) + && !NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) { + /* neither Server 2k12 nor 2k8r2 response status */ + torture_assert(torture, true, + "invalid FSCTL_SET_COMPRESSION"); + } smb2_util_close(tree, fh); talloc_free(tmp_ctx); -- cgit v1.2.1