Linux Kernel Selftest development
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: Mark Brown <broonie@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>, Shuah Khan <shuah@kernel.org>
Cc: Shuah Khan <skhan@linuxfoundation.org>,
	linux-arm-kernel@lists.infradead.org,
	linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kselftest/arm64: Actually test SME vector length changes via sigreturn
Date: Fri, 30 Aug 2024 10:57:56 +0100	[thread overview]
Message-ID: <ea224d97-44bb-45d0-b7f1-71e6287d8a8f@arm.com> (raw)
In-Reply-To: <20240829-arm64-sme-signal-vl-change-test-v1-1-42d7534cb818@kernel.org>

Hi,

On 29/08/2024 18:20, Mark Brown wrote:
> The test case for SME vector length changes via sigreturn use a bit too
> much cut'n'paste and only actually changed the SVE vector length in the
> test itself. Andre's recent factoring out of the initialisation code caused
> this to be exposed and the test to start failing. Fix the test to actually
> cover the thing it's supposed to test.

Yes, I came to the same conclusion. The device I tested the original 
patch on only had one VL, so the whole test was skipped, and I didn't 
see the problem. Now re-tested on the FVP.

> Fixes: 4963aeb35a9e ("kselftest/arm64: signal: Add SME signal handling tests")
> Signed-off-by: Mark Brown <broonie@kernel.org>

Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Tested-by: Andre Przywara <andre.przywara@arm.com>

Thanks,
Andre.

> ---
>   .../arm64/signal/testcases/fake_sigreturn_sme_change_vl.c  | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
> 
> diff --git a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c
> index cb8c051b5c8f..dfd6a2badf9f 100644
> --- a/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c
> +++ b/tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c
> @@ -35,30 +35,30 @@ static int fake_sigreturn_ssve_change_vl(struct tdescr *td,
>   {
>   	size_t resv_sz, offset;
>   	struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf);
> -	struct sve_context *sve;
> +	struct za_context *za;
>   
>   	/* Get a signal context with a SME ZA frame in it */
>   	if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
>   		return 1;
>   
>   	resv_sz = GET_SF_RESV_SIZE(sf);
> -	head = get_header(head, SVE_MAGIC, resv_sz, &offset);
> +	head = get_header(head, ZA_MAGIC, resv_sz, &offset);
>   	if (!head) {
> -		fprintf(stderr, "No SVE context\n");
> +		fprintf(stderr, "No ZA context\n");
>   		return 1;
>   	}
>   
> -	if (head->size != sizeof(struct sve_context)) {
> +	if (head->size != sizeof(struct za_context)) {
>   		fprintf(stderr, "Register data present, aborting\n");
>   		return 1;
>   	}
>   
> -	sve = (struct sve_context *)head;
> +	za = (struct za_context *)head;
>   
>   	/* No changes are supported; init left us at minimum VL so go to max */
>   	fprintf(stderr, "Attempting to change VL from %d to %d\n",
> -		sve->vl, vls[0]);
> -	sve->vl = vls[0];
> +		za->vl, vls[0]);
> +	za->vl = vls[0];
>   
>   	fake_sigreturn(&sf, sizeof(sf), 0);
>   
> 
> ---
> base-commit: b18bbfc14a38b5234e09c2adcf713e38063a7e6e
> change-id: 20240829-arm64-sme-signal-vl-change-test-cebe4035856a
> 
> Best regards,

  reply	other threads:[~2024-08-30  9:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-29 17:20 [PATCH] kselftest/arm64: Actually test SME vector length changes via sigreturn Mark Brown
2024-08-30  9:57 ` Andre Przywara [this message]
2024-08-30 16:12 ` Will Deacon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ea224d97-44bb-45d0-b7f1-71e6287d8a8f@arm.com \
    --to=andre.przywara@arm.com \
    --cc=broonie@kernel.org \
    --cc=catalin.marinas@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=shuah@kernel.org \
    --cc=skhan@linuxfoundation.org \
    --cc=will@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox