From 9102ccf648e4f1fb4c20fc3aece45364e94294e0 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 10 May 2012 14:51:13 +0200 Subject: [PATCH] s4:torture report connection error via torture_fail to make smbtorture report the error instead of complaining about missing torture_ call Signed-off-by: Stefan Metzmacher Autobuild-User: Stefan Metzmacher Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104 --- source4/torture/smb2/smb2.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c index 9ea71b463ef..a396a2eda2c 100644 --- a/source4/torture/smb2/smb2.c +++ b/source4/torture/smb2/smb2.c @@ -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; } -- 2.34.1