Commit 9331a604 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas

kselftest/arm64: Allow signal tests to trigger from a function

Currently we have the facility to specify custom code to trigger a signal
but none of the tests use it and for some reason the framework requires us
to also specify a signal to send as a trigger in order to make use of a
custom trigger. This doesn't seem to make much sense, instead allow the
use of a custom trigger function without specifying a signal to inject.
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Link: https://lore.kernel.org/r/20211210184133.320748-6-broonie@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 18edbb6b
...@@ -310,14 +310,12 @@ int test_setup(struct tdescr *td) ...@@ -310,14 +310,12 @@ int test_setup(struct tdescr *td)
int test_run(struct tdescr *td) int test_run(struct tdescr *td)
{ {
if (td->sig_trig) { if (td->trigger)
if (td->trigger) return td->trigger(td);
return td->trigger(td); else if (td->sig_trig)
else return default_trigger(td);
return default_trigger(td); else
} else {
return td->run(td, NULL, NULL); return td->run(td, NULL, NULL);
}
} }
void test_result(struct tdescr *td) void test_result(struct tdescr *td)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment