diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:05:51 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:05:51 +0000 |
commit | 5d1646d90e1f2cceb9f0828f4b28318cd0ec7744 (patch) | |
tree | a94efe259b9009378be6d90eb30d2b019d95c194 /tools/testing/selftests/sparc64/drivers/drivers_test.sh | |
parent | Initial commit. (diff) | |
download | linux-430c2fc249ea5c0536abd21c23382884005c9093.tar.xz linux-430c2fc249ea5c0536abd21c23382884005c9093.zip |
Adding upstream version 5.10.209.upstream/5.10.209upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/testing/selftests/sparc64/drivers/drivers_test.sh')
-rwxr-xr-x | tools/testing/selftests/sparc64/drivers/drivers_test.sh | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tools/testing/selftests/sparc64/drivers/drivers_test.sh b/tools/testing/selftests/sparc64/drivers/drivers_test.sh new file mode 100755 index 000000000..6d08273b7 --- /dev/null +++ b/tools/testing/selftests/sparc64/drivers/drivers_test.sh @@ -0,0 +1,30 @@ +#!/bin/sh +# SPDX-License-Identifier: GPL-2.0 + +SRC_TREE=../../../../ + +test_run() +{ + if [ -f ${SRC_TREE}/drivers/char/adi.ko ]; then + insmod ${SRC_TREE}/drivers/char/adi.ko 2> /dev/null + if [ $? -ne 0 ]; then + rc=1 + fi + else + # Use modprobe dry run to check for missing adi module + if ! /sbin/modprobe -q -n adi; then + echo "adi: [SKIP]" + elif /sbin/modprobe -q adi; then + echo "adi: ok" + else + echo "adi: [FAIL]" + rc=1 + fi + fi + ./adi-test + rmmod adi 2> /dev/null +} + +rc=0 +test_run +exit $rc |