From: Stefan Metzmacher Date: Tue, 23 Jun 2020 10:38:49 +0000 (+0200) Subject: s4:torture/smb2: fix smb2.multichannel.leases.test2 against windows X-Git-Tag: samba-4.13.0rc1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f92f24ee2663ce739bc24bbd0c4a2455901d2680;p=thirdparty%2Fsamba.git s4:torture/smb2: fix smb2.multichannel.leases.test2 against windows We still receive the break on the blocked channel, it's only the response ACKs, which we are blocking (or simulate to block). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11897 Signed-off-by: Stefan Metzmacher Reviewed-by: Günther Deschner --- diff --git a/source4/torture/smb2/multichannel.c b/source4/torture/smb2/multichannel.c index 3e29c7d02a9..aae63db2fe2 100644 --- a/source4/torture/smb2/multichannel.c +++ b/source4/torture/smb2/multichannel.c @@ -1149,6 +1149,9 @@ static bool test_multichannel_lease_break_test2(struct torture_context *tctx, block_ok = test_block_smb2_transport(tctx, transport2A); torture_assert(tctx, block_ok, "we could not block tcp transport"); + torture_wait_for_lease_break(tctx); + CHECK_VAL(lease_break_info.count, 0); + /* 1 opens file2 */ torture_comment(tctx, "Client opens fname2 with session1 with 2A blocked\n"); @@ -1171,7 +1174,14 @@ static bool test_multichannel_lease_break_test2(struct torture_context *tctx, lease_break_info.count); } - CHECK_VAL(lease_break_info.count, 1); + /* + * We got breaks on both channels + * (one failed on the blocked connection) + */ + CHECK_VAL(lease_break_info.count, 2); + lease_break_info.count -= 1; + CHECK_VAL(lease_break_info.failures, 1); + lease_break_info.failures -= 1; CHECK_BREAK_INFO("RHW", "RH", LEASE2F2); torture_reset_lease_break_info(tctx, &lease_break_info);