From: Tim Prouty Date: Wed, 25 Nov 2009 22:40:54 +0000 (-0800) Subject: s4 torture: Change RAW-SFILEINFO-END-OF-FILE to check for share modes by default X-Git-Tag: samba-4.0.0alpha10~150 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=66bf780e6edac110b85d2a0d08d01274fe7417bd;p=thirdparty%2Fsamba.git s4 torture: Change RAW-SFILEINFO-END-OF-FILE to check for share modes by default Since the windows behavior appears to be a bug, only check for the windows-style share mode bug if target= is specified --- diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c index 0aa1f38c832..95fb9d7e060 100644 --- a/source4/torture/raw/setfileinfo.c +++ b/source4/torture/raw/setfileinfo.c @@ -772,17 +772,15 @@ torture_raw_sfileinfo_eof(struct torture_context *tctx, struct smbcli_state *cli * Looks like a windows bug: * http://lists.samba.org/archive/cifs-protocol/2009-November/001130.html */ - if (torture_setting_bool(tctx, "samba3", false) || - torture_setting_bool(tctx, "samba4", false) || - torture_setting_bool(tctx, "onefs", false)) { + if (TARGET_IS_W2K8(tctx) || TARGET_IS_WIN7(tctx)) { + /* It succeeds! This is just weird! */ + torture_assert_ntstatus_equal_goto(tctx, status, NT_STATUS_OK, ret, + done, "Status should be OK"); + } else { torture_assert_ntstatus_equal_goto(tctx, status, NT_STATUS_SHARING_VIOLATION, ret, done, "Status should be " "SHARING_VIOLATION"); goto done; - } else { - /* It succeeds! This is just weird! */ - torture_assert_ntstatus_equal_goto(tctx, status, NT_STATUS_OK, ret, - done, "Status should be OK"); } /* Verify that the file was actually extended to 100. */