diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2006-10-16 13:06:41 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:21:12 -0500 |
commit | 8773e743c518578584d07d35ffdafdd598af88b0 (patch) | |
tree | 89726232dd6ae9eca1c219e21729a9b2336ddaa9 /source4/torture/local/dbspeed.c | |
parent | 0f2347e417dec4a50f95d64353b260cd53a44a2b (diff) | |
download | samba-8773e743c518578584d07d35ffdafdd598af88b0.tar.gz samba-8773e743c518578584d07d35ffdafdd598af88b0.tar.bz2 samba-8773e743c518578584d07d35ffdafdd598af88b0.zip |
r19339: Merge my 4.0-unittest branch. This adds an API for more fine-grained
output in the testsuite rather than just True or False for a
set of tests.
The aim is to use this for:
* known failure lists (run all tests and detect tests that
started working or started failing). This
would allow us to get rid of the RPC-SAMBA3-* tests
* nicer torture output
* simplification of the testsuite system
* compatibility with other unit testing systems
* easier usage of smbtorture (being able to run one test
and automatically set up the environment for that)
This is still a work-in-progress; expect more updates over the next couple of
days.
(This used to be commit 0eb6097305776325c75081356309115f445a7218)
Diffstat (limited to 'source4/torture/local/dbspeed.c')
-rw-r--r-- | source4/torture/local/dbspeed.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/source4/torture/local/dbspeed.c b/source4/torture/local/dbspeed.c index 10620440ce..757c13cf6e 100644 --- a/source4/torture/local/dbspeed.c +++ b/source4/torture/local/dbspeed.c @@ -73,13 +73,13 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data) if (!tdb_add_record(tdbw, "S-1-5-21-53173311-3623041448-2049097239-%u", "UID %u", i)) { - torture_fail(torture, "Failed to add SID %d", i); + _torture_fail_ext(torture, "Failed to add SID %d", i); goto failed; } if (!tdb_add_record(tdbw, "UID %u", "S-1-5-21-53173311-3623041448-2049097239-%u", i)) { - torture_fail(torture, "Failed to add UID %d", i); + _torture_fail_ext(torture, "Failed to add UID %d", i); goto failed; } } @@ -95,7 +95,7 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data) key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); if (data.dptr == NULL) { - torture_fail(torture, "Failed to fetch SID %d", i); + _torture_fail_ext(torture, "Failed to fetch SID %d", i); goto failed; } free(data.dptr); @@ -103,7 +103,7 @@ static BOOL test_tdb_speed(struct torture_context *torture, const void *_data) key.dsize = strlen((char *)key.dptr)+1; data = tdb_fetch(tdbw->tdb, key); if (data.dptr == NULL) { - torture_fail(torture, "Failed to fetch UID %d", i); + _torture_fail_ext(torture, "Failed to fetch UID %d", i); goto failed; } free(data.dptr); @@ -186,13 +186,13 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data) for (i=0;i<torture_entries;i++) { if (!ldb_add_record(ldb, i)) { - torture_fail(torture, "Failed to add SID %d", i); + _torture_fail_ext(torture, "Failed to add SID %d", i); goto failed; } } if (talloc_total_blocks(torture) > 100) { - torture_fail(torture, "memory leak in ldb add"); + _torture_fail_ext(torture, "memory leak in ldb add"); goto failed; } @@ -210,14 +210,16 @@ static BOOL test_ldb_speed(struct torture_context *torture, const void *_data) i); if (ldb_search(ldb, dn, LDB_SCOPE_BASE, NULL, NULL, &res) != LDB_SUCCESS || res->count != 1) { - torture_fail(torture, "Failed to find SID %d", i); + torture_fail(torture, talloc_asprintf(torture, + "Failed to find SID %d", i)); } talloc_free(res); talloc_free(dn); expr = talloc_asprintf(tmp_ctx, "(UID=%u)", i); if (ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res) != LDB_SUCCESS || res->count != 1) { - torture_fail(torture, "Failed to find UID %d", i); + torture_fail(torture, talloc_asprintf(torture, + "Failed to find UID %d", i)); } talloc_free(res); talloc_free(expr); |