tests: don't use share/unshare exportfs aliases, support FreeBSD NFS

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13259
This commit is contained in:
наб
2022-03-06 01:14:12 +01:00
committed by Brian Behlendorf
parent c22c872036
commit 5b0e75caef
6 changed files with 75 additions and 100 deletions
@@ -125,7 +125,7 @@ while (( i < ${#dataset_pos[*]} )) ; do
set_n_check_prop "noauto" "canmount" "$dataset"
log_must zfs set mountpoint=$tmpmnt $dataset
log_must zfs set sharenfs=on $dataset
if ismounted $dataset; then
if ismounted $dataset; then
zfs unmount -a > /dev/null 2>&1
log_must mounted $dataset
log_must zfs unmount $dataset
@@ -179,4 +179,3 @@ while (( i < ${#mntp_fs[*]} )); do
done
log_pass "'zfs unshare [-a]' succeeds to be aware of legacy share."
@@ -57,8 +57,7 @@ log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
rm -rf $NONZFS_TESTDIR || log_unresolved Could not remove $NONZFS_TESTDIR
mkdir -p $NONZFS_TESTDIR || log_unresolved Could not create $NONZFS_TESTDIR
new_fs ${DEV_DSKDIR}/$NONZFS_DISK
(( $? != 0 )) &&
new_fs ${DEV_DSKDIR}/$NONZFS_DISK ||
log_untested "Unable to setup a $NEWFS_DEFAULT_FS file system"
log_must mount ${DEV_DSKDIR}/$NONZFS_DISK $NONZFS_TESTDIR