s4 torture: Change RAW-OPLOCK to use the documented version of SET_END_OF_FILE_INFO
authorTim Prouty <tprouty@samba.org>
Wed, 25 Nov 2009 16:03:36 +0000 (08:03 -0800)
committerTim Prouty <tprouty@samba.org>
Wed, 25 Nov 2009 16:45:58 +0000 (08:45 -0800)
The passtrhough version of SET_END_OF_FILE_INFO is tested in
RAW-SFILEINFO-END-OF-FILE.

Additionally, the first opener is changed to use SHARE_WRITE for the
share mode since SET_END_OF_FILE_INFO actually writes data to the file
via truncating/extending.

source4/torture/raw/oplock.c

index 63f5ee5f28a13b82d433d2a763b99bc14cde57eb..0ebbb38ae46f984be7cb48f186eb230c4bb0f649 100644 (file)
@@ -444,7 +444,7 @@ static bool test_raw_oplock_exclusive3(struct torture_context *tctx, struct smbc
        io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
        io.ntcreatex.in.alloc_size = 0;
        io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
-       io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;
+       io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_WRITE;
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
        io.ntcreatex.in.create_options = 0;
        io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
@@ -463,7 +463,7 @@ static bool test_raw_oplock_exclusive3(struct torture_context *tctx, struct smbc
 
        torture_comment(tctx, "setpathinfo EOF should trigger a break to none\n");
        ZERO_STRUCT(sfi);
-       sfi.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
+       sfi.generic.level = RAW_SFILEINFO_END_OF_FILE_INFO;
        sfi.generic.in.file.path = fname;
        sfi.end_of_file_info.in.size = 100;
 
@@ -1501,7 +1501,7 @@ static bool test_raw_oplock_batch11(struct torture_context *tctx, struct smbcli_
        io.ntcreatex.in.access_mask = SEC_RIGHTS_FILE_ALL;
        io.ntcreatex.in.alloc_size = 0;
        io.ntcreatex.in.file_attr = FILE_ATTRIBUTE_NORMAL;
-       io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_NONE;
+       io.ntcreatex.in.share_access = NTCREATEX_SHARE_ACCESS_WRITE;
        io.ntcreatex.in.open_disposition = NTCREATEX_DISP_OPEN_IF;
        io.ntcreatex.in.create_options = 0;
        io.ntcreatex.in.impersonation = NTCREATEX_IMPERSONATION_ANONYMOUS;
@@ -1530,7 +1530,7 @@ static bool test_raw_oplock_batch11(struct torture_context *tctx, struct smbcli_
        CHECK_VAL(io.ntcreatex.out.oplock_level, BATCH_OPLOCK_RETURN);
 
        ZERO_STRUCT(sfi);
-       sfi.generic.level = RAW_SFILEINFO_END_OF_FILE_INFORMATION;
+       sfi.generic.level = RAW_SFILEINFO_END_OF_FILE_INFO;
        sfi.generic.in.file.path = fname;
        sfi.end_of_file_info.in.size = 100;