Commit 50806fd9 authored by Mark Brown's avatar Mark Brown Committed by Catalin Marinas

kselftest/arm64: Skip VL_INHERIT tests for unsupported vector types

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: 0ba1ce1e ("selftests: arm64: Add coverage of ptrace flags for SVE VL inheritance")
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
Reviewed-by: default avatarShuah Khan <skhan@linuxfoundation.org>
Link: https://lore.kernel.org/r/20220124175527.3260234-2-broonie@kernel.orgSigned-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
parent 3758a6c7
...@@ -557,7 +557,14 @@ static int do_parent(pid_t child) ...@@ -557,7 +557,14 @@ static int do_parent(pid_t child)
} }
/* prctl() flags */ /* 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 */ /* Step through every possible VQ */
for (vq = SVE_VQ_MIN; vq <= SVE_VQ_MAX; vq++) { for (vq = SVE_VQ_MIN; vq <= SVE_VQ_MAX; vq++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment