summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/dt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:22 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-08-07 13:11:22 +0000
commitb20732900e4636a467c0183a47f7396700f5f743 (patch)
tree42f079ff82e701ebcb76829974b4caca3e5b6798 /tools/testing/selftests/dt
parentAdding upstream version 6.8.12. (diff)
downloadlinux-b20732900e4636a467c0183a47f7396700f5f743.tar.xz
linux-b20732900e4636a467c0183a47f7396700f5f743.zip
Adding upstream version 6.9.7.upstream/6.9.7
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tools/testing/selftests/dt')
-rw-r--r--tools/testing/selftests/dt/Makefile2
-rw-r--r--tools/testing/selftests/dt/ktap_helpers.sh70
-rwxr-xr-xtools/testing/selftests/dt/test_unprobed_devices.sh6
3 files changed, 2 insertions, 76 deletions
diff --git a/tools/testing/selftests/dt/Makefile b/tools/testing/selftests/dt/Makefile
index 62dc00ee49..2d33ee9e9b 100644
--- a/tools/testing/selftests/dt/Makefile
+++ b/tools/testing/selftests/dt/Makefile
@@ -4,7 +4,7 @@ ifneq ($(PY3),)
TEST_PROGS := test_unprobed_devices.sh
TEST_GEN_FILES := compatible_list
-TEST_FILES := compatible_ignore_list ktap_helpers.sh
+TEST_FILES := compatible_ignore_list
include ../lib.mk
diff --git a/tools/testing/selftests/dt/ktap_helpers.sh b/tools/testing/selftests/dt/ktap_helpers.sh
deleted file mode 100644
index 8dfae51bb4..0000000000
--- a/tools/testing/selftests/dt/ktap_helpers.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0
-#
-# Copyright (c) 2023 Collabora Ltd
-#
-# Helpers for outputting in KTAP format
-#
-KTAP_TESTNO=1
-KTAP_CNT_PASS=0
-KTAP_CNT_FAIL=0
-KTAP_CNT_SKIP=0
-
-ktap_print_header() {
- echo "TAP version 13"
-}
-
-ktap_set_plan() {
- num_tests="$1"
-
- echo "1..$num_tests"
-}
-
-ktap_skip_all() {
- echo -n "1..0 # SKIP "
- echo $@
-}
-
-__ktap_test() {
- result="$1"
- description="$2"
- directive="$3" # optional
-
- local directive_str=
- [[ ! -z "$directive" ]] && directive_str="# $directive"
-
- echo $result $KTAP_TESTNO $description $directive_str
-
- KTAP_TESTNO=$((KTAP_TESTNO+1))
-}
-
-ktap_test_pass() {
- description="$1"
-
- result="ok"
- __ktap_test "$result" "$description"
-
- KTAP_CNT_PASS=$((KTAP_CNT_PASS+1))
-}
-
-ktap_test_skip() {
- description="$1"
-
- result="ok"
- directive="SKIP"
- __ktap_test "$result" "$description" "$directive"
-
- KTAP_CNT_SKIP=$((KTAP_CNT_SKIP+1))
-}
-
-ktap_test_fail() {
- description="$1"
-
- result="not ok"
- __ktap_test "$result" "$description"
-
- KTAP_CNT_FAIL=$((KTAP_CNT_FAIL+1))
-}
-
-ktap_print_totals() {
- echo "# Totals: pass:$KTAP_CNT_PASS fail:$KTAP_CNT_FAIL xfail:0 xpass:0 skip:$KTAP_CNT_SKIP error:0"
-}
diff --git a/tools/testing/selftests/dt/test_unprobed_devices.sh b/tools/testing/selftests/dt/test_unprobed_devices.sh
index 7fae90293a..2d7e70c5ad 100755
--- a/tools/testing/selftests/dt/test_unprobed_devices.sh
+++ b/tools/testing/selftests/dt/test_unprobed_devices.sh
@@ -15,16 +15,12 @@
DIR="$(dirname $(readlink -f "$0"))"
-source "${DIR}"/ktap_helpers.sh
+source "${DIR}"/../kselftest/ktap_helpers.sh
PDT=/proc/device-tree/
COMPAT_LIST="${DIR}"/compatible_list
IGNORE_LIST="${DIR}"/compatible_ignore_list
-KSFT_PASS=0
-KSFT_FAIL=1
-KSFT_SKIP=4
-
ktap_print_header
if [[ ! -d "${PDT}" ]]; then