Skip to content

Commit 7368deb

Browse files
brooniectmarinas
authored andcommitted
kselftest/arm64: Provide a SIGUSR1 handler in the kernel mode FP stress test
The other stress test programs provide a SIGUSR1 handler which modifies the live register state in order to validate that signal context is being restored during signal return. While we can't usefully do this when testing kernel mode FP usage provide a handler for SIGUSR1 which just counts the number of signals like we do for SIGUSR2, allowing fp-stress to treat all the test programs uniformly. Acked-by: Mark Rutland <[email protected]> Signed-off-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Catalin Marinas <[email protected]>
1 parent d65f27d commit 7368deb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tools/testing/selftests/arm64/fp/kernel-test.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,10 @@ int main(void)
267267
strerror(errno), errno);
268268

269269
sa.sa_sigaction = handle_kick_signal;
270+
ret = sigaction(SIGUSR1, &sa, NULL);
271+
if (ret < 0)
272+
printf("Failed to install SIGUSR1 handler: %s (%d)\n",
273+
strerror(errno), errno);
270274
ret = sigaction(SIGUSR2, &sa, NULL);
271275
if (ret < 0)
272276
printf("Failed to install SIGUSR2 handler: %s (%d)\n",

0 commit comments

Comments
 (0)