diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-11 09:25:33 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-03-11 09:25:33 -0700 |
| commit | d451b075f776180c6974fd7bc06296829edc2631 (patch) | |
| tree | d904cb8bebddd3e6c7ea531241d0372cdb69c5ab /tools/testing/selftests/dt | |
| parent | e8f897f4afef0031fe618a8e94127a0934896aba (diff) | |
| parent | 5d94da7ff00ef45737a64d947e7ff45aca972782 (diff) | |
| download | linux-next-d451b075f776180c6974fd7bc06296829edc2631.tar.gz linux-next-d451b075f776180c6974fd7bc06296829edc2631.zip | |
Merge tag 'linux_kselftest-next-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest update from Shuah Khan:
- livepatch restructuring to move the module out of lib to be built as
a out-of-tree modules during kselftest build. This makes it easier
change, debug and rebuild the tests by running make on the
selftests/livepatch directory, which is not currently possible since
the modules on lib/livepatch are build and installed using the main
makefile modules target.
- livepatch restructuring fixes for problems found by kernel test
robot. The change skips the test if kernel-devel isn't installed
(default value of KDIR), or if KDIR variable passed doesn't exists.
- resctrl test restructuring and new non-contiguous CBMs CAT test
- new ktap_helpers to print diagnostic messages, pass/fail tests based
on exit code, abort test, and finish the test.
- a new test verify power supply properties.
- a new ftrace to exercise function tracer across cpu hotplug.
- timeout increase for mqueue test to allow the test to run on i3.metal
AWS instances.
- minor spelling corrections in several tests.
- missing gitignore files and changes to existing gitignore files.
* tag 'linux_kselftest-next-6.9-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest: (57 commits)
kselftest: Add basic test for probing the rust sample modules
selftests: lib.mk: Do not process TEST_GEN_MODS_DIR
selftests: livepatch: Avoid running the tests if kernel-devel is missing
selftests: livepatch: Add initial .gitignore
selftests/resctrl: Add non-contiguous CBMs CAT test
selftests/resctrl: Add resource_info_file_exists()
selftests/resctrl: Split validate_resctrl_feature_request()
selftests/resctrl: Add a helper for the non-contiguous test
selftests/resctrl: Add test groups and name L3 CAT test L3_CAT
selftests: sched: Fix spelling mistake "hiearchy" -> "hierarchy"
selftests/mqueue: Set timeout to 180 seconds
selftests/ftrace: Add test to exercize function tracer across cpu hotplug
selftest: ftrace: fix minor typo in log
selftests: thermal: intel: workload_hint: add missing gitignore
selftests: thermal: intel: power_floor: add missing gitignore
selftests: uevent: add missing gitignore
selftests: Add test to verify power supply properties
selftests: ktap_helpers: Add a helper to finish the test
selftests: ktap_helpers: Add a helper to abort the test
selftests: ktap_helpers: Add helper to pass/fail test based on exit code
...
Diffstat (limited to 'tools/testing/selftests/dt')
| -rw-r--r-- | tools/testing/selftests/dt/Makefile | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/dt/ktap_helpers.sh | 70 | ||||
| -rwxr-xr-x | tools/testing/selftests/dt/test_unprobed_devices.sh | 6 |
3 files changed, 2 insertions, 76 deletions
diff --git a/tools/testing/selftests/dt/Makefile b/tools/testing/selftests/dt/Makefile index 62dc00ee4978..2d33ee9e9b71 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 8dfae51bb4e2..000000000000 --- 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 7fae90293a9d..2d7e70c5ad2d 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 |
