summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2020-05-04 21:58:31 +0300
committerDavid S. Miller <davem@davemloft.net>2020-05-04 21:58:31 +0300
commit1248dc00fb62bd4dc42b091aa8b245b1b54547ca (patch)
treed487b2b14d525bb5739d25b048a195ad84fe8804 /tools
parent39d010504e6b4485d7ceee167743620dd33f4417 (diff)
parentaebbd7dfab2584acfb1c5d9abf911024109bc5ee (diff)
downloadlinux-1248dc00fb62bd4dc42b091aa8b245b1b54547ca.tar.xz
Merge branch 'devlink-kernel-region-snapshot-id-allocation'
Jakub Kicinski says: ==================== devlink: kernel region snapshot id allocation currently users have to find a free snapshot id to pass to the kernel when they are requesting a snapshot to be taken. This set extends the kernel so it can allocate the id on its own and send it back to user space in a response. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/drivers/net/netdevsim/devlink.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
index 9f9741444549..ad539eccddcb 100755
--- a/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
+++ b/tools/testing/selftests/drivers/net/netdevsim/devlink.sh
@@ -151,6 +151,19 @@ regions_test()
check_region_snapshot_count dummy post-second-delete 2
+ sid=$(devlink -j region new $DL_HANDLE/dummy | jq '.[][][][]')
+ check_err $? "Failed to create a new snapshot with id allocated by the kernel"
+
+ check_region_snapshot_count dummy post-first-request 3
+
+ devlink region dump $DL_HANDLE/dummy snapshot $sid >> /dev/null
+ check_err $? "Failed to dump a snapshot with id allocated by the kernel"
+
+ devlink region del $DL_HANDLE/dummy snapshot $sid
+ check_err $? "Failed to delete snapshot with id allocated by the kernel"
+
+ check_region_snapshot_count dummy post-first-request 2
+
log_test "regions test"
}