summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/local/dbspeed.c9
-rw-r--r--source4/torture/local/event.c3
-rw-r--r--source4/torture/local/iconv.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c
index 298c5e3a2a..ba2517e24d 100644
--- a/source4/torture/local/dbspeed.c
+++ b/source4/torture/local/dbspeed.c
@@ -63,8 +63,9 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data)
tdbw = tdb_wrap_open(tmp_ctx, "test.tdb",
10000, 0, O_RDWR|O_CREAT|O_TRUNC, 0600);
if (!tdbw) {
+ unlink("test.tdb");
+ talloc_free(tmp_ctx);
torture_fail(torture, "Failed to open test.tdb");
- goto failed;
}
torture_comment(torture, "Adding %d SID records\n", torture_entries);
@@ -171,8 +172,9 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data)
ldb = ldb_wrap_connect(tmp_ctx, "tdb://test.ldb",
NULL, NULL, LDB_FLG_NOSYNC, NULL);
if (!ldb) {
+ unlink("./test.ldb");
+ talloc_free(tmp_ctx);
torture_fail(torture, "Failed to open test.ldb");
- goto failed;
}
/* add an index */
@@ -220,8 +222,9 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data)
}
if (talloc_total_blocks(torture) > 100) {
+ unlink("./test.ldb");
+ talloc_free(tmp_ctx);
torture_fail(torture, "memory leak in ldb search");
- goto failed;
}
torture_comment(torture, "ldb speed %.2f ops/sec\n", count/timeval_elapsed(&tv));
diff --git a/source4/torture/local/event.c b/source4/torture/local/event.c
index 383e959183..740e2addfe 100644
--- a/source4/torture/local/event.c
+++ b/source4/torture/local/event.c
@@ -99,9 +99,8 @@ static bool test_event_context(struct torture_context *test,
t = timeval_current();
while (!finished) {
if (event_loop_once(ev_ctx) == -1) {
- torture_fail(test, "Failed event loop\n");
talloc_free(ev_ctx);
- return False;
+ torture_fail(test, "Failed event loop\n");
}
}
diff --git a/source4/torture/local/iconv.c b/source4/torture/local/iconv.c
index 45c01221d7..87056d1b95 100644
--- a/source4/torture/local/iconv.c
+++ b/source4/torture/local/iconv.c
@@ -135,8 +135,6 @@ static bool test_buffer(struct torture_context *test,
talloc_asprintf(test,
"failed to open %s to UTF-16LE",
charset));
- cd = NULL;
- return false;
}
cd2 = smb_iconv_open(charset, "UTF-16LE");
cd3 = smb_iconv_open("UTF-16LE", charset);
@@ -246,11 +244,11 @@ static bool test_buffer(struct torture_context *test,
torture_comment(test, "pull bytes mismatch:");
show_buf("inbuf", inbuf, size);
show_buf(" buf3", buf3, sizeof(buf3) - outsize3);
- torture_fail(test, "");
torture_comment(test, "next codepoint is %u\n",
get_codepoint((char *)(inbuf+sizeof(buf3) - outsize3),
size - (sizeof(buf3) - outsize3),
"UTF-16LE"));
+ torture_fail(test, "");
}
return true;