diff options
author | Stefan Metzmacher <metze@samba.org> | 2008-12-18 07:49:41 +0100 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2008-12-18 13:31:41 +0100 |
commit | 79351f75fee425fc4dd2f2d6dacd32908aa133b4 (patch) | |
tree | c68886dcb417c4f637557c466f53859eb09be93e /source4/torture/basic | |
parent | 7a5b6a2ea194677c59ad6fab0aca3f102b5b2f46 (diff) | |
download | samba-79351f75fee425fc4dd2f2d6dacd32908aa133b4.tar.gz samba-79351f75fee425fc4dd2f2d6dacd32908aa133b4.tar.bz2 samba-79351f75fee425fc4dd2f2d6dacd32908aa133b4.zip |
BASE-LOCK: fix LOCK5
We need to close all 3 file handle to make the unlink work.
metze
Diffstat (limited to 'source4/torture/basic')
-rw-r--r-- | source4/torture/basic/locking.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source4/torture/basic/locking.c b/source4/torture/basic/locking.c index 3f399c97ef..fcac52ca6a 100644 --- a/source4/torture/basic/locking.c +++ b/source4/torture/basic/locking.c @@ -624,10 +624,18 @@ ret = NT_STATUS_IS_OK(smbcli_unlock(cli1->tree, fnum1, 0, 4)) && torture_comment(tctx, "a different processs %s get a write lock on the unlocked stack\n", ret?"can":"cannot"); - smbcli_close(cli1->tree, fnum1); - smbcli_close(cli2->tree, fnum2); - smbcli_unlink(cli1->tree, fname); - + torture_assert_ntstatus_ok(tctx, smbcli_close(cli1->tree, fnum1), + talloc_asprintf(tctx, "close1 failed (%s)", smbcli_errstr(cli1->tree))); + + torture_assert_ntstatus_ok(tctx, smbcli_close(cli2->tree, fnum2), + talloc_asprintf(tctx, "close2 failed (%s)", smbcli_errstr(cli2->tree))); + + torture_assert_ntstatus_ok(tctx, smbcli_close(cli1->tree, fnum3), + talloc_asprintf(tctx, "close2 failed (%s)", smbcli_errstr(cli2->tree))); + + torture_assert_ntstatus_ok(tctx, smbcli_unlink(cli1->tree, fname), + talloc_asprintf(tctx, "unlink failed (%s)", smbcli_errstr(cli1->tree))); + return correct; } |