summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJacob Keller <jacob.e.keller@intel.com>2020-03-26 21:37:17 +0300
committerDavid S. Miller <davem@davemloft.net>2020-03-27 05:39:26 +0300
commit3fe0fd531a35c229f8309c8b74ef0226de2626ab (patch)
treee618e319a54a0fde459cc608e313faf046ff2c21 /tools
parentb9a17abfde842bb09f894ba96a5cd9f5944f6bfa (diff)
downloadlinux-3fe0fd531a35c229f8309c8b74ef0226de2626ab.tar.xz
netdevsim: support taking immediate snapshot via devlink
Implement the .snapshot region operation for the dummy data region. This enables a region snapshot to be taken upon request via the new DEVLINK_CMD_REGION_SNAPSHOT command. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/drivers/net/netdevsim/devlink.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
index 025a84c2ab5a..32cb2a159c70 100755
--- a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
@@ -141,6 +141,16 @@ regions_test()
check_region_snapshot_count dummy post-first-delete 2
+ devlink region new $DL_HANDLE/dummy snapshot 25
+ check_err $? "Failed to create a new snapshot with id 25"
+
+ check_region_snapshot_count dummy post-first-request 3
+
+ devlink region del $DL_HANDLE/dummy snapshot 25
+ check_err $? "Failed to delete snapshot with id 25"
+
+ check_region_snapshot_count dummy post-second-delete 2
+
log_test "regions test"
}