forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
devlink: introduce framework for selftests
Add a framework for running selftests. Framework exposes devlink commands and test suite(s) to the user to execute and query the supported tests by the driver. Below are new entries in devlink_nl_ops devlink_nl_cmd_selftests_show: To query the supported selftests by the driver. devlink_nl_cmd_selftests_run: To execute selftests. Users can provide a test mask for executing group tests or standalone tests. Documentation/networking/devlink/ path is already part of MAINTAINERS & the new files come under this path. Hence no update needed to the MAINTAINERS Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com> Reviewed-by: Michael Chan <michael.chan@broadcom.com> Reviewed-by: Andy Gospodarek <andrew.gospodarek@broadcom.com>
- Loading branch information
1 parent
cf21b35
commit 5c0b96e
Showing
4 changed files
with
234 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
.. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) | ||
================= | ||
Devlink Selftests | ||
================= | ||
|
||
The ``devlink-selftests`` API allows executing selftests on the device. | ||
|
||
Tests Mask | ||
========== | ||
The ``devlink-selftests`` command should be run with a mask indicating | ||
the tests to be executed. | ||
|
||
Tests Description | ||
================= | ||
The following is a list of tests that drivers may execute. | ||
|
||
.. list-table:: List of tests | ||
:widths: 5 90 | ||
|
||
* - Name | ||
- Description | ||
* - ``DEVLINK_SELFTEST_FLASH`` | ||
- Runs a flash test on the device. | ||
|
||
example usage | ||
------------- | ||
|
||
.. code:: shell | ||
# Query selftests supported on the device | ||
$ devlink dev selftests show DEV | ||
# Executes selftests on the device | ||
$ devlink dev selftests run DEV test {flash | all} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters