summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2020-08-19 11:57:23 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2020-09-08 22:24:02 +1000
commit4c3c3c502575556c4bc1b401235e641863b1bce6 (patch)
treef9e0349a566c4d64f4fb23e3a4e7f9e3c393874d /tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
parent178282a054dced1a08a9683d41ac08cbace2b2fe (diff)
downloadlinux-4c3c3c502575556c4bc1b401235e641863b1bce6.tar.bz2
selftests/powerpc: Don't run DSCR tests on old systems
The DSCR tests fail on systems that don't have DSCR, so check for the DSCR in hwcap and skip if it's not present. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20200819015727.1977134-5-mpe@ellerman.id.au
Diffstat (limited to 'tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c')
-rw-r--r--tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c b/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
index 7c1cb46397c6..c6a81b2d6b91 100644
--- a/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
+++ b/tools/testing/selftests/powerpc/dscr/dscr_inherit_exec_test.c
@@ -44,6 +44,8 @@ int dscr_inherit_exec(void)
unsigned long i, dscr = 0;
pid_t pid;
+ SKIP_IF(!have_hwcap2(PPC_FEATURE2_DSCR));
+
for (i = 0; i < COUNT; i++) {
dscr++;
if (dscr > DSCR_MAX)