selftests/powerpc: Skip test instead of failing
authorBreno Leitao <leitao@debian.org>
Wed, 31 Oct 2018 14:38:22 +0000 (11:38 -0300)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 25 Nov 2018 06:11:22 +0000 (17:11 +1100)
commiteafcd8e3fbad4f426a40ed2b6a8c697c3a4ef36a
tree19b94344fea99d8ad150cb0d0d11d357d97ce74e
parente653b6567e9c1854f51fb649c676499498560977
selftests/powerpc: Skip test instead of failing

Current core-pkey selftest fails if the test runs without privileges to
write into the core pattern file (/proc/sys/kernel/core_pattern). This
causes the test to fail and give the impression that the subsystem being
tested is broken, when, in fact, the test is being executed without the
proper privileges. This is the current error:

test: core_pkey
tags: git_version:v4.19-3-g9e3363be9bce-dirty
Error writing to core_pattern file: Permission denied
failure: core_pkey

This patch simply skips this test if it runs without the proper privileges,
avoiding this undesired failure.

CC: Tyrel Datwyler <tyreld@linux.vnet.ibm.com>
CC: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Breno Leitao <leitao@debian.org>
Reviewed-by: Thiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/ptrace/core-pkey.c