diff options
author | Volker Lendecke <vl@samba.org> | 2014-08-20 09:53:28 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2014-08-23 00:24:18 +0200 |
commit | 0ddfdb83e8a5aacc16994e2a380101723035c576 (patch) | |
tree | 91cf235613c08d12ff874c17a2797800e40dcc19 /source3/torture | |
parent | 513584a3b1f7d46801d43da990594b1dca85ec11 (diff) | |
download | samba-0ddfdb83e8a5aacc16994e2a380101723035c576.tar.gz |
torture: Fix cleanup2 to utilize on-demand cleanup
Now we check the cleanup when conflicts happen, not when we first open
the file. This means we don't have to re-open the connection to make
cleanup happen.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/torture')
-rw-r--r-- | source3/torture/test_cleanup.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/source3/torture/test_cleanup.c b/source3/torture/test_cleanup.c index c5c53c3c4c4..8efdf35e080 100644 --- a/source3/torture/test_cleanup.c +++ b/source3/torture/test_cleanup.c @@ -157,23 +157,10 @@ bool run_cleanup2(int dummy) } /* - * Right now we don't clean up immediately. Re-open the 2nd connection. + * Give the suicidal smbd a bit of time to really pass away */ -#if 1 - cli_shutdown(cli2); - if (!torture_open_connection(&cli2, 0)) { - return false; - } - status = cli_ntcreate( - cli2, fname, 0, FILE_GENERIC_READ|FILE_GENERIC_WRITE, - FILE_ATTRIBUTE_NORMAL, - FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, - FILE_OPEN, 0, 0, &fnum2, NULL); - if (!NT_STATUS_IS_OK(status)) { - printf("open of %s failed (%s)\n", fname, nt_errstr(status)); - return false; - } -#endif + smb_msleep(1000); + status = cli_smbwrite(cli2, fnum2, &buf, 0, 1, NULL); if (!NT_STATUS_IS_OK(status)) { printf("write failed: %s\n", nt_errstr(status)); |