s4:torture report connection error via torture_fail
authorChristian Ambach <ambi@samba.org>
Thu, 10 May 2012 12:51:13 +0000 (14:51 +0200)
committerStefan Metzmacher <metze@samba.org>
Tue, 29 May 2012 11:57:41 +0000 (13:57 +0200)
to make smbtorture report the error instead of complaining about missing torture_ call

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User: Stefan Metzmacher <metze@samba.org>
Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104

source4/torture/smb2/smb2.c

index 9ea71b463efee10238d06f2824f8163c6c61adf8..a396a2eda2c9502586297a06e1fee115b51bec39 100644 (file)
@@ -33,8 +33,11 @@ static bool wrap_simple_1smb2_test(struct torture_context *torture_ctx,
        struct smb2_tree *tree1;
        TALLOC_CTX *mem_ctx = talloc_new(torture_ctx);
 
-       if (!torture_smb2_connection(torture_ctx, &tree1))
+       if (!torture_smb2_connection(torture_ctx, &tree1)) {
+               torture_fail(torture_ctx,
+                           "Establishing SMB2 connection failed\n");
                return false;
+       }
 
        /*
         * This is a trick:
@@ -89,12 +92,16 @@ static bool wrap_simple_2smb2_test(struct torture_context *torture_ctx,
        TALLOC_CTX *mem_ctx = talloc_new(torture_ctx);
 
        if (!torture_smb2_connection(torture_ctx, &tree1)) {
+               torture_fail(torture_ctx,
+                   "Establishing SMB2 connection failed\n");
                goto done;
        }
 
        talloc_steal(mem_ctx, tree1);
 
        if (!torture_smb2_connection(torture_ctx, &tree2)) {
+               torture_fail(torture_ctx,
+                   "Establishing SMB2 connection failed\n");
                goto done;
        }