From: Ralph Boehme Date: Mon, 16 Nov 2020 09:44:48 +0000 (+0100) Subject: torture: avoid OPLOCK-CANCEL flapping on busy gitlab CI X-Git-Tag: samba-4.14.0rc1~586 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5604afefb05b376fcc61db99441fd57367881e69;p=thirdparty%2Fsamba.git torture: avoid OPLOCK-CANCEL flapping on busy gitlab CI I saw this test fail a few times on gitlab CI with NT_STATUS_SHARING_VIOLATION: Running OPLOCK-CANCEL cli_unlink failed: NT_STATUS_SHARING_VIOLATION TEST OPLOCK-CANCEL FAILED! The only possible explanation I could come up for this flapping test is that the fnum1 filehandle in cli1 is still not closed when cli2 tries to open the file deletion 5 seconds after cli1 is thrown away. As fnum1 doesn't have FILE_SHARE_DELELE the open-for-delete fails with a SHARING_VIOLATION. Signed-off-by: Ralph Boehme Reviewed-by: Jeremy Allison --- diff --git a/source3/torture/test_oplock_cancel.c b/source3/torture/test_oplock_cancel.c index b003876f592..86ce5b76d77 100644 --- a/source3/torture/test_oplock_cancel.c +++ b/source3/torture/test_oplock_cancel.c @@ -148,6 +148,8 @@ bool run_oplock_cancel(int dummy) return false; } + cli_close(cli1, fnum1); + TALLOC_FREE(cli1); /*