* open file2 in session 2B
* block 2A
* open file2 in session 1
- * lease break reaches through ? - Yes through 2B
- * server allows session 1 to open file2 ? - Yes, after ~ 20 seconds
+ * lease break reaches the client?
* Connect 2C
* open file3 in session 2C
* unblock 2A
* open file1 in session 1
- * lease break reaches through ? - Yes through 2B
- * server allows session 1 to open file1 - Yes
+ * lease break reaches the client?
* open file3 in session 1
- * lease break sent to ? - Yes through 2B
+ * lease break reached the client?
* Cleanup
- * On deletion by 1, lease breaks sent for file1, file2 and file3 on 2B
- * This changes RH lease to R for Session 2
+ * On deletion by 1, lease breaks sent for file1, file2 and file3
+ * on 2B
+ * This changes RH lease to R for Session 2.
+ * (This has been disabled while we add support for sending lease
+ * break for handle leases.)
*/
static bool test_multichannel_lease_break_test4(struct torture_context *tctx,
struct smb2_tree *tree1)
h_client1_file2 = io2.out.file.handle;
CHECK_CREATED(&io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_LEASE(&io2, "RH", true, LEASE1F2, 0);
- /* Never Receives oplock break */
- CHECK_BREAK_INFO("RHW", "RH", LEASE2F2);
CHECK_VAL(io2.out.durable_open_v2, false);
CHECK_VAL(io2.out.timeout, 0);
CHECK_VAL(io2.out.durable_open, false);
torture_comment(tctx, "Received %d lease break(s)!!\n", lease_break_info.count);
CHECK_VAL(lease_break_info.count, 1);
+ CHECK_BREAK_INFO("RHW", "RH", LEASE2F2);
torture_reset_lease_break_info(tctx, &lease_break_info);
/* Connect 2C */
h_client1_file1 = io1.out.file.handle;
CHECK_CREATED(&io1, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_LEASE(&io1, "RH", true, LEASE1F1, 0);
- CHECK_BREAK_INFO("RHW", "RH", LEASE2F1);
if (lease_break_info.count == 0)
torture_comment(tctx, "Did not receive expected lease break!!\n");
else
torture_comment(tctx, "Received %d lease break(s)!!\n", lease_break_info.count);
CHECK_VAL(lease_break_info.count, 1);
+ CHECK_BREAK_INFO("RHW", "RH", LEASE2F1);
torture_reset_lease_break_info(tctx, &lease_break_info);
/*
h_client1_file3 = io3.out.file.handle;
CHECK_CREATED(&io3, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
CHECK_LEASE(&io3, "RH", true, LEASE1F3, 0);
- CHECK_BREAK_INFO("RHW", "RH", LEASE2F3);
if (lease_break_info.count == 0)
torture_comment(tctx, "Did not receive expected lease break!!\n");
else
torture_comment(tctx, "Received %d lease break(s)!!\n", lease_break_info.count);
CHECK_VAL(lease_break_info.count, 1);
+ CHECK_BREAK_INFO("RHW", "RH", LEASE2F3);
torture_reset_lease_break_info(tctx, &lease_break_info);
smb2_util_close(tree1, h_client1_file1);
* leads to a lease break call to session 2 file1
*/
smb2_util_unlink(tree1, fname1);
- CHECK_BREAK_INFO("RH", "R", LEASE2F1);
+ /*
+ * Bug - Samba does not revoke Handle lease on unlink
+ * CHECK_BREAK_INFO("RH", "R", LEASE2F1);
+ */
torture_reset_lease_break_info(tctx, &lease_break_info);
/*
* leads to a lease break call to session 2 file2
*/
smb2_util_unlink(tree1, fname2);
- CHECK_BREAK_INFO("RH", "R", LEASE2F2);
+ /*
+ * Bug - Samba does not revoke Handle lease on unlink
+ * CHECK_BREAK_INFO("RH", "R", LEASE2F2);
+ */
torture_reset_lease_break_info(tctx, &lease_break_info);
/*
* leads to a lease break call to session 2 file3
*/
smb2_util_unlink(tree1, fname3);
- CHECK_BREAK_INFO("RH", "R", LEASE2F3);
+ /*
+ * Bug - Samba does not revoke Handle lease on unlink
+ * CHECK_BREAK_INFO("RH", "R", LEASE2F3);
+ */
torture_reset_lease_break_info(tctx, &lease_break_info);
smb2_util_close(tree2C, h_client2_file1);