• Petr Machata's avatar
    selftests: devlink_lib: Fix bouncing of netdevsim DEVLINK_DEV · 0521a262
    Petr Machata authored
    In the commit referenced below, a check was added to devlink_lib that
    asserts the existence of a devlink device referenced by $DEVLINK_DEV.
    Unfortunately, several netdevsim tests point DEVLINK_DEV at a device that
    does not exist at the time that devlink_lib is sourced. Thus these tests
    spuriously fail.
    
    Fix this by introducing an override. By setting DEVLINK_DEV to an empty
    string, the user declares their intention to handle DEVLINK_DEV management
    on their own.
    
    In all netdevsim tests that use devlink_lib and set DEVLINK_DEV, set
    instead an empty DEVLINK_DEV just before sourcing devlink_lib, and set it
    to the correct value right afterwards.
    
    Fixes: 557c4d2f ("selftests: devlink_lib: add check for devlink device existence")
    Signed-off-by: default avatarPetr Machata <petrm@nvidia.com>
    Signed-off-by: default avatarIdo Schimmel <idosch@nvidia.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    0521a262
devlink_trap.sh 11.9 KB