diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-22 08:20:22 -1000 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2026-10-22 08:20:22 -1000 |
| commit | 968de9d17980a0e538fc4e4394af49465294386d (patch) | |
| tree | 9e091112c98c09b034805c67637b118148c1d67f /Documentation/dev-tools | |
| parent | 7cd80b8168c9269e4b11788ce815c0f446ab5b34 (diff) | |
| parent | 368e5d4d12a802ee3708800319cd13904721286f (diff) | |
| download | linux-968de9d17980a0e538fc4e4394af49465294386d.tar.gz linux-968de9d17980a0e538fc4e4394af49465294386d.zip | |
Merge tag 'linux_kselftest-next-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest
Pull kselftest updates from Shuah Khan:
- Improve selftest build, run-time, and install framework
Install even when some modules fail to build, print summary of test
results at the end of the default test run, keep the build status
from wrapping to success so build errors are reported, and optionally
record per-suite build and install results.
- Add LLVM support to kselftest_deps.sh
- Fix resctrl, breakpoints suspend, ftrace, and tracing tests
- Fix and enhance resctrl test
* tag 'linux_kselftest-next-7.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux-kselftest:
selftests: breakpoints: Skip step_after_suspend_test on systems without a wakeup capable RTC
selftests: optionally record per-suite build and install results
selftests: keep the build status from wrapping to success
selftests/ftrace: Add nice dependency
selftests: kselftest_deps.sh: Support LLVM
selftests: lib.mk: Don't fail install if no modules were built
selftests/ftrace: Avoid unlink error on first run
tracing/selftests: Fix incorrect invocation of exit_fail
selftests/lib.mk: run_tests: print summary at the end
selftests/ftrace: skip gcov symbols when picking a function to probe
selftests/resctrl: Enable dynamic management of IMC counters via linked list
selftests/resctrl: Replace counter index references with pointers
selftests/resctrl: Introduce linked list management for IMC counters
selftests/resctrl: Skip L3_CAT when no exclusive cache portion exists
Diffstat (limited to 'Documentation/dev-tools')
| -rw-r--r-- | Documentation/dev-tools/kselftest.rst | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Documentation/dev-tools/kselftest.rst b/Documentation/dev-tools/kselftest.rst index 64c0ec7428a2..26a536ef4cd6 100644 --- a/Documentation/dev-tools/kselftest.rst +++ b/Documentation/dev-tools/kselftest.rst @@ -133,6 +133,44 @@ build successfully; make will abort as soon as any target fails:: This applies to both the ``all`` and ``install`` targets and is useful in CI environments where a silent partial build would be misleading. +Recording suite build results +============================= + +Since the build succeeds as long as one target builds, the exit status of +make does not show which targets failed. Set ``KSFT_BUILD_REPORT`` to the +absolute path of a file to have the ``all`` and ``install`` targets append +a tab-separated record for each target they process:: + + $ : > /tmp/ksft-build.tsv + $ make -C tools/testing/selftests O=/tmp/kernel-build \ + KSFT_BUILD_REPORT=/tmp/ksft-build.tsv install + +Each record holds the phase (``all`` or ``install``), a name and the exit +status of that step. Recording does not change which targets are built or +installed, or the exit status of make, also with ``FORCE_TARGETS=1``. The +caller creates or truncates the report before a build; the rules only +append to it. Nothing is recorded by ``make -n``, ``-t`` or ``-q``. + +The same name can appear several times: ``install`` builds the targets +again, and generating ``kselftest-list.txt`` is recorded as part of the +``install`` phase. Targets that are added automatically as installation +dependencies of other targets, such as ``net/lib``, are recorded too. +Suites that are built from several subdirectories may also record each +subdirectory under its path, for example ``arm64/tags``; a failure there +means that the suite was built or installed only partially. A record +belongs to the target with the longest name that is equal to the record +name or followed by ``/`` in it. + +A target was built and installed successfully only if all of its records +have a zero status. Missing records do not show that a target was built. +A successful target that installs no tests has no entries in +``kselftest-list.txt``. Install the kernel headers with ``make headers`` +before building: a suite that fails because the headers are missing is +recorded as failed even if a later step installs them. + +``KSFT_BUILD_REPORT_VERSION`` in tools/testing/selftests/Makefile gives the +version of this format, currently ``1``. + Running the full range hotplug selftests ======================================== |
