torture:smb2: fix copy'n'paste error in durable-open:open2:lease test
authorMichael Adam <obnox@samba.org>
Mon, 28 Dec 2015 23:44:11 +0000 (00:44 +0100)
committerJeremy Allison <jra@samba.org>
Tue, 29 Dec 2015 07:34:03 +0000 (08:34 +0100)
Checking against the correct smb2_create object also lets us
check the correct create action (EXISTED vs CREATED).

Observed when this showed up in flakey test results.

Signed-off-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Dec 29 08:34:03 CET 2015 on sn-devel-144

source4/torture/smb2/durable_open.c

index bb32f96e9ec979f6e8d4cbb4f9e29cece399baf4..fe0a326110e3f3db19d2392fba68429a5fcc1e68 100644 (file)
@@ -2112,7 +2112,7 @@ static bool test_durable_open_open2_lease(struct torture_context *tctx,
        status = smb2_create(tree2, mem_ctx, &io2);
        CHECK_STATUS(status, NT_STATUS_OK);
        h2 = io2.out.file.handle;
-       CHECK_CREATED(&io1, CREATED, FILE_ATTRIBUTE_ARCHIVE);
+       CHECK_CREATED(&io2, EXISTED, FILE_ATTRIBUTE_ARCHIVE);
 
        /* Reconnect */
        if (!torture_smb2_connection_ext(tctx, 0, &options, &tree1)) {