aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include/libtest.shlib
diff options
context:
space:
mode:
authorнаб <[email protected]>2022-03-06 01:39:54 +0100
committerBrian Behlendorf <[email protected]>2022-05-12 09:27:00 -0700
commit88d5580e511540b996dfb802a7ee4912980fe1e7 (patch)
tree2f0d189360348c939853c6c479a49fefb4210f11 /tests/zfs-tests/include/libtest.shlib
parent9b06aa634a80d6820ffb1453ccb3e4572be303d4 (diff)
tests: add zfs_unshare_008_pos checking whitespace escaping
Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ahelenia Ziemiańska <[email protected]> Closes #13165
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 175adfc62..51d4e225f 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -1110,6 +1110,18 @@ function datasetnonexists
return 0
}
+# FreeBSD breaks exports(5) at whitespace and doesn't process escapes
+# Solaris just breaks
+#
+# cf. https://github.com/openzfs/zfs/pull/13165#issuecomment-1059845807
+#
+# Linux can have spaces (which are \OOO-escaped),
+# but can't have backslashes because they're parsed recursively
+function shares_can_have_whitespace
+{
+ is_linux
+}
+
function is_shared_freebsd
{
typeset fs=$1