]> git.ipfire.org Git - thirdparty/iproute2.git/commit
devlink: add support for running selftests
authorVikas Gupta <vikas.gupta@broadcom.com>
Thu, 4 Aug 2022 09:18:02 +0000 (14:48 +0530)
committerDavid Ahern <dsahern@kernel.org>
Thu, 4 Aug 2022 18:34:28 +0000 (12:34 -0600)
commit06cb288d63f517e2e11453683fc998321af084df
tree0720cc3aee08807b82a32e055f5db5cd30aa97ed
parent3bb2c10c649d9e2bbc62b5cf637fbc47a98dfdc2
devlink: add support for running selftests

Add commands and helper APIs to run selftests.
Include a selftest id for a non volatile memory i.e. flash.
Also, update the man page and bash-completion for selftests
commands.

Examples:
$ devlink dev selftests run pci/0000:03:00.0 id flash
pci/0000:03:00.0:
    flash:
      status passed

$ devlink dev selftests show pci/0000:03:00.0
pci/0000:03:00.0
      flash

$ devlink dev selftests show pci/0000:03:00.0 -j
{"selftests":{"pci/0000:03:00.0":["flash"]}}

$ devlink dev selftests run pci/0000:03:00.0 id flash -j
{"selftests":{"pci/0000:03:00.0":{"flash":{"status":"passed"}}}}

Signed-off-by: Vikas Gupta <vikas.gupta@broadcom.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: David Ahern <dsahern@kernel.org>
bash-completion/devlink
devlink/devlink.c
man/man8/devlink-dev.8