summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/sparc64/Makefile
diff options
context:
space:
mode:
authorTom Hromatka <tom.hromatka@oracle.com>2018-04-26 19:54:09 +0300
committerDavid S. Miller <davem@davemloft.net>2018-06-05 21:24:55 +0300
commit3c545084130c1fd5cf873a5fec3ee29070128e06 (patch)
tree294394123558024171b2c509399d301a693ea0f1 /tools/testing/selftests/sparc64/Makefile
parent873c38a4249c9204f7b13e782d1ad0d8767aa22a (diff)
downloadlinux-3c545084130c1fd5cf873a5fec3ee29070128e06.tar.xz
selftests: sparc64: char: Selftest for privileged ADI driver
Add a selftest for the sparc64 privileged ADI driver. These tests verify the read(), pread(), write(), pwrite(), and seek() functionality of the driver. The tests also report simple performance statistics: Syscall Call AvgTime AvgSize Count (ticks) (bytes) ------------------------------- read 3 119638 8133 pread 4 118164 6741 write 3 339442 8133 pwrite 4 280134 6741 seek 10 2919 0 Pass 8 Fail 0 Xfail 0 Xpass 0 Skip 0 Error 0 Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com> Reviewed-by: Allen Pais <allen.pais@oracle.com> Reviewed-by: Shuah Khan (Samsung OSG) <shuah@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools/testing/selftests/sparc64/Makefile')
-rw-r--r--tools/testing/selftests/sparc64/Makefile46
1 files changed, 46 insertions, 0 deletions
diff --git a/tools/testing/selftests/sparc64/Makefile b/tools/testing/selftests/sparc64/Makefile
new file mode 100644
index 000000000000..2082eeffd779
--- /dev/null
+++ b/tools/testing/selftests/sparc64/Makefile
@@ -0,0 +1,46 @@
+SUBDIRS := drivers
+
+TEST_PROGS := run.sh
+
+.PHONY: all clean
+
+include ../lib.mk
+
+all:
+ @for DIR in $(SUBDIRS); do \
+ BUILD_TARGET=$(OUTPUT)/$$DIR; \
+ mkdir $$BUILD_TARGET -p; \
+ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
+ #SUBDIR test prog name should be in the form: SUBDIR_test.sh \
+ TEST=$$DIR"_test.sh"; \
+ if [ -e $$DIR/$$TEST ]; then \
+ rsync -a $$DIR/$$TEST $$BUILD_TARGET/; \
+ fi \
+ done
+
+override define RUN_TESTS
+ @cd $(OUTPUT); ./run.sh
+endef
+
+override define INSTALL_RULE
+ mkdir -p $(INSTALL_PATH)
+ install -t $(INSTALL_PATH) $(TEST_PROGS) $(TEST_PROGS_EXTENDED) $(TEST_FILES)
+
+ @for SUBDIR in $(SUBDIRS); do \
+ BUILD_TARGET=$(OUTPUT)/$$SUBDIR; \
+ mkdir $$BUILD_TARGET -p; \
+ $(MAKE) OUTPUT=$$BUILD_TARGET -C $$SUBDIR INSTALL_PATH=$(INSTALL_PATH)/$$SUBDIR install; \
+ done;
+endef
+
+override define EMIT_TESTS
+ echo "./run.sh"
+endef
+
+override define CLEAN
+ @for DIR in $(SUBDIRS); do \
+ BUILD_TARGET=$(OUTPUT)/$$DIR; \
+ mkdir $$BUILD_TARGET -p; \
+ make OUTPUT=$$BUILD_TARGET -C $$DIR $@;\
+ done
+endef