Skip to content

Commit 9331a60

Browse files
brooniectmarinas
authored andcommitted
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: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent 18edbb6 commit 9331a60

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

tools/testing/selftests/arm64/signal/test_signals_utils.c

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -310,14 +310,12 @@ int test_setup(struct tdescr *td)
310310

311311
int test_run(struct tdescr *td)
312312
{
313-
if (td->sig_trig) {
314-
if (td->trigger)
315-
return td->trigger(td);
316-
else
317-
return default_trigger(td);
318-
} else {
313+
if (td->trigger)
314+
return td->trigger(td);
315+
else if (td->sig_trig)
316+
return default_trigger(td);
317+
else
319318
return td->run(td, NULL, NULL);
320-
}
321319
}
322320

323321
void test_result(struct tdescr *td)

0 commit comments

Comments
 (0)