|
| 1 | +--- |
| 2 | +title: "Device kselftests" |
| 3 | +date: 2024-10-01 |
| 4 | +description: Overview of the process of enabling device kselftests on new platforms |
| 5 | +--- |
| 6 | + |
| 7 | +Device kselftests provide a good starting point to validate basic kernel |
| 8 | +functionality. There are a few of them upstream, with varying coverage and |
| 9 | +requirements. See this documentation page for more information: |
| 10 | +https://lore.kernel.org/all/[email protected] |
| 11 | + |
| 12 | +After deciding which test to run and satisfying its requirement (if any), |
| 13 | +enabling the test on a new platform in KernelCI is a matter of adding the |
| 14 | +platform to the test's scheduler entry. For example, for the DT kselftest on |
| 15 | +ARM64, that would be adding the platform here: |
| 16 | + |
| 17 | +https://github.com/kernelci/kernelci-pipeline/blob/08e7bce8044d04faa79028273384d9c30a1f5d9e/config/pipeline.yaml#L2495 |
| 18 | + |
| 19 | +For the other tests, just look for the entry in the ``scheduler`` that has |
| 20 | +``collections`` set to the kselftest path as per the upstream documentation (for |
| 21 | +example, for the error logs test, look for ``collections: devices/error_logs``). |
| 22 | +To enable the test on a different architecture, look for the entry that has the |
| 23 | +build corresponding to that architecture, or create it if there's none. See |
| 24 | +https://docs.kernelci.org/maestro/pipeline/developer-documentation/#an-example-of-enabling-a-new-job |
| 25 | +for more details on enabling tests in KernelCI. |
| 26 | + |
| 27 | +Note: In addition to the tests described in the upstream documentation, there is |
| 28 | +also an alternative to the DT kselftest for ACPI platforms: the ``acpi`` |
| 29 | +kselftest. It is not described there as it hasn't been merged upstream, but it |
| 30 | +is already being run in KernelCI. |
0 commit comments