[PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress

Mark Brown posted 6 patches 1 month ago
There is a newer version of this series
[PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress
Posted by Mark Brown 1 month ago
Currently in fp-stress we test signal delivery to the test threads by
sending SIGUSR2 which simply counts how many signals are delivered. The
test programs now also all have a SIGUSR1 handler which for the threads
doing userspace testing additionally modifies the floating point register
state in the signal handler, verifying that when we return the saved
register state is restored from the signal context as expected. Switch over
to triggering that to validate that we are restoring as expected.

Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/arm64/fp/fp-stress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c
index faac24bdefeb9436e2daf20b7250d0ae25ca23a7..3d477249dee0632b662b48582433d39323d18e18 100644
--- a/tools/testing/selftests/arm64/fp/fp-stress.c
+++ b/tools/testing/selftests/arm64/fp/fp-stress.c
@@ -221,7 +221,7 @@ static void child_output(struct child_data *child, uint32_t events,
 static void child_tickle(struct child_data *child)
 {
 	if (child->output_seen && !child->exited)
-		kill(child->pid, SIGUSR2);
+		kill(child->pid, SIGUSR1);
 }
 
 static void child_stop(struct child_data *child)

-- 
2.39.2
Re: [PATCH 6/6] kselftest/arm64: Test signal handler state modification in fp-stress
Posted by Mark Rutland 2 weeks, 5 days ago
On Wed, Oct 23, 2024 at 09:38:34PM +0100, Mark Brown wrote:
> Currently in fp-stress we test signal delivery to the test threads by
> sending SIGUSR2 which simply counts how many signals are delivered. The
> test programs now also all have a SIGUSR1 handler which for the threads
> doing userspace testing additionally modifies the floating point register
> state in the signal handler, verifying that when we return the saved
> register state is restored from the signal context as expected. Switch over
> to triggering that to validate that we are restoring as expected.
> 
> Signed-off-by: Mark Brown <broonie@kernel.org>

Acked-by: Mark Rutland <mark.rutland@arm.com>

Mark.

> ---
>  tools/testing/selftests/arm64/fp/fp-stress.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/arm64/fp/fp-stress.c b/tools/testing/selftests/arm64/fp/fp-stress.c
> index faac24bdefeb9436e2daf20b7250d0ae25ca23a7..3d477249dee0632b662b48582433d39323d18e18 100644
> --- a/tools/testing/selftests/arm64/fp/fp-stress.c
> +++ b/tools/testing/selftests/arm64/fp/fp-stress.c
> @@ -221,7 +221,7 @@ static void child_output(struct child_data *child, uint32_t events,
>  static void child_tickle(struct child_data *child)
>  {
>  	if (child->output_seen && !child->exited)
> -		kill(child->pid, SIGUSR2);
> +		kill(child->pid, SIGUSR1);
>  }
>  
>  static void child_stop(struct child_data *child)
> 
> -- 
> 2.39.2
>