mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-30 18:56:23 +03:00
ZTS: Refactor is_shared, fix impl on FreeBSD
FreeBSD doesn't have a `share` command. It does have showmount. Split the separate platform impls out of is_shared_impl. Dispatch to the correct platform impl function from is_shared. Eliminate the use of is_shared_impl from tests. is_shared works. Reviewed-by: John Kennedy <john.kennedy@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Ryan Moeller <ryan@iXsystems.com> Closes #10037
This commit is contained in:
@@ -57,16 +57,12 @@ log_must zfs create \
|
||||
#
|
||||
# 2. Verify the datasets is shared.
|
||||
#
|
||||
# The "non-impl" variant of "is_shared" requires the dataset to exist.
|
||||
# Thus, we can only use the "impl" variant in step 4, below. To be
|
||||
# consistent with step 4, we also use the "impl" variant here.
|
||||
#
|
||||
log_must eval "is_shared_impl $TESTDIR/1"
|
||||
log_must is_shared $TESTDIR/1
|
||||
|
||||
# 3. Invoke 'zfs destroy' on the dataset.
|
||||
log_must zfs destroy -f $TESTPOOL/$TESTFS/shared1
|
||||
|
||||
# 4. Verify the dataset is not shared.
|
||||
log_mustnot eval "is_shared_impl $TESTDIR/1"
|
||||
log_mustnot is_shared $TESTDIR/1
|
||||
|
||||
log_pass "'zfs destroy' will unshare the dataset."
|
||||
|
||||
Reference in New Issue
Block a user