aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/arm64
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2022-09-21 19:13:43 +0100
committerCatalin Marinas <catalin.marinas@arm.com>2022-09-29 18:12:37 +0100
commitc38d381fff26ece271447d558dcb4b42f0ccda51 (patch)
tree7fb57cebbb7c531920eabe002643c37ca93ad10e /tools/testing/selftests/arm64
parentkselftest/arm64: Don't enable v8.5 for MTE selftest builds (diff)
downloadlinux-dev-c38d381fff26ece271447d558dcb4b42f0ccda51.tar.xz
linux-dev-c38d381fff26ece271447d558dcb4b42f0ccda51.zip
kselftest/arm64: Don't repeat termination handler for fp-stress
When fp-stress gets a termination signal it sets a flag telling itself to exit and sends a termination signal to all the children. If the flag is set then don't bother repeating this process, it isn't going to accomplish anything other than consume CPU time which can be an issue when running in emulation. Signed-off-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220921181345.618085-2-broonie@kernel.org Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools/testing/selftests/arm64')
-rw-r--r--tools/testing/selftests/arm64/fp/fp-stress.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c
index a5c0ebef2419..4387c3cacaa7 100644
--- a/tools/testing/selftests/arm64/fp/fp-stress.c
+++ b/tools/testing/selftests/arm64/fp/fp-stress.c
@@ -255,6 +255,10 @@ static void handle_exit_signal(int sig, siginfo_t *info, void *context)
{
int i;
+ /* If we're already exiting then don't signal again */
+ if (terminate)
+ return;
+
ksft_print_msg("Got signal, exiting...\n");
terminate = true;