aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include/libtest.shlib
diff options
context:
space:
mode:
authorSerapheim Dimitropoulos <[email protected]>2019-08-12 10:02:34 -0700
committerBrian Behlendorf <[email protected]>2019-08-12 10:02:34 -0700
commit3b9edd7b171f510b0abb9c885aa5b77114b8169a (patch)
tree06f48f5ea1d64c1e055adc1ba0afca52372df4a4 /tests/zfs-tests/include/libtest.shlib
parent2081db79827e0fbc3088dcd693f8af7d7d0191a4 (diff)
Introduce getting holds and listing bookmarks through ZCP
Consumers of ZFS Channel Programs can now list bookmarks, and get holds from datasets. A minor-refactoring was also applied to distinguish between user and system properties in ZCP. Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Matt Ahrens <[email protected]> Reviewed-by: Serapheim Dimitropoulos <[email protected]> Ported-by: Serapheim Dimitropoulos <[email protected]> Signed-off-by: Dan Kimmel <[email protected]> OpenZFS-issue: https://illumos.org/issues/8862 Closes #7902
Diffstat (limited to 'tests/zfs-tests/include/libtest.shlib')
-rw-r--r--tests/zfs-tests/include/libtest.shlib12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 5d9e3b361..5d536fda3 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -742,6 +742,18 @@ function bkmarkexists
}
#
+# Return 0 if a hold exists; $? otherwise
+#
+# $1 - hold tag
+# $2 - snapshot name
+#
+function holdexists
+{
+ zfs holds "$2" | awk '{ print $2 }' | grep "$1" > /dev/null 2>&1
+ return $?
+}
+
+#
# Set a property to a certain value on a dataset.
# Sets a property of the dataset to the value as passed in.
# @param: