1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

s4/torture: Port SMBv1 Change Notify tests to SMBv2

* Ported all tests from raw/notify.c to smb2/notify.c
* Parameterized the max_buffer_size so it can be set on a
  per-target basis.
* Fixed CHECK macros to use torture_result
* Created a SMB2-NOTIFY test suite
This commit is contained in:
Aravind Srinivasan 2009-11-17 15:30:11 -08:00 committed by Steven Danneman
parent 74471387e0
commit 15d93a5d8e
4 changed files with 1839 additions and 42 deletions

File diff suppressed because it is too large Load Diff

View File

@ -136,7 +136,7 @@ NTSTATUS torture_smb2_init(void)
torture_suite_add_suite(suite, torture_smb2_lock_init());
torture_suite_add_suite(suite, torture_smb2_read_init());
torture_suite_add_suite(suite, torture_smb2_create_init());
torture_suite_add_simple_test(suite, "NOTIFY", torture_smb2_notify);
torture_suite_add_suite(suite, torture_smb2_notify_init());
torture_suite_add_suite(suite, torture_smb2_durable_open_init());
torture_suite_add_suite(suite, torture_smb2_dir_init());
torture_suite_add_suite(suite, torture_smb2_lease_init());

View File

@ -531,6 +531,8 @@ int main(int argc,char *argv[])
"torture:invalid_lock_range_support", "false");
} else if (strcmp(target, "win7") == 0) {
lp_set_cmdline(cmdline_lp_ctx, "torture:win7", "true");
lp_set_cmdline(cmdline_lp_ctx, "torture:cn_max_buffer_size",
"0x00010000");
} else if (strcmp(target, "onefs") == 0) {
lp_set_cmdline(cmdline_lp_ctx, "torture:sacl_support", "false");
}

View File

@ -53,6 +53,14 @@ bool torture_register_suite(struct torture_suite *suite);
* Because we use parametric options we do not need to define these parameters
* anywhere, we just define the meaning of each here.*/
/* torture:cn_max_buffer_size
*
* This parameter specifies the maximum buffer size given in a change notify
* request. If an overly large buffer is requested by a client, the server
* will return a STATUS_INVALID_PARAMETER. The max buffer size on Windows
* server pre-Win7 was 0x00080000. In Win7 this was reduced to 0x00010000.
*/
/* torture:invalid_lock_range_support
*
* This parameter specifies whether the server will return