selftests: devlink_lib: add check for devlink device existence
Subsystems (4)
PATCH 1/1 selftests: devlink_lib: add check for devlink device existence
From: Jiri Pirko <[email protected]>
If user passes devlink handle over DEVLINK_DEV variable, check if the device exists.
Signed-off-by Jiri Pirko <[email protected]>
--- tools/testing/selftests/net/forwarding/devlink_lib.sh | 6 ++++++ 1 file changed, 6 insertions(+)
tools/testing/selftests/net/forwarding/devlink_lib.sh +6 -0
@@ -18,6 +18,12 @@ if [[ ! -v DEVLINK_DEV ]]; then DEVLINK_VIDDID=$(lspci -s $(echo $DEVLINK_DEV | cut -d"/" -f2) \ -n | cut -d" " -f3) +else + devlink dev show $DEVLINK_DEV &> /dev/null + if [ $? -ne 0 ]; then + echo "SKIP: devlink device \"$DEVLINK_DEV\" not found" + exit 1 + fi fi ##############################################################################
Signature · 1 line
2.31.1
This patch was applied to netdev/net-next.git (refs/heads/master):
Hello:
This patch was applied to netdev/net-next.git (refs/heads/master):
Quoted 8 lines · On Thu, 27 May 2021 12:55:15 +0200 you wrote:
From: Jiri Pirko <[email protected]>
If user passes devlink handle over
DEVLINK_DEVvariable, check if the device exists.Signed-off-by Jiri Pirko <[email protected]>[...]
Here is the summary with links:
- [net-next] selftests: devlink_lib: add check for devlink device existence
https://git.kernel.org/netdev/net-next/c/557c4d2f780c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html