summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2011-03-17 12:25:25 +0100
committerGünther Deschner <gd@samba.org>2011-03-17 15:19:23 +0100
commit2aabdf5ab02487d0ca82046f4205ea17124e80a9 (patch)
treeb1d6696bb33af80a64da77ab4b58dad2f621fe0c /source4/torture
parentf76be33316b3078a3c68006da8550c91d16aad04 (diff)
downloadsamba-2aabdf5ab02487d0ca82046f4205ea17124e80a9.tar.gz
s4-smbtorture: more torture_fail usage in raw.write test.
Guenther Autobuild-User: Günther Deschner <gd@samba.org> Autobuild-Date: Thu Mar 17 13:10:14 CET 2011 on sn-devel-104 (cherry picked from commit 717beda638e84902ef9b78eb37e0d8e85672ffd3)
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/write.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source4/torture/raw/write.c b/source4/torture/raw/write.c
index d3d21c58a74..8e564d75632 100644
--- a/source4/torture/raw/write.c
+++ b/source4/torture/raw/write.c
@@ -27,16 +27,16 @@
#define CHECK_STATUS(status, correct) do { \
if (!NT_STATUS_EQUAL(status, correct)) { \
- torture_comment(tctx, "(%s) Incorrect status %s - should be %s\n", \
- __location__, nt_errstr(status), nt_errstr(correct)); \
+ torture_fail(tctx, talloc_asprintf(tctx, "(%s) Incorrect status %s - should be %s\n", \
+ __location__, nt_errstr(status), nt_errstr(correct))); \
ret = false; \
goto done; \
}} while (0)
#define CHECK_VALUE(v, correct) do { \
if ((v) != (correct)) { \
- torture_comment(tctx, "(%s) Incorrect value %s=%d - should be %d\n", \
- __location__, #v, v, correct); \
+ torture_fail(tctx, talloc_asprintf(tctx, "(%s) Incorrect value %s=%d - should be %d\n", \
+ __location__, #v, v, correct)); \
ret = false; \
goto done; \
}} while (0)
@@ -84,8 +84,8 @@ static bool check_buffer(struct torture_context *tctx,
for (i=0;i<len;i++) {
uint8_t v = random();
if (buf[i] != v) {
- torture_comment(tctx, "Buffer incorrect at %s! ofs=%d buf=0x%x correct=0x%x\n",
- location, i, buf[i], v);
+ torture_fail(tctx, talloc_asprintf(tctx, "Buffer incorrect at %s! ofs=%d buf=0x%x correct=0x%x\n",
+ location, i, buf[i], v));
return false;
}
}