r3634: - fixed BASE-DISCONNECT test to force the async packets to be sent by
authorAndrew Tridgell <tridge@samba.org>
Tue, 9 Nov 2004 09:35:45 +0000 (09:35 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:05:41 +0000 (13:05 -0500)
  waiting for a chkpath response

- fixed open async send in BASE-DISCONNECT

with these changes BASE-DISCONNECT crashes Samba4, as it was designed
to do. I'll work on a fix :)
(This used to be commit 25e01384647116d8ea0f20a6988fb8fe63218840)

source4/torture/basic/disconnect.c

index b5f6eb53116881e72ca2f330b698bcdc8a7e6d62..683cdb81c8b7ceff753a5a514e93a49230bee3e8 100644 (file)
@@ -59,8 +59,12 @@ static BOOL test_disconnect_open(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        status = smb_raw_open(cli->tree, mem_ctx, &io);
        CHECK_STATUS(status, NT_STATUS_OK);
 
+       io.ntcreatex.in.share_access = 0;
        req1 = smb_raw_open_send(cli->tree, &io);
        req2 = smb_raw_open_send(cli->tree, &io);
+
+       status = smbcli_chkpath(cli->tree, "\\");
+       CHECK_STATUS(status, NT_STATUS_OK);
        
        talloc_free(cli);
 
@@ -106,6 +110,9 @@ static BOOL test_disconnect_lock(struct smbcli_state *cli, TALLOC_CTX *mem_ctx)
        io.lockx.in.timeout = 3000;
        req = smb_raw_lock_send(cli->tree, &io);
 
+       status = smbcli_chkpath(cli->tree, "\\");
+       CHECK_STATUS(status, NT_STATUS_OK);
+
        talloc_free(cli);
 
        return True;