Skip to content

Commit

Permalink
kselftest/arm64: Skip VL_INHERIT tests for unsupported vector types
Browse files Browse the repository at this point in the history
Currently we unconditionally test the ability to set the vector length
inheritance flag via ptrace meaning that we generate false failures on
systems that don't support SVE when we attempt to set the vector length
there. Check the hwcap and mark the tests as skipped when it's not present.

Fixes: 0ba1ce1 ("selftests: arm64: Add coverage of ptrace flags for SVE VL inheritance")
Signed-off-by: Mark Brown <[email protected]>
Reviewed-by: Shuah Khan <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Catalin Marinas <[email protected]>
  • Loading branch information
broonie authored and ctmarinas committed Jan 28, 2022
1 parent 3758a6c commit 50806fd
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion tools/testing/selftests/arm64/fp/sve-ptrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,14 @@ static int do_parent(pid_t child)
}

/* prctl() flags */
ptrace_set_get_inherit(child, &vec_types[i]);
if (getauxval(vec_types[i].hwcap_type) & vec_types[i].hwcap) {
ptrace_set_get_inherit(child, &vec_types[i]);
} else {
ksft_test_result_skip("%s SVE_PT_VL_INHERIT set\n",
vec_types[i].name);
ksft_test_result_skip("%s SVE_PT_VL_INHERIT cleared\n",
vec_types[i].name);
}

/* Step through every possible VQ */
for (vq = SVE_VQ_MIN; vq <= SVE_VQ_MAX; vq++) {
Expand Down

0 comments on commit 50806fd

Please sign in to comment.