summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Ambach <ambi@samba.org>2012-05-10 14:51:13 +0200
committerStefan Metzmacher <metze@samba.org>2012-05-29 13:57:41 +0200
commit9102ccf648e4f1fb4c20fc3aece45364e94294e0 (patch)
treeeceae49a43ffdf021c1b88fd524fe3bda6fc5a45
parentaa7cd05e5b2efc45985a92c9f329099d40516876 (diff)
downloadsamba-9102ccf648e4f1fb4c20fc3aece45364e94294e0.tar.gz
samba-9102ccf648e4f1fb4c20fc3aece45364e94294e0.tar.bz2
samba-9102ccf648e4f1fb4c20fc3aece45364e94294e0.zip
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 <metze@samba.org> Autobuild-User: Stefan Metzmacher <metze@samba.org> Autobuild-Date: Tue May 29 13:57:42 CEST 2012 on sn-devel-104
-rw-r--r--source4/torture/smb2/smb2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/source4/torture/smb2/smb2.c b/source4/torture/smb2/smb2.c
index 9ea71b463e..a396a2eda2 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;
}