aboutsummaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/powerpc/copyloops/Makefile
diff options
context:
space:
mode:
authorMichael Ellerman <mpe@ellerman.id.au>2018-08-03 20:13:05 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2018-08-08 00:32:35 +1000
commit2679f63fe5e4bb1459a0c20859a99c70c15d5ea1 (patch)
tree19a843ace4fd633800529e9f44e77d583f7fd464 /tools/testing/selftests/powerpc/copyloops/Makefile
parentselftests/powerpc/64: Test all paths through copy routines (diff)
downloadlinux-dev-2679f63fe5e4bb1459a0c20859a99c70c15d5ea1.tar.xz
linux-dev-2679f63fe5e4bb1459a0c20859a99c70c15d5ea1.zip
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>
Diffstat (limited to 'tools/testing/selftests/powerpc/copyloops/Makefile')
-rw-r--r--tools/testing/selftests/powerpc/copyloops/Makefile12
1 files changed, 10 insertions, 2 deletions
diff --git a/tools/testing/selftests/powerpc/copyloops/Makefile b/tools/testing/selftests/powerpc/copyloops/Makefile
index 498d8d875ab8..1cf89a34d97c 100644
--- a/tools/testing/selftests/powerpc/copyloops/Makefile
+++ b/tools/testing/selftests/powerpc/copyloops/Makefile
@@ -12,9 +12,10 @@ ASFLAGS = $(CFLAGS) -Wa,-mpower4
TEST_GEN_PROGS := copyuser_64_t0 copyuser_64_t1 copyuser_64_t2 \
copyuser_p7_t0 copyuser_p7_t1 \
memcpy_64_t0 memcpy_64_t1 memcpy_64_t2 \
- memcpy_p7_t0 memcpy_p7_t1
+ memcpy_p7_t0 memcpy_p7_t1 \
+ copyuser_64_exc_t0 copyuser_64_exc_t1 copyuser_64_exc_t2
-EXTRA_SOURCES := validate.c ../harness.c
+EXTRA_SOURCES := validate.c ../harness.c stubs.S
include ../../lib.mk
@@ -42,3 +43,10 @@ $(OUTPUT)/memcpy_p7_t%: memcpy_power7.S $(EXTRA_SOURCES)
-D COPY_LOOP=test_memcpy_power7 \
-D SELFTEST_CASE=$(subst memcpy_p7_t,,$(notdir $@)) \
-o $@ $^
+
+$(OUTPUT)/copyuser_64_exc_t%: copyuser_64.S exc_validate.c ../harness.c \
+ copy_tofrom_user_reference.S stubs.S
+ $(CC) $(CPPFLAGS) $(CFLAGS) \
+ -D COPY_LOOP=test___copy_tofrom_user_base \
+ -D SELFTEST_CASE=$(subst copyuser_64_exc_t,,$(notdir $@)) \
+ -o $@ $^