]> git.baikalelectronics.ru Git - kernel.git/commit
selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable
authorMichael Ellerman <mpe@ellerman.id.au>
Mon, 26 Feb 2018 04:22:22 +0000 (15:22 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Mar 2018 00:37:04 +0000 (11:37 +1100)
commitcc128b95686f15d79864f2a3c47f5bacfc784a86
tree43faf9b8906c7cc12ed01e060c856876e833e176
parente24a92b152780eaf977955f515cabb8e53e441ed
selftests/powerpc: Skip the subpage_prot tests if the syscall is unavailable

The subpage_prot syscall is only functional when the system is using
the Hash MMU. Since commit 9fc36f8de4e3 ("powerpc/mm: Invalidate
subpage_prot() system call on radix platforms") it returns ENOENT when
the Radix MMU is active. Currently this just makes the test fail.

Additionally the syscall is not available if the kernel is built with
4K pages, or if CONFIG_PPC_SUBPAGE_PROT=n, in which case it returns
ENOSYS because the syscall is missing entirely.

So check explicitly for ENOENT and ENOSYS and skip if we see either of
those.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/mm/subpage_prot.c