diff options
author | Jiri Pirko <jiri@mellanox.com> | 2019-10-06 08:30:02 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-10-06 18:28:42 +0200 |
commit | 9278bc9f627dbc640825b00a166d6b9bf85107f3 (patch) | |
tree | be470b710df880504bfad0d5d2d50b64c9c9baac /tools | |
parent | 155ddfc5e54a68f0e8d20f31f2b4b6b25e1071b5 (diff) | |
download | linux-9278bc9f627dbc640825b00a166d6b9bf85107f3.tar.bz2 |
selftests: test netdevsim reload forbid and fail
Extend netdevsim reload test by simulation of failures.
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/testing/selftests/drivers/net/netdevsim/devlink.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh index 69af99bd562b..de3174431b8e 100755 --- a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh +++ b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh @@ -150,6 +150,30 @@ reload_test() devlink dev reload $DL_HANDLE check_err $? "Failed to reload" + echo "y"> $DEBUGFS_DIR/fail_reload + check_err $? "Failed to setup devlink reload to fail" + + devlink dev reload $DL_HANDLE + check_fail $? "Unexpected success of devlink reload" + + echo "n"> $DEBUGFS_DIR/fail_reload + check_err $? "Failed to setup devlink reload not to fail" + + devlink dev reload $DL_HANDLE + check_err $? "Failed to reload after set not to fail" + + echo "y"> $DEBUGFS_DIR/dont_allow_reload + check_err $? "Failed to forbid devlink reload" + + devlink dev reload $DL_HANDLE + check_fail $? "Unexpected success of devlink reload" + + echo "n"> $DEBUGFS_DIR/dont_allow_reload + check_err $? "Failed to re-enable devlink reload" + + devlink dev reload $DL_HANDLE + check_err $? "Failed to reload after re-enable" + log_test "reload test" } |