git.samba.org
/
metze
/
samba
/
wip.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b7ad0c6
)
smbtorture: Make SAMBA3CASEINSENSITIVE report failures properly.
author
James Peach
<jpeach@samba.org>
Thu, 12 Aug 2010 21:31:52 +0000
(14:31 -0700)
committer
James Peach
<jpeach@samba.org>
Wed, 18 Aug 2010 03:19:35 +0000
(20:19 -0700)
source4/torture/raw/samba3misc.c
patch
|
blob
|
history
diff --git
a/source4/torture/raw/samba3misc.c
b/source4/torture/raw/samba3misc.c
index 603c9f6f03d4adaa46f3adb23b21555f66a27ede..a603111fa2d2518d07932bd58456c1908d3a0e70 100644
(file)
--- 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;
char *fpath;
int fnum;
int counter = 0;
- bool ret =
tru
e;
+ bool ret =
fals
e;
if (!(mem_ctx = talloc_init("torture_samba3_caseinsensitive"))) {
d_printf("talloc_init failed\n");
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);
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)) {
if (!NT_STATUS_IS_OK(status)) {
- d_printf("smbcli_mkdir failed: %s\n", nt_errstr(status));
goto done;
}
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) {
}
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;
}
smbcli_errstr(cli->tree));
goto done;
}
@@
-661,7
+662,8
@@
bool torture_samba3_caseinsensitive(struct torture_context *torture)
ret = true;
}
else {
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;
}
ret = false;
}