[PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace

Mark Brown posted 3 patches 6 months, 3 weeks ago
There is a newer version of this series
[PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace
Posted by Mark Brown 6 months, 3 weeks ago
The check that the new vector length we set was the expected one was typoed
to an assignment statement which for some reason the compilers didn't spot,
most likely due to the macros involved.

Fixes: 0dca276ac4d2 ("selftests: arm64: Add test for the SVE ptrace interface")
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c
index 577b6e05e860..c499d5789dd5 100644
--- a/tools/testing/selftests/arm64/fp/sve-ptrace.c
+++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c
@@ -253,7 +253,7 @@ static void ptrace_set_get_vl(pid_t child, const struct vec_type *type,
 		return;
 	}
 
-	ksft_test_result(new_sve->vl = prctl_vl, "Set %s VL %u\n",
+	ksft_test_result(new_sve->vl == prctl_vl, "Set %s VL %u\n",
 			 type->name, vl);
 
 	free(new_sve);

-- 
2.39.5
Re: [PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace
Posted by Dev Jain 6 months, 3 weeks ago
On 23/05/25 8:57 pm, Mark Brown wrote:
> The check that the new vector length we set was the expected one was typoed
> to an assignment statement which for some reason the compilers didn't spot,
> most likely due to the macros involved.
>
> Fixes: 0dca276ac4d2 ("selftests: arm64: Add test for the SVE ptrace interface")
> Signed-off-by: Mark Brown <broonie@kernel.org>

Acked-by: Dev Jain <dev.jain@arm.com>

>
Re: [PATCH 1/3] kselftest/arm64: Fix check for setting new VLs in sve-ptrace
Posted by Mark Rutland 6 months, 3 weeks ago
On Fri, May 23, 2025 at 04:27:12PM +0100, Mark Brown wrote:
> The check that the new vector length we set was the expected one was typoed
> to an assignment statement which for some reason the compilers didn't spot,
> most likely due to the macros involved.
> 
> Fixes: 0dca276ac4d2 ("selftests: arm64: Add test for the SVE ptrace interface")

I don't think that fixes tag is correct. AFAICT, this code was
introduced in commit:

  a1d7111257cd ("selftests: arm64: More comprehensively test the SVE ptrace interface")

... and there wasn't something equivalent prior to that.

With that fixed:

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

Mark.

> Signed-off-by: Mark Brown <broonie@kernel.org>
> ---
>  tools/testing/selftests/arm64/fp/sve-ptrace.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/arm64/fp/sve-ptrace.c b/tools/testing/selftests/arm64/fp/sve-ptrace.c
> index 577b6e05e860..c499d5789dd5 100644
> --- a/tools/testing/selftests/arm64/fp/sve-ptrace.c
> +++ b/tools/testing/selftests/arm64/fp/sve-ptrace.c
> @@ -253,7 +253,7 @@ static void ptrace_set_get_vl(pid_t child, const struct vec_type *type,
>  		return;
>  	}
>  
> -	ksft_test_result(new_sve->vl = prctl_vl, "Set %s VL %u\n",
> +	ksft_test_result(new_sve->vl == prctl_vl, "Set %s VL %u\n",
>  			 type->name, vl);
>  
>  	free(new_sve);
> 
> -- 
> 2.39.5
>