Commit 9278bc9f authored by Jiri Pirko's avatar Jiri Pirko Committed by David S. Miller

selftests: test netdevsim reload forbid and fail

Extend netdevsim reload test by simulation of failures.
Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 155ddfc5
...@@ -150,6 +150,30 @@ reload_test() ...@@ -150,6 +150,30 @@ reload_test()
devlink dev reload $DL_HANDLE devlink dev reload $DL_HANDLE
check_err $? "Failed to reload" 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" log_test "reload test"
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment