From b6f972222f271263f68cf5ead8bb0daca08158fa Mon Sep 17 00:00:00 2001 From: Tim Prouty Date: Wed, 25 Nov 2009 08:03:36 -0800 Subject: s4 torture: Change RAW-OPLOCK to use the documented version of SET_END_OF_FILE_INFO 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 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source4/torture/raw') diff --git a/source4/torture/raw/oplock.c b/source4/torture/raw/oplock.c index 63f5ee5f28..0ebbb38ae4 100644 --- a/source4/torture/raw/oplock.c +++ b/source4/torture/raw/oplock.c @@ -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; -- cgit