Changeset 752 for trunk/server/source4/torture/smb2
- Timestamp:
- Nov 29, 2012, 2:06:31 PM (13 years ago)
- Location:
- trunk/server
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/server
- Property svn:mergeinfo changed
/vendor/current merged: 746,748
- Property svn:mergeinfo changed
-
trunk/server/source4/torture/smb2/compound.c
r745 r752 33 33 goto done; \ 34 34 }} while (0) 35 36 #define TARGET_IS_W2K8(_tctx) (torture_setting_bool(_tctx, "w2k8", false))37 #define TARGET_IS_WIN7(_tctx) (torture_setting_bool(_tctx, "win7", false))38 35 39 36 static bool test_compound_related1(struct torture_context *tctx, … … 167 164 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 168 165 status = smb2_close_recv(req[3], &cl); 169 CHECK_STATUS(status, NT_STATUS_ INVALID_PARAMETER);166 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 170 167 status = smb2_close_recv(req[4], &cl); 171 CHECK_STATUS(status, NT_STATUS_ INVALID_PARAMETER);168 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 172 169 173 170 tree->tid = saved_tid; … … 253 250 struct smb2_close cl; 254 251 bool ret = true; 255 struct smb2_request *req[ 2];256 257 smb2_transport_credits_ask_num(tree->session->transport, 2);252 struct smb2_request *req[3]; 253 254 smb2_transport_credits_ask_num(tree->session->transport, 3); 258 255 259 256 smb2_util_unlink(tree, fname); … … 279 276 cr.in.fname = fname; 280 277 281 smb2_transport_compound_start(tree->session->transport, 2);278 smb2_transport_compound_start(tree->session->transport, 3); 282 279 283 280 /* passing the first request with the related flag is invalid */ … … 292 289 cl.in.file.handle = hd; 293 290 req[1] = smb2_close_send(tree, &cl); 291 292 smb2_transport_compound_set_related(tree->session->transport, false); 293 req[2] = smb2_close_send(tree, &cl); 294 294 295 295 status = smb2_create_recv(req[0], tree, &cr); … … 298 298 status = smb2_close_recv(req[1], &cl); 299 299 CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER); 300 status = smb2_close_recv(req[2], &cl); 301 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 300 302 301 303 smb2_util_unlink(tree, fname); … … 368 370 CHECK_STATUS(status, NT_STATUS_OK); 369 371 status = smb2_close_recv(req[2], &cl); 370 CHECK_STATUS(status, NT_STATUS_ FILE_CLOSED);372 CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED); 371 373 status = smb2_close_recv(req[3], &cl); 372 CHECK_STATUS(status, NT_STATUS_ FILE_CLOSED);374 CHECK_STATUS(status, NT_STATUS_USER_SESSION_DELETED); 373 375 status = smb2_close_recv(req[4], &cl); 374 376 CHECK_STATUS(status, NT_STATUS_INVALID_PARAMETER); … … 440 442 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 441 443 status = smb2_close_recv(req[3], &cl); 442 CHECK_STATUS(status, NT_STATUS_ INVALID_PARAMETER);444 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 443 445 status = smb2_close_recv(req[4], &cl); 444 CHECK_STATUS(status, NT_STATUS_ INVALID_PARAMETER);446 CHECK_STATUS(status, NT_STATUS_FILE_CLOSED); 445 447 446 448 smb2_util_unlink(tree, fname); … … 466 468 * SMB2 spec as noted in MS-SMB2 <159>, <162>. This, test currently 467 469 * verifies the Windows behavior, not the general spec behavior. */ 468 if (!TARGET_IS_WIN7(tctx) && !TARGET_IS_W2K8(tctx)) {469 torture_skip(tctx, "Interim test is specific to Windows server "470 "behavior.\n");471 }472 470 473 471 smb2_transport_credits_ask_num(tree->session->transport, 5); … … 537 535 * SMB2 spec as noted in MS-SMB2 <159>, <162>. This, test currently 538 536 * verifies the Windows behavior, not the general spec behavior. */ 539 if (!TARGET_IS_WIN7(tctx) && !TARGET_IS_W2K8(tctx)) {540 torture_skip(tctx, "Interim test is specific to Windows server "541 "behavior.\n");542 }543 537 544 538 smb2_transport_credits_ask_num(tree->session->transport, 5); -
trunk/server/source4/torture/smb2/connect.c
r745 r752 72 72 DATA_BLOB data; 73 73 int i; 74 uint32_t size = torture_setting_int(tctx, "smb2maxwrite", 64*1024); 74 75 75 if (torture_setting_bool(tctx, "dangerous", false)) { 76 data = data_blob_talloc(tree, NULL, 160000); 77 } else if (torture_setting_bool(tctx, "samba4", false)) { 78 data = data_blob_talloc(tree, NULL, UINT16_MAX); 79 } else { 80 data = data_blob_talloc(tree, NULL, torture_setting_int(tctx, "smb2maxwrite", 120000)); 81 } 76 data = data_blob_talloc(tree, NULL, size); 77 if (size != data.length) { 78 printf("data_blob_talloc(%s) failed\n", size); 79 return NT_STATUS_NO_MEMORY; 80 } 81 82 82 for (i=0;i<data.length;i++) { 83 83 data.data[i] = i; -
trunk/server/source4/torture/smb2/oplock.c
r745 r752 2385 2385 int te; 2386 2386 2387 if (torture_setting_bool(tctx, "samba3", false)) {2388 torture_skip(tctx, "BATCH22 disabled against samba3\n");2389 }2390 2391 2387 status = torture_smb2_testdir(tree1, BASEDIR, &h); 2392 2388 torture_assert_ntstatus_ok(tctx, status, "Error creating directory"); … … 2727 2723 {&fname_default_stream, true, SMB2_OPLOCK_LEVEL_EXCLUSIVE, SMB2_OPLOCK_LEVEL_II}, 2728 2724 }; 2729 2730 /* Only passes against windows at the moment. */2731 if (torture_setting_bool(tctx, "samba3", false) ||2732 torture_setting_bool(tctx, "samba4", false)) {2733 torture_skip(tctx, "STREAM1 disabled against samba3+4\n");2734 }2735 2725 2736 2726 fname_stream = talloc_asprintf(tctx, "%s:%s", fname_base, stream); -
trunk/server/source4/torture/smb2/read.c
r745 r752 52 52 NTSTATUS status; 53 53 struct smb2_handle h; 54 uint8_t buf[ 70000];54 uint8_t buf[64*1024]; 55 55 struct smb2_read rd; 56 56 TALLOC_CTX *tmp_ctx = talloc_new(tree); … … 135 135 NTSTATUS status; 136 136 struct smb2_handle h; 137 uint8_t buf[ 70000];137 uint8_t buf[64*1024]; 138 138 struct smb2_read rd; 139 139 TALLOC_CTX *tmp_ctx = talloc_new(tree);
Note:
See TracChangeset
for help on using the changeset viewer.