devlink-selftests.rst 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. .. SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. =================
  3. Devlink Selftests
  4. =================
  5. The ``devlink-selftests`` API allows executing selftests on the device.
  6. Tests Mask
  7. ==========
  8. The ``devlink-selftests`` command should be run with a mask indicating
  9. the tests to be executed.
  10. Tests Description
  11. =================
  12. The following is a list of tests that drivers may execute.
  13. .. list-table:: List of tests
  14. :widths: 5 90
  15. * - Name
  16. - Description
  17. * - ``DEVLINK_SELFTEST_FLASH``
  18. - Devices may have the firmware on non-volatile memory on the board, e.g.
  19. flash. This particular test helps to run a flash selftest on the device.
  20. Implementation of the test is left to the driver/firmware.
  21. example usage
  22. -------------
  23. .. code:: shell
  24. # Query selftests supported on the devlink device
  25. $ devlink dev selftests show DEV
  26. # Query selftests supported on all devlink devices
  27. $ devlink dev selftests show
  28. # Executes selftests on the device
  29. $ devlink dev selftests run DEV id flash