]> git.proxmox.com Git - mirror_zfs.git/blobdiff - tests/zfs-tests/tests/functional/cli_root/zfs_create/zfs_create_008_neg.ksh
ZTS: Misc fixes for FreeBSD
[mirror_zfs.git] / tests / zfs-tests / tests / functional / cli_root / zfs_create / zfs_create_008_neg.ksh
index 684ebdb856e660e10cc00023b33415c51d3f8dfb..43c3ab0de338854246d2f61d1b950727571542e0 100755 (executable)
@@ -97,8 +97,16 @@ log_assert "'zfs create' should return an error with badly-formed parameters."
 
 typeset -i i=0
 while [[ $i -lt ${#args[*]} ]]; do
-       log_mustnot zfs create ${args[i]} $TESTPOOL/$TESTFS1
-       log_mustnot zfs create -p ${args[i]} $TESTPOOL/$TESTFS1
+       typeset arg=${args[i]}
+       if is_freebsd; then
+               # FreeBSD does not strictly validate share options (yet).
+               if [[ "$arg" == "-o sharenfs="* ]]; then
+                       ((i = i + 1))
+                       continue
+               fi
+       fi
+       log_mustnot zfs create $arg $TESTPOOL/$TESTFS1
+       log_mustnot zfs create -p $arg $TESTPOOL/$TESTFS1
        ((i = i + 1))
 done