summaryrefslogtreecommitdiff
path: root/source4/torture
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2010-08-12 14:31:52 -0700
committerJames Peach <jpeach@samba.org>2010-08-17 20:19:35 -0700
commiteffc61cb782a470a0a3dee317ad271e521f6c3be (patch)
tree76b3206c9a841669a089f3b630efcb2fe4902219 /source4/torture
parentb7ad0c6e394b09a8933080e966ba1c77575d9f31 (diff)
downloadsamba-effc61cb782a470a0a3dee317ad271e521f6c3be.tar.gz
samba-effc61cb782a470a0a3dee317ad271e521f6c3be.tar.bz2
samba-effc61cb782a470a0a3dee317ad271e521f6c3be.zip
smbtorture: Make SAMBA3CASEINSENSITIVE report failures properly.
Diffstat (limited to 'source4/torture')
-rw-r--r--source4/torture/raw/samba3misc.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/source4/torture/raw/samba3misc.c b/source4/torture/raw/samba3misc.c
index 603c9f6f03..a603111fa2 100644
--- a/source4/torture/raw/samba3misc.c
+++ b/source4/torture/raw/samba3misc.c
@@ -621,7 +621,7 @@ bool torture_samba3_caseinsensitive(struct torture_context *torture)
char *fpath;
int fnum;
int counter = 0;
- bool ret = true;
+ bool ret = false;
if (!(mem_ctx = talloc_init("torture_samba3_caseinsensitive"))) {
d_printf("talloc_init failed\n");
@@ -635,8 +635,8 @@ bool torture_samba3_caseinsensitive(struct torture_context *torture)
smbcli_deltree(cli->tree, dirname);
status = smbcli_mkdir(cli->tree, dirname);
+ torture_assert_ntstatus_ok(torture, status, "smbcli_mkdir failed");
if (!NT_STATUS_IS_OK(status)) {
- d_printf("smbcli_mkdir failed: %s\n", nt_errstr(status));
goto done;
}
@@ -645,7 +645,8 @@ bool torture_samba3_caseinsensitive(struct torture_context *torture)
}
fnum = smbcli_open(cli->tree, fpath, O_RDWR | O_CREAT, DENY_NONE);
if (fnum == -1) {
- d_printf("Could not create file %s: %s\n", fpath,
+ torture_result(torture, TORTURE_FAIL,
+ "Could not create file %s: %s", fpath,
smbcli_errstr(cli->tree));
goto done;
}
@@ -661,7 +662,8 @@ bool torture_samba3_caseinsensitive(struct torture_context *torture)
ret = true;
}
else {
- d_fprintf(stderr, "expected 3 entries, got %d\n", counter);
+ torture_result(torture, TORTURE_FAIL,
+ "expected 3 entries, got %d", counter);
ret = false;
}