-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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>
- Loading branch information
Tom Hromatka
authored and
David S. Miller
committed
Jun 5, 2018
1 parent
873c38a
commit 3c54508
Showing
7 changed files
with
817 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
adi-test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
|
||
INCLUDEDIR := -I. | ||
CFLAGS := $(CFLAGS) $(INCLUDEDIR) -Wall -O2 -g | ||
|
||
TEST_GEN_FILES := adi-test | ||
|
||
all: $(TEST_GEN_FILES) | ||
|
||
$(TEST_GEN_FILES): adi-test.c | ||
|
||
TEST_PROGS := drivers_test.sh | ||
|
||
include ../../lib.mk | ||
|
||
$(OUTPUT)/adi-test: adi-test.c |
Oops, something went wrong.