aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64/signal/test_signals.c
diff options
context:
space:
mode:
authorCristian Marussi <cristian.marussi@arm.com>2019-10-25 18:57:10 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2019-11-08 11:10:39 +0000
commit837387a2cbc719667822856beabac127921a36c4 (patch)
treecbdebd0ba4f4e8ee7e70f9685b72844e3a3f889d /tools/testing/selftests/arm64/signal/test_signals.c
parentkselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] (diff)
downloadlinux-dev-837387a2cbc719667822856beabac127921a36c4.tar.xz
linux-dev-837387a2cbc719667822856beabac127921a36c4.zip
kselftest: arm64: extend test_init functionalities
Extend signal testing framework to allow the definition of a custom per test initialization function to be run at the end of the common test_init after test setup phase has completed and before test-run routine. This custom per-test initialization function also enables the test writer to decide on its own when forcibly skip the test itself using standard KSFT mechanism. Reviewed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Cristian Marussi <cristian.marussi@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64/signal/test_signals.c')
-rw-r--r--tools/testing/selftests/arm64/signal/test_signals.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/arm64/signal/test_signals.c b/tools/testing/selftests/arm64/signal/test_signals.c
index cb970346b280..416b1ff43199 100644
--- a/tools/testing/selftests/arm64/signal/test_signals.c
+++ b/tools/testing/selftests/arm64/signal/test_signals.c
@@ -19,11 +19,11 @@ int main(int argc, char *argv[])
current = &tde;
ksft_print_msg("%s :: %s\n", current->name, current->descr);
- if (test_setup(current)) {
+ if (test_setup(current) && test_init(current)) {
test_run(current);
- test_result(current);
test_cleanup(current);
}
+ test_result(current);
- return current->pass ? KSFT_PASS : KSFT_FAIL;
+ return current->result;
}