Skip to content

Commit 6f03153

Browse files
brooniewilldeacon
authored andcommitted
kselftest/arm64: Actually test SME vector length changes via sigreturn
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. Fixes: 4963aeb ("kselftest/arm64: signal: Add SME signal handling tests") Signed-off-by: Mark Brown <[email protected]> Reviewed-by: Andre Przywara <[email protected]> Tested-by: Andre Przywara <[email protected]> Link: https://lore.kernel.org/r/20240829-arm64-sme-signal-vl-change-test-v1-1-42d7534cb818@kernel.org Signed-off-by: Will Deacon <[email protected]>
1 parent 5225b65 commit 6f03153

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

tools/testing/selftests/arm64/signal/testcases/fake_sigreturn_sme_change_vl.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,30 +35,30 @@ static int fake_sigreturn_ssve_change_vl(struct tdescr *td,
3535
{
3636
size_t resv_sz, offset;
3737
struct _aarch64_ctx *head = GET_SF_RESV_HEAD(sf);
38-
struct sve_context *sve;
38+
struct za_context *za;
3939

4040
/* Get a signal context with a SME ZA frame in it */
4141
if (!get_current_context(td, &sf.uc, sizeof(sf.uc)))
4242
return 1;
4343

4444
resv_sz = GET_SF_RESV_SIZE(sf);
45-
head = get_header(head, SVE_MAGIC, resv_sz, &offset);
45+
head = get_header(head, ZA_MAGIC, resv_sz, &offset);
4646
if (!head) {
47-
fprintf(stderr, "No SVE context\n");
47+
fprintf(stderr, "No ZA context\n");
4848
return 1;
4949
}
5050

51-
if (head->size != sizeof(struct sve_context)) {
51+
if (head->size != sizeof(struct za_context)) {
5252
fprintf(stderr, "Register data present, aborting\n");
5353
return 1;
5454
}
5555

56-
sve = (struct sve_context *)head;
56+
za = (struct za_context *)head;
5757

5858
/* No changes are supported; init left us at minimum VL so go to max */
5959
fprintf(stderr, "Attempting to change VL from %d to %d\n",
60-
sve->vl, vls[0]);
61-
sve->vl = vls[0];
60+
za->vl, vls[0]);
61+
za->vl = vls[0];
6262

6363
fake_sigreturn(&sf, sizeof(sf), 0);
6464

0 commit comments

Comments
 (0)