selftests/powerpc/64: Test exception cases in copy_tofrom_user
authorMichael Ellerman <mpe@ellerman.id.au>
Fri, 3 Aug 2018 10:13:05 +0000 (20:13 +1000)
committerMichael Ellerman <mpe@ellerman.id.au>
Tue, 7 Aug 2018 14:32:35 +0000 (00:32 +1000)
commit2679f63fe5e4bb1459a0c20859a99c70c15d5ea1
tree19a843ace4fd633800529e9f44e77d583f7fd464
parent98c45f51f767bfdd71d773cceaceb403352e51ae
selftests/powerpc/64: Test exception cases in copy_tofrom_user

This adds a set of test cases to test the behaviour of
copy_tofrom_user when exceptions are encountered accessing the
source or destination.  Currently, copy_tofrom_user does not always
copy as many bytes as possible when an exception occurs on a store
to the destination, and that is reflected in failures in these tests.

Based on a test program from Anton Blanchard.

[paulus@ozlabs.org - test all three paths, wrote commit description,
 made EX_TABLE create an exception table.]

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
tools/testing/selftests/powerpc/copyloops/.gitignore
tools/testing/selftests/powerpc/copyloops/Makefile
tools/testing/selftests/powerpc/copyloops/asm/ppc_asm.h
tools/testing/selftests/powerpc/copyloops/copy_tofrom_user_reference.S [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/exc_validate.c [new file with mode: 0644]
tools/testing/selftests/powerpc/copyloops/stubs.S [new file with mode: 0644]