summaryrefslogtreecommitdiff
path: root/lib/torture
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2014-08-20 15:25:17 +0200
committerMartin Schwenke <martins@samba.org>2014-09-08 04:21:52 +0200
commitb760056f84606857494146b13fdcfc990e426f83 (patch)
tree47685c9c1c43e068942fb765ec4824e53aa27f82 /lib/torture
parent8c3e0f84ccafc6751777a9fa09a21d7be9af32cd (diff)
downloadsamba-b760056f84606857494146b13fdcfc990e426f83.tar.gz
torture: fix whitespace/tab mixup in internal_torture_run_test()
No diff visible with "git show|diff -w". Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Martin Schwenke <martin@meltin.net> Autobuild-User(master): Martin Schwenke <martins@samba.org> Autobuild-Date(master): Mon Sep 8 04:21:52 CEST 2014 on sn-devel-104
Diffstat (limited to 'lib/torture')
-rw-r--r--lib/torture/torture.c44
1 files changed, 22 insertions, 22 deletions
diff --git a/lib/torture/torture.c b/lib/torture/torture.c
index 1b0a9564db2..ff2f8c89399 100644
--- a/lib/torture/torture.c
+++ b/lib/torture/torture.c
@@ -400,7 +400,7 @@ static bool test_needs_running(const char *name, const char **restricted)
return false;
}
-static bool internal_torture_run_test(struct torture_context *context,
+static bool internal_torture_run_test(struct torture_context *context,
struct torture_tcase *tcase,
struct torture_test *test,
bool already_setup,
@@ -409,7 +409,7 @@ static bool internal_torture_run_test(struct torture_context *context,
bool success;
char *subunit_testname = NULL;
- if (tcase == NULL || strcmp(test->name, tcase->name) != 0) {
+ if (tcase == NULL || strcmp(test->name, tcase->name) != 0) {
subunit_testname = talloc_asprintf(context, "%s.%s", tcase->name, test->name);
} else {
subunit_testname = talloc_strdup(context, test->name);
@@ -426,39 +426,39 @@ static bool internal_torture_run_test(struct torture_context *context,
context->last_reason = NULL;
context->last_result = TORTURE_OK;
- if (!already_setup && tcase->setup &&
- !tcase->setup(context, &(tcase->data))) {
- if (context->last_reason == NULL)
+ if (!already_setup && tcase->setup &&
+ !tcase->setup(context, &(tcase->data))) {
+ if (context->last_reason == NULL)
context->last_reason = talloc_strdup(context, "Setup failure");
context->last_result = TORTURE_ERROR;
success = false;
- } else if (test->dangerous &&
- !torture_setting_bool(context, "dangerous", false)) {
- context->last_result = TORTURE_SKIP;
- context->last_reason = talloc_asprintf(context,
- "disabled %s - enable dangerous tests to use", test->name);
- success = true;
+ } else if (test->dangerous &&
+ !torture_setting_bool(context, "dangerous", false)) {
+ context->last_result = TORTURE_SKIP;
+ context->last_reason = talloc_asprintf(context,
+ "disabled %s - enable dangerous tests to use", test->name);
+ success = true;
} else {
- success = test->run(context, tcase, test);
+ success = test->run(context, tcase, test);
- if (!success && context->last_result == TORTURE_OK) {
- if (context->last_reason == NULL)
- context->last_reason = talloc_strdup(context,
+ if (!success && context->last_result == TORTURE_OK) {
+ if (context->last_reason == NULL)
+ context->last_reason = talloc_strdup(context,
"Unknown error/failure. Missing torture_fail() or torture_assert_*() call?");
- context->last_result = TORTURE_ERROR;
- }
+ context->last_result = TORTURE_ERROR;
+ }
}
if (!already_setup && tcase->teardown && !tcase->teardown(context, tcase->data)) {
- if (context->last_reason == NULL)
- context->last_reason = talloc_strdup(context, "Setup failure");
- context->last_result = TORTURE_ERROR;
+ if (context->last_reason == NULL)
+ context->last_reason = talloc_strdup(context, "Setup failure");
+ context->last_result = TORTURE_ERROR;
success = false;
}
- torture_ui_test_result(context, context->last_result,
+ torture_ui_test_result(context, context->last_result,
context->last_reason);
-
+
talloc_free(context->last_reason);
context->active_test = NULL;