summaryrefslogtreecommitdiff
path: root/source4/torture/basic
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-07-25 00:24:56 +0200
committerJeremy Allison <jra@samba.org>2014-08-07 22:12:12 +0200
commita6e098fb221eb581b99e9b31f221462ee6b7b1cb (patch)
tree463372df6ab2219c0ec97f191bc289024a6bf8e8 /source4/torture/basic
parent3f422177cedadd376c7691381c9b76222b469dd2 (diff)
downloadsamba-a6e098fb221eb581b99e9b31f221462ee6b7b1cb.tar.gz
s4:torture: use torture_assert instead of torture_comment and return in defer_open test
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source4/torture/basic')
-rw-r--r--source4/torture/basic/base.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c
index 66c6d41fe0e..1d04b358396 100644
--- a/source4/torture/basic/base.c
+++ b/source4/torture/basic/base.c
@@ -686,10 +686,11 @@ static bool run_deferopen(struct torture_context *tctx, struct smbcli_state *cli
}
} while (NT_STATUS_EQUAL(smbcli_nt_error(cli->tree),NT_STATUS_SHARING_VIOLATION));
- if (fnum == -1) {
- torture_comment(tctx,"Failed to open %s, error=%s\n", fname, smbcli_errstr(cli->tree));
- return false;
- }
+ torture_assert(tctx, fnum != -1,
+ talloc_asprintf(tctx,
+ "pid %u: Failed to open %s, error=%s\n",
+ (unsigned)getpid(), fname,
+ smbcli_errstr(cli->tree)));
torture_comment(tctx, "pid %u: open %d\n", (unsigned)getpid(), i);