Difference between revisions of "Kselftest Notes"

From eLinux.org
Jump to: navigation, search
(variables)
Line 30: Line 30:
  
 
== variables ==
 
== variables ==
KBUILD_OUTPUT=<dir>
+
* KBUILD_OUTPUT=<dir>
TARGETS=<space-separated list>
+
* TARGETS=<space-separated list>
quicktest=1
+
* quicktest=1
O=<dir>
+
* O=<dir>
  
 
== targets ==
 
== targets ==

Revision as of 17:55, 25 September 2019

Here are some notes about kselftest.

These were made as part of an attempt to improve the documentation for kselftest.

documentation

The primary source for kselftest documentation is in the kernel git repository, at: Documentation/dev-tools/kselftest.rst

Observations:

  • the doc is not super-well-organized
    • early on, there's an overemphasis on the special requirements for hotplug testing
      • IMHO, this should be moved to a test-area-specific section of the document
  • the doc is a little disorganized
    • the multiple use cases should be documented
      • use case 1: developer testing something in their own area, during development, on a self-hosted system
      • use case 2: developer testing something in their own area, during development, in a host/target configuration
      • use case 3: user testing the kernel for regressions, on a self-hosted system
      • use case 4: user testing the kernel for regressions, on a host/target configuration
      • use case 5: CI system testing for regressions, on a self-hosted system
      • use case 6: CI system testing for regressions, in a host/target configuration
  • in the main document, there's no mention of TAP output being preferred

code

  • there's a variety of systems and code here

features

  • ability to run tests directly from the kernel source repository
  • ability to build tests separately from running them
  • ability to compile an individual test
  • ability to specify a list of tests to build/package/run

variables

  • KBUILD_OUTPUT=<dir>
  • TARGETS=<space-separated list>
  • quicktest=1
  • O=<dir>

targets

at top-level Makefile

kselftest kselftest-merge kselftest-clean

in kselftest top Makefile

run_tests hotplug run_hotplug

execution

  • run_kselftest.sh
  • runner.sh
  • kselftest_install.sh