Commit graph

6 commits

Author SHA1 Message Date
Shuah Khan
08ca3510f7 selftests/sparc64: remove ARRAY_SIZE define from adi-test
ARRAY_SIZE is defined in several selftests. Remove definition from
individual test files and include header file for the define instead.
ARRAY_SIZE define is added in a separate patch to prepare for this
change.

Remove ARRAY_SIZE from adi-test and pickup the one defined in
kselftest.h.

Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2021-12-10 17:51:15 -07:00
Masahiro Yamada
d198b34f38 .gitignore: add SPDX License Identifier
Add SPDX License Identifier to all .gitignore files.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-25 11:50:48 +01:00
Shuah Khan (Samsung OSG)
eb83d5f7d0 selftests: sparc64: Add missing SPDX License Identifiers
Add missing SPDX License Identifiers to Makefile(s).

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-18 09:29:20 -06:00
Shuah Khan (Samsung OSG)
953c9d28d2 selftests: sparc64: delete RUN_TESTS and EMIT_TESTS overrides
Delete RUN_TESTS and EMIT_TESTS overrides and use common defines in
lib.mk. Common defines work just fine and there is no need to define
custom overrides.

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-18 09:29:14 -06:00
Shuah Khan (Samsung OSG)
3c62c91a36 selftests: sparc64: Fix to do nothing on non-sparc64
sparc64 test fails with the following errors on non-sparc64 systems. Fix
the Makefile to do nothing on non-sparc64 systems to suppress the errors:

make run_tests
adi-test.c: Assembler messages:
adi-test.c:302: Error: no such instruction: `rd %tick,%r13'
adi-test.c:304: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:190: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:192: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:273: Error: no such instruction: `rd %tick,%rbx'
adi-test.c:276: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:217: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:220: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:246: Error: no such instruction: `rd %tick,%rbp'
adi-test.c:248: Error: no such instruction: `rd %tick,%rdx'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
adi-test.c:79: Error: no such instruction: `rd %tick,%rax'
<builtin>: recipe for target 'adi-test' failed
make[1]: *** [adi-test] Error 1
adi: [FAIL]
./drivers_test.sh: 24: ./drivers_test.sh: ./adi-test: not found
../lib.mk:73: recipe for target 'run_tests' failed
make: *** [run_tests] Error 1

Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
Reviewed-by: Tom Hromatka <tom.hromatka@oracle.com>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Shuah Khan (Samsung OSG) <shuah@kernel.org>
2018-06-18 09:28:27 -06:00
Tom Hromatka
3c54508413 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>
2018-06-05 11:24:55 -07:00