mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
s4:torture:smb2: Fix code spelling
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
085cfe0c4a
commit
0d241305b4
@ -1734,10 +1734,10 @@ static bool test_sd_flags_vs_chown(struct torture_context *tctx,
|
||||
CHECK_SECURITY_DESCRIPTOR(q.query_secdesc.out.sd, sd2);
|
||||
|
||||
/*
|
||||
* Check that changing ownder doesn't affect SD flags.
|
||||
* Check that changing owner doesn't affect SD flags.
|
||||
*
|
||||
* Do this by first changing ownder to world and then
|
||||
* back to the original ownder. Afterwards compare SD,
|
||||
* Do this by first changing owner to world and then
|
||||
* back to the original owner. Afterwards compare SD,
|
||||
* should be the same.
|
||||
*/
|
||||
owner_sd->owner_sid = &world_sid;
|
||||
|
@ -2185,7 +2185,7 @@ static bool test_compound_async_flush_close(struct torture_context *tctx,
|
||||
* crash on the close. The sleeps are required to
|
||||
* make test test for a crash reliable, as we ensure
|
||||
* the pthread fsync internally finishes and accesses
|
||||
* freed memory. Without them the test occassionally
|
||||
* freed memory. Without them the test occasionally
|
||||
* passes as we disconnect before the pthread fsync
|
||||
* finishes.
|
||||
*/
|
||||
@ -2298,7 +2298,7 @@ static bool test_compound_async_flush_flush(struct torture_context *tctx,
|
||||
* crash on the close. The sleeps are required to
|
||||
* make test test for a crash reliable, as we ensure
|
||||
* the pthread fsync internally finishes and accesses
|
||||
* freed memory. Without them the test occassionally
|
||||
* freed memory. Without them the test occasionally
|
||||
* passes as we disconnect before the pthread fsync
|
||||
* finishes.
|
||||
*/
|
||||
|
@ -1,20 +1,20 @@
|
||||
/*
|
||||
/*
|
||||
Unix SMB/CIFS implementation.
|
||||
|
||||
SMB2 create test suite
|
||||
|
||||
Copyright (C) Andrew Tridgell 2008
|
||||
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
@ -143,7 +143,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
|
||||
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
|
||||
io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
|
||||
io.in.share_access =
|
||||
io.in.share_access =
|
||||
NTCREATEX_SHARE_ACCESS_DELETE|
|
||||
NTCREATEX_SHARE_ACCESS_READ|
|
||||
NTCREATEX_SHARE_ACCESS_WRITE;
|
||||
@ -174,7 +174,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
|
||||
io.in.file_attributes = FILE_ATTRIBUTE_VOLUME;
|
||||
status = smb2_create(tree, tctx, &io);
|
||||
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
|
||||
|
||||
|
||||
io.in.create_disposition = NTCREATEX_DISP_CREATE;
|
||||
io.in.desired_access = 0x08000000;
|
||||
status = smb2_create(tree, tctx, &io);
|
||||
@ -320,7 +320,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
|
||||
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.in.file_attributes = 0;
|
||||
io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
|
||||
io.in.share_access =
|
||||
io.in.share_access =
|
||||
NTCREATEX_SHARE_ACCESS_READ|
|
||||
NTCREATEX_SHARE_ACCESS_WRITE;
|
||||
io.in.create_options = 0;
|
||||
@ -333,7 +333,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
|
||||
|
||||
io.in.fname = FNAME;
|
||||
io.in.file_attributes = 0x8040;
|
||||
io.in.share_access =
|
||||
io.in.share_access =
|
||||
NTCREATEX_SHARE_ACCESS_READ;
|
||||
status = smb2_create(tree, tctx, &io);
|
||||
CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER);
|
||||
@ -358,7 +358,7 @@ static bool test_create_gentest(struct torture_context *tctx, struct smb2_tree *
|
||||
io.in.share_access = 0;
|
||||
status = smb2_create(tree, tctx, &io);
|
||||
CHECK_STATUS(status, NT_STATUS_ACCESS_DENIED);
|
||||
|
||||
|
||||
smb2_deltree(tree, FNAME);
|
||||
|
||||
return true;
|
||||
@ -379,7 +379,7 @@ static bool test_create_blob(struct torture_context *tctx, struct smb2_tree *tre
|
||||
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
|
||||
io.in.create_disposition = NTCREATEX_DISP_OVERWRITE_IF;
|
||||
io.in.share_access =
|
||||
io.in.share_access =
|
||||
NTCREATEX_SHARE_ACCESS_DELETE|
|
||||
NTCREATEX_SHARE_ACCESS_READ|
|
||||
NTCREATEX_SHARE_ACCESS_WRITE;
|
||||
@ -397,7 +397,7 @@ static bool test_create_blob(struct torture_context *tctx, struct smb2_tree *tre
|
||||
|
||||
torture_comment(tctx, "Testing alloc size\n");
|
||||
/* FIXME We use 1M cause that's the rounded size of Samba.
|
||||
* We should ask the server for the cluser size and calulate it
|
||||
* We should ask the server for the cluster size and calculate it
|
||||
* correctly. */
|
||||
io.in.alloc_size = 0x00100000;
|
||||
status = smb2_create(tree, tctx, &io);
|
||||
@ -547,7 +547,7 @@ static bool test_create_blob(struct torture_context *tctx, struct smb2_tree *tre
|
||||
CHECK_STATUS(status, NT_STATUS_OK);
|
||||
|
||||
smb2_deltree(tree, FNAME);
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -587,7 +587,7 @@ static bool test_create_acl_ext(struct torture_context *tctx, struct smb2_tree *
|
||||
io.in.desired_access = SEC_FLAG_MAXIMUM_ALLOWED;
|
||||
io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
|
||||
io.in.create_disposition = NTCREATEX_DISP_CREATE;
|
||||
io.in.share_access =
|
||||
io.in.share_access =
|
||||
NTCREATEX_SHARE_ACCESS_DELETE |
|
||||
NTCREATEX_SHARE_ACCESS_READ |
|
||||
NTCREATEX_SHARE_ACCESS_WRITE;
|
||||
@ -604,7 +604,7 @@ static bool test_create_acl_ext(struct torture_context *tctx, struct smb2_tree *
|
||||
|
||||
q.query_secdesc.level = RAW_FILEINFO_SEC_DESC;
|
||||
q.query_secdesc.in.file.handle = io.out.file.handle;
|
||||
q.query_secdesc.in.secinfo_flags =
|
||||
q.query_secdesc.in.secinfo_flags =
|
||||
SECINFO_OWNER |
|
||||
SECINFO_GROUP |
|
||||
SECINFO_DACL;
|
||||
@ -664,7 +664,7 @@ static bool test_create_acl_ext(struct torture_context *tctx, struct smb2_tree *
|
||||
|
||||
FAIL_UNLESS(smb2_util_verify_sd(tctx, tree, io.out.file.handle, sd));
|
||||
FAIL_UNLESS(smb2_util_verify_attrib(tctx, tree, io.out.file.handle, attrib));
|
||||
|
||||
|
||||
status = smb2_util_close(tree, io.out.file.handle);
|
||||
CHECK_STATUS(status, NT_STATUS_OK);
|
||||
status = delete_func(tree, FNAME);
|
||||
@ -1769,7 +1769,7 @@ static bool test_twrp_write(struct torture_context *tctx, struct smb2_tree *tree
|
||||
setenv("TZ", "GMT", 1);
|
||||
|
||||
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
|
||||
* effect if it is greather than 1. */
|
||||
* effect if it is greater than 1. */
|
||||
ZERO_STRUCT(tm);
|
||||
|
||||
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
|
||||
@ -1873,7 +1873,7 @@ static bool test_twrp_stream(struct torture_context *tctx,
|
||||
setenv("TZ", "GMT", 1);
|
||||
|
||||
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
|
||||
* effect if it is greather than 1. */
|
||||
* effect if it is greater than 1. */
|
||||
ZERO_STRUCT(tm);
|
||||
|
||||
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
|
||||
@ -1936,7 +1936,7 @@ static bool test_twrp_openroot(struct torture_context *tctx, struct smb2_tree *t
|
||||
setenv("TZ", "GMT", 1);
|
||||
|
||||
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
|
||||
* effect if it is greather than 1. */
|
||||
* effect if it is greater than 1. */
|
||||
ZERO_STRUCT(tm);
|
||||
|
||||
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
|
||||
@ -1995,7 +1995,7 @@ static bool test_twrp_listdir(struct torture_context *tctx,
|
||||
setenv("TZ", "GMT", 1);
|
||||
|
||||
/* strptime does not set tm.tm_isdst but mktime assumes DST is in
|
||||
* effect if it is greather than 1. */
|
||||
* effect if it is greater than 1. */
|
||||
ZERO_STRUCT(tm);
|
||||
|
||||
p = strptime(snapshot, "@GMT-%Y.%m.%d-%H.%M.%S", &tm);
|
||||
@ -2431,7 +2431,7 @@ static bool test_fileid(struct torture_context *tctx,
|
||||
|
||||
/*
|
||||
* Do some modifications on the stream (IO, setinfo), verifying File-ID
|
||||
* after earch step.
|
||||
* after each step.
|
||||
*/
|
||||
create = (struct smb2_create) {
|
||||
.in.desired_access = SEC_FILE_ALL,
|
||||
@ -2757,7 +2757,7 @@ static bool test_fileid_dir(struct torture_context *tctx,
|
||||
|
||||
/*
|
||||
* Do some modifications on the stream (IO, setinfo), verifying File-ID
|
||||
* after earch step.
|
||||
* after each step.
|
||||
*/
|
||||
create = (struct smb2_create) {
|
||||
.in.desired_access = SEC_FILE_ALL,
|
||||
|
@ -723,7 +723,7 @@ static NTSTATUS multiple_smb2_search(struct smb2_tree *tree,
|
||||
f.in.max_response_size = 1024*1024;
|
||||
f.in.level = level;
|
||||
|
||||
/* The search should start from the beginning everytime */
|
||||
/* The search should start from the beginning every time */
|
||||
f.in.continue_flags = SMB2_CONTINUE_FLAG_RESTART;
|
||||
if (cont_type == CONT_REOPEN) {
|
||||
f.in.continue_flags = SMB2_CONTINUE_FLAG_REOPEN;
|
||||
|
@ -76,7 +76,7 @@ static bool torture_smb2_acl_xattr(struct torture_context *tctx,
|
||||
"torture_smb2_testfile failed\n");
|
||||
|
||||
/*
|
||||
* 1. Set an EA, so we have somthing to list
|
||||
* 1. Set an EA, so we have something to list
|
||||
*/
|
||||
ZERO_STRUCT(ea);
|
||||
ea.name.s = "void";
|
||||
|
@ -3240,7 +3240,7 @@ static NTSTATUS test_sparse_get(struct torture_context *torture,
|
||||
|
||||
/*
|
||||
* Manually test setting and clearing sparse flag. Intended for file system
|
||||
* specifc tests to toggle the flag through SMB and check the status in the
|
||||
* specific tests to toggle the flag through SMB and check the status in the
|
||||
* file system.
|
||||
*/
|
||||
bool test_ioctl_set_sparse(struct torture_context *tctx)
|
||||
@ -5609,7 +5609,7 @@ static bool test_ioctl_trim_simple(struct torture_context *torture,
|
||||
|
||||
torture_assert_int_equal(torture, trim_rsp.num_ranges_processed, 1, "");
|
||||
|
||||
/* second half of the file should remain consitent */
|
||||
/* second half of the file should remain consistent */
|
||||
ok = check_pattern(torture, tree, tmp_ctx, fh, trim_chunk_len,
|
||||
trim_chunk_len, trim_chunk_len);
|
||||
torture_assert(torture, ok, "non-trimmed range inconsistent");
|
||||
|
@ -402,7 +402,7 @@ static bool test_lease_upgrade2(struct torture_context *tctx,
|
||||
* - is strictly a superset of lease1, and
|
||||
* - can held together with lease2.
|
||||
*
|
||||
* In that case, the resuling lease state of the upgraded lease1
|
||||
* In that case, the resulting lease state of the upgraded lease1
|
||||
* is the state requested in the upgrade. lease2 is not broken
|
||||
* and remains unchanged.
|
||||
*
|
||||
|
@ -644,7 +644,7 @@ static bool test_smb2_oplock_exclusive5(struct torture_context *tctx,
|
||||
ZERO_STRUCT(break_info);
|
||||
|
||||
torture_comment(tctx, "second open with attributes only and "
|
||||
"NTCREATEX_DISP_OVERWRITE_IF dispostion causes "
|
||||
"NTCREATEX_DISP_OVERWRITE_IF disposition causes "
|
||||
"oplock break\n");
|
||||
|
||||
io.smb2.in.create_flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
@ -2001,7 +2001,7 @@ static bool test_smb2_oplock_batch13(struct torture_context *tctx,
|
||||
ZERO_STRUCT(break_info);
|
||||
|
||||
torture_comment(tctx, "second open with attributes only and "
|
||||
"NTCREATEX_DISP_OVERWRITE dispostion causes "
|
||||
"NTCREATEX_DISP_OVERWRITE disposition causes "
|
||||
"oplock break\n");
|
||||
|
||||
io.smb2.in.create_flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
@ -2080,7 +2080,7 @@ static bool test_smb2_oplock_batch14(struct torture_context *tctx,
|
||||
ZERO_STRUCT(break_info);
|
||||
|
||||
torture_comment(tctx, "second open with attributes only and "
|
||||
"NTCREATEX_DISP_SUPERSEDE dispostion causes "
|
||||
"NTCREATEX_DISP_SUPERSEDE disposition causes "
|
||||
"oplock break\n");
|
||||
|
||||
io.smb2.in.create_flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
@ -2234,7 +2234,7 @@ static bool test_smb2_oplock_batch16(struct torture_context *tctx,
|
||||
ZERO_STRUCT(break_info);
|
||||
|
||||
torture_comment(tctx, "second open with attributes only and "
|
||||
"NTCREATEX_DISP_OVERWRITE_IF dispostion causes "
|
||||
"NTCREATEX_DISP_OVERWRITE_IF disposition causes "
|
||||
"oplock break\n");
|
||||
|
||||
io.smb2.in.create_flags = NTCREATEX_FLAGS_EXTENDED;
|
||||
|
@ -521,7 +521,7 @@ static bool test_replay_dhv2_oplock2(struct torture_context *tctx,
|
||||
io.in.timeout = UINT32_MAX;
|
||||
|
||||
/*
|
||||
* Adapt the response to the exepected values
|
||||
* Adapt the response to the expected values
|
||||
*/
|
||||
ref2 = ref1;
|
||||
ref2.out.oplock_level = smb2_util_oplock_level("");
|
||||
@ -1876,7 +1876,7 @@ done:
|
||||
* It won't pass against Windows as it returns
|
||||
* NT_STATUS_SHARING_VIOLATION to the replay (after
|
||||
* 35 seconds), and this tests reports NT_STATUS_IO_TIMEOUT,
|
||||
* as it expectes a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
|
||||
* as it expects a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
|
||||
* see test_dhv2_pending1n_vs_violation_lease_close_windows().
|
||||
*/
|
||||
static bool test_dhv2_pending1n_vs_violation_lease_close_sane(struct torture_context *tctx,
|
||||
@ -1952,7 +1952,7 @@ static bool test_dhv2_pending1n_vs_violation_lease_close_windows(struct torture_
|
||||
* It won't pass against Windows as it returns
|
||||
* NT_STATUS_SHARING_VIOLATION to the replay (after
|
||||
* 35 seconds), and this tests reports NT_STATUS_IO_TIMEOUT,
|
||||
* as it expectes a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
|
||||
* as it expects a NT_STATUS_FILE_NOT_AVAILABLE within 5 seconds.
|
||||
* see test_dhv2_pending1n_vs_violation_lease_ack_windows().
|
||||
*/
|
||||
static bool test_dhv2_pending1n_vs_violation_lease_ack_sane(struct torture_context *tctx,
|
||||
|
@ -62,7 +62,7 @@ static void torture_smb2_tree_disconnect_timer(struct tevent_context *ev,
|
||||
|
||||
/*
|
||||
* Check that Samba3 correctly deals with conflicting local posix byte range
|
||||
* locks on an underlying file via "normal" SMB2 (without posix extentions).
|
||||
* locks on an underlying file via "normal" SMB2 (without posix extensions).
|
||||
*
|
||||
* Note: This test depends on "posix locking = yes".
|
||||
* Note: To run this test, use "--option=torture:localdir=<LOCALDIR>"
|
||||
|
@ -1185,7 +1185,7 @@ struct torture_suite *torture_smb2_timestamps_init(TALLOC_CTX *ctx)
|
||||
torture_suite_add_1smb2_test(suite, "freeze-thaw", test_freeze_thaw);
|
||||
|
||||
/*
|
||||
* Testing of delayed write-time udpates
|
||||
* Testing of delayed write-time updates
|
||||
*/
|
||||
torture_suite_add_1smb2_test(suite, "delayed-write-vs-seteof", test_delayed_write_vs_seteof);
|
||||
torture_suite_add_1smb2_test(suite, "delayed-write-vs-flush", test_delayed_write_vs_flush);
|
||||
|
Loading…
Reference in New Issue
Block a user