diff options
author | Cristian Marussi <cristian.marussi@arm.com> | 2019-10-25 19:57:10 +0200 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2019-11-08 12:10:39 +0100 |
commit | 837387a2cbc719667822856beabac127921a36c4 (patch) | |
tree | cbdebd0ba4f4e8ee7e70f9685b72844e3a3f889d /tools/testing/selftests/arm64/signal/test_signals.h | |
parent | kselftest: arm64: mangle_pstate_invalid_mode_el[123][ht] (diff) | |
download | linux-837387a2cbc719667822856beabac127921a36c4.tar.xz linux-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.h')
-rw-r--r-- | tools/testing/selftests/arm64/signal/test_signals.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/testing/selftests/arm64/signal/test_signals.h b/tools/testing/selftests/arm64/signal/test_signals.h index d730e9041da9..c431e7b3e46c 100644 --- a/tools/testing/selftests/arm64/signal/test_signals.h +++ b/tools/testing/selftests/arm64/signal/test_signals.h @@ -68,17 +68,20 @@ struct tdescr { unsigned int timeout; bool triggered; bool pass; + unsigned int result; /* optional sa_flags for the installed handler */ int sa_flags; ucontext_t saved_uc; /* optional test private data */ void *priv; - /* a custom setup function to be called before test starts */ + /* a custom setup: called alternatively to default_setup */ int (*setup)(struct tdescr *td); + /* a custom init: called by default test init after test_setup */ + bool (*init)(struct tdescr *td); /* a custom cleanup function called before test exits */ void (*cleanup)(struct tdescr *td); - /* an optional function to be used as a trigger for test starting */ + /* an optional function to be used as a trigger for starting test */ int (*trigger)(struct tdescr *td); /* * the actual test-core: invoked differently depending on the |