summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/torture/ui.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/source4/torture/ui.c b/source4/torture/ui.c
index aca6934c90..81d787b878 100644
--- a/source4/torture/ui.c
+++ b/source4/torture/ui.c
@@ -162,6 +162,10 @@ static BOOL internal_torture_run_test(struct torture_context *context,
context->last_result = TORTURE_OK;
ret = test->run(context, !already_setup?data:tcase_data, test->data);
+ if (!ret) {
+ context->last_reason = talloc_strdup(context, "...");
+ context->last_result = TORTURE_FAIL;
+ }
if (context->ui_ops->test_result)
context->ui_ops->test_result(context, context->last_result,
@@ -259,8 +263,8 @@ struct torture_tcase *torture_suite_add_simple_tcase(
tcase = torture_suite_add_tcase(suite, name);
tcase->data = data;
-
- torture_tcase_add_test(tcase, "Test", simple_tcase_helper, run);
+
+ torture_tcase_add_test(tcase, name, simple_tcase_helper, run);
return tcase;
}