summaryrefslogtreecommitdiff
path: root/source4/torture/local/idtree.c
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2006-06-16 22:06:09 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:09:09 -0500
commit582d46ec42144bddccddacadd52a0256f58cb453 (patch)
tree0545454b21f1ef986117f7c2e72fe957d2b662e2 /source4/torture/local/idtree.c
parentcc9d70bbba4e326ba89dec8cdc58b64b89f33091 (diff)
downloadsamba-582d46ec42144bddccddacadd52a0256f58cb453.tar.gz
samba-582d46ec42144bddccddacadd52a0256f58cb453.tar.bz2
samba-582d46ec42144bddccddacadd52a0256f58cb453.zip
r16304: Improve testing UI API. This now allows registering the full
test suite tree, looks a bit more like other unit testing API's, fixes some memory responsibility issues, introduces testcases, and removes the need for tests to call torture_ok(). (This used to be commit 0445b1a56a02552f895f400960b9ced39244a144)
Diffstat (limited to 'source4/torture/local/idtree.c')
-rw-r--r--source4/torture/local/idtree.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source4/torture/local/idtree.c b/source4/torture/local/idtree.c
index 8d776219db..a81eddedc3 100644
--- a/source4/torture/local/idtree.c
+++ b/source4/torture/local/idtree.c
@@ -24,7 +24,8 @@
#include "torture/torture.h"
#include "torture/ui.h"
-BOOL torture_local_idtree(struct torture_context *torture)
+static BOOL torture_local_idtree_simple(struct torture_context *test,
+ const void *_data)
{
struct idr_context *idr;
int i;
@@ -32,7 +33,6 @@ BOOL torture_local_idtree(struct torture_context *torture)
int *present;
extern int torture_numops;
int n = torture_numops;
- struct torture_test *test = torture_test(torture, "idtree", "idtree");
idr = idr_init(test);
@@ -90,7 +90,13 @@ BOOL torture_local_idtree(struct torture_context *torture)
torture_comment(test, "cleaned up");
- talloc_free(test);
+ return True;
+}
- return torture_result(torture);
+BOOL torture_local_idtree(struct torture_context *torture)
+{
+ struct torture_suite *suite = torture_suite_create(torture, "LOCAL-IDTREE");
+ torture_suite_add_simple_tcase(suite, "idtree", torture_local_idtree_simple,
+ NULL);
+ return torture_run_suite(torture, suite);
}