aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorRyan Moeller <[email protected]>2020-10-14 00:25:48 -0400
committerBrian Behlendorf <[email protected]>2020-10-16 13:05:00 -0700
commit725c9e22ca369bb51050b823f0228b847c322678 (patch)
tree183d28f7dbb3c78ee0e70e1763426bd9e7e70569 /tests
parentfbfc7e843adbd5139e255b56691eb17f286446cd (diff)
Cross-platform acltype
The acltype property is currently hidden on FreeBSD and does not reflect the NFSv4 style ZFS ACLs used on the platform. This makes it difficult to observe that a pool imported from FreeBSD on Linux has a different type of ACL that is being ignored, and vice versa. Add an nfsv4 acltype and expose the property on FreeBSD. Make the default acltype nfsv4 on FreeBSD. Setting acltype to an unhanded style is treated the same as setting it to off. The ACLs will not be removed, but they will be ignored. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Ryan Moeller <[email protected]> Closes #10520
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg4
-rwxr-xr-xtests/zfs-tests/tests/functional/history/history_002_pos.ksh9
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh2
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg b/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
index cd0cf771e..1a96ff5d9 100644
--- a/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
+++ b/tests/zfs-tests/tests/functional/cli_user/misc/misc.cfg
@@ -49,7 +49,7 @@ if is_linux; then
# these are an alternate set of property values
PROP_ALTVALS="\
- off off \
+ nfsv4 off \
fletcher4 lzjb off \
off /tmp/zfstest 100M off \
512 10m off \
@@ -74,7 +74,7 @@ elif is_freebsd; then
# these are an alternate set of property values
PROP_ALTVALS="\
- off off \
+ nfsv4 off \
fletcher4 lzjb off \
off /tmp/zfstest 100M off \
512 10m off \
diff --git a/tests/zfs-tests/tests/functional/history/history_002_pos.ksh b/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
index b077603e8..a53bcaf4e 100755
--- a/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
+++ b/tests/zfs-tests/tests/functional/history/history_002_pos.ksh
@@ -73,7 +73,7 @@ props=(
mountpoint none compression lz4
compression on compression off
compression lzjb acltype off
- acltype posix xattr sa
+ acltype posix acltype nfsv4
atime on atime off
devices on devices off
exec on exec off
@@ -84,11 +84,11 @@ props=(
aclinherit discard aclinherit noallow
aclinherit secure aclinherit passthrough
canmount off canmount on
- xattr on xattr off
compression gzip compression gzip-$((RANDOM%9 + 1))
compression zstd compression zstd-$((RANDOM%9 + 1))
compression zstd-fast copies $((RANDOM%3 + 1))
- compression zstd-fast-$((RANDOM%9 + 1))
+ compression zstd-fast-$((RANDOM%9 + 1)) xattr sa
+ xattr on xattr off
)
elif is_freebsd; then
# property value property value
@@ -115,7 +115,8 @@ props=(
compression gzip compression gzip-$((RANDOM%9 + 1))
compression zstd compression zstd-$((RANDOM%9 + 1))
compression zstd-fast copies $((RANDOM%3 + 1))
- compression zstd-fast-$((RANDOM%9 + 1))
+ compression zstd-fast-$((RANDOM%9 + 1)) acltype off
+ acltype posix acltype nfsv4
)
else
# property value property value
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
index 499c05fc9..594357dc4 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
@@ -116,7 +116,7 @@ for fs in "$POOL" "$POOL/pclone" "$POOL/$FS" "$POOL/$FS/fs1" \
"$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do
rand_set_prop $fs aclinherit "discard" "noallow" "secure" "passthrough"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
- rand_set_prop $fs acltype "off" "posix" "noacl" "posixacl"
+ rand_set_prop $fs acltype "off" "posix" "nfsv4" "noacl" "posixacl"
rand_set_prop $fs atime "on" "off"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
rand_set_prop $fs compression "${compress_prop_vals[@]}"