s4.torture.smb2/session: Add torture assert for close
authorAnoop C S <anoopcs@redhat.com>
Mon, 26 Oct 2015 11:03:11 +0000 (16:33 +0530)
committerMichael Adam <obnox@samba.org>
Sat, 31 Oct 2015 14:52:22 +0000 (15:52 +0100)
Signed-off-by: Anoop C S <anoopcs@redhat.com>
Reviewed-by: Michael Adam <obnox@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Sat Oct 31 15:52:22 CET 2015 on sn-devel-104

source4/torture/smb2/session.c

index 755f1a0167f446e883ef74a91b69db88789970a6..7bb9f64ad2d1bb422858a2967be1d87a1b9c50e4 100644 (file)
@@ -809,7 +809,9 @@ bool test_session_reauth5(struct torture_context *tctx, struct smb2_tree *tree)
        torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
                                        "smb2_getinfo_file failed");
 
-       smb2_util_close(tree, _dh1);
+       status = smb2_util_close(tree, _dh1);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "smb2_util_close failed");
        dh1 = NULL;
 
        /* try to rename the file: still fails */
@@ -848,8 +850,9 @@ bool test_session_reauth5(struct torture_context *tctx, struct smb2_tree *tree)
 
        /* closs the file, check it is gone and reopen under the new name */
 
-       smb2_util_close(tree, _h1);
-
+       status = smb2_util_close(tree, _h1);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "smb2_util_close failed");
        ZERO_STRUCT(io1);
 
        smb2_generic_create_share(&io1,
@@ -1237,7 +1240,9 @@ bool test_session_bind1(struct torture_context *tctx, struct smb2_tree *tree1)
                                        "smb2_getinfo_file failed");
 
        tree1->session = session1_1;
-       smb2_util_close(tree1, *h1);
+       status = smb2_util_close(tree1, *h1);
+       torture_assert_ntstatus_ok_goto(tctx, status, ret, done,
+                                       "smb2_util_close failed");
        h1 = NULL;
 
        /*