mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-25 03:37:45 +03:00
ZTS: Misc fixes for FreeBSD
* Force UFS sync before snap in vol rollback tests * rw is not a valid share option on FreeBSD, use ro instead * zfs_unmount_nested: mountpoint is in the pool, rmdir *before* export * Fix some more platform checks * Fix disappearing group in delegate tests * Don't try delegating for jailed, only root can set it Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10038
This commit is contained in:
@@ -101,7 +101,7 @@ function verify_perm
|
||||
|
||||
log_note "Check $type $user $perm $dtst"
|
||||
if ((ret != 0)) ; then
|
||||
log_note "Fail: $user should have $perm " \
|
||||
log_note "Fail: $user should have $perm" \
|
||||
"on $dtst"
|
||||
return 1
|
||||
fi
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
. $STF_SUITE/include/libtest.shlib
|
||||
. $STF_SUITE/tests/functional/delegate/delegate_common.kshlib
|
||||
|
||||
if ! is_linux; then
|
||||
if is_illumos; then
|
||||
# check svc:/network/nis/client:default state
|
||||
# disable it if the state is ON
|
||||
# and the state will be restored during cleanup.ksh
|
||||
|
||||
@@ -50,6 +50,14 @@ function cleanup
|
||||
{
|
||||
if id $STAFF_GROUP > /dev/null 2>&1; then
|
||||
log_must del_user $STAFF_GROUP
|
||||
if is_freebsd; then
|
||||
# pw userdel also deletes the group with the same name
|
||||
# and has no way to opt out of this behavior (yet).
|
||||
# Recreate the group as a workaround.
|
||||
log_must add_group $STAFF_GROUP
|
||||
log_must add_user $STAFF_GROUP $STAFF1
|
||||
log_must add_user $STAFF_GROUP $STAFF2
|
||||
fi
|
||||
fi
|
||||
|
||||
restore_root_datasets
|
||||
@@ -71,6 +79,14 @@ done
|
||||
log_must restore_root_datasets
|
||||
|
||||
log_must del_user $STAFF_GROUP
|
||||
if is_freebsd; then
|
||||
# pw userdel also deletes the group with the same name
|
||||
# and has no way to opt out of this behavior (yet).
|
||||
# Recreate the group as a workaround.
|
||||
log_must add_group $STAFF_GROUP
|
||||
log_must add_user $STAFF_GROUP $STAFF1
|
||||
log_must add_user $STAFF_GROUP $STAFF2
|
||||
fi
|
||||
for dtst in $datasets ; do
|
||||
log_must zfs allow $STAFF_GROUP $perms $dtst
|
||||
log_must verify_perm $dtst $perms $STAFF1 $STAFF2
|
||||
|
||||
@@ -93,7 +93,7 @@ elif is_freebsd; then
|
||||
# Permission Filesystem Volume
|
||||
#
|
||||
# Removed for FreeBSD
|
||||
# - zoned - spelled "jailed"
|
||||
# - jailed - jailing requires superuser privileges
|
||||
# - sharenfs - sharing requires superuser privileges
|
||||
# - share - sharing requires superuser privileges
|
||||
# - xattr - Not supported on FreeBSD
|
||||
@@ -125,7 +125,6 @@ set -A perms create true false \
|
||||
clone true true \
|
||||
rename true true \
|
||||
promote true true \
|
||||
jailed true false \
|
||||
receive true false \
|
||||
destroy true true
|
||||
|
||||
|
||||
Reference in New Issue
Block a user