From 2f71caf2d926249920d1b9162550c56715cc6461 Mon Sep 17 00:00:00 2001 From: LOLi Date: Tue, 29 Nov 2016 20:22:38 +0100 Subject: Allow zfs unshare -a Allow `zfs unshare -a` command to share or unshare all datasets of a given protocol, nfs or smb. Additionally, enable most of ZFS Test Suite zfs_share/zfs_unshare test cases. To work around some Illumos-specific functionalities ($SHARE/$UNSHARE) some function wrappers were added around them. Finally, fix and issue in smb_is_share_active() that would leave SMB shares exported when invoking 'zfs unshare -a' Reviewed-by: Giuseppe Di Natale Reviewed-by: Brian Behlendorf Signed-off-by: Turbo Fredriksson Signed-off-by: loli10K Closes #3238 Closes #5367 --- tests/runfiles/linux.run | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'tests/runfiles') diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 138221c50..d3c090b89 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -181,11 +181,12 @@ tests = ['cache_001_pos', 'cache_002_neg', 'canmount_001_pos', 'zfs_set_002_neg', 'zfs_set_003_neg', 'property_alias_001_pos'] # DISABLED: Tests need to be updated for Linux share behavior -#[tests/functional/cli_root/zfs_share] -#tests = ['zfs_share_001_pos', 'zfs_share_002_pos', 'zfs_share_003_pos', -# 'zfs_share_004_pos', 'zfs_share_005_pos', 'zfs_share_006_pos', -# 'zfs_share_007_neg', 'zfs_share_008_neg', 'zfs_share_009_neg', -# 'zfs_share_010_neg', 'zfs_share_011_pos'] +# zfs_share_005_pos - needs investigation, probably unsupported NFS share format +[tests/functional/cli_root/zfs_share] +tests = ['zfs_share_001_pos', 'zfs_share_002_pos', 'zfs_share_003_pos', + 'zfs_share_004_pos', 'zfs_share_006_pos', + 'zfs_share_007_neg', 'zfs_share_008_neg', 'zfs_share_009_neg', + 'zfs_share_010_neg', 'zfs_share_011_pos'] [tests/functional/cli_root/zfs_snapshot] tests = ['zfs_snapshot_001_neg', 'zfs_snapshot_002_neg', @@ -203,9 +204,11 @@ tests = ['zfs_unmount_001_pos', 'zfs_unmount_002_pos', 'zfs_unmount_003_pos', 'zfs_unmount_007_neg', 'zfs_unmount_008_neg'] # DISABLED: Tests need to be updated for Linux unshare behavior -#[tests/functional/cli_root/zfs_unshare] -#tests = ['zfs_unshare_001_pos', 'zfs_unshare_002_pos', 'zfs_unshare_003_pos', -# 'zfs_unshare_004_neg', 'zfs_unshare_005_neg'] +# zfs_unshare_002_pos - zfs set sharenfs=off won't unshare if it was already off +# zfs_unshare_006_pos - some distros come with Samba "user shares" disabled +[tests/functional/cli_root/zfs_unshare] +tests = ['zfs_unshare_001_pos', 'zfs_unshare_003_pos', + 'zfs_unshare_004_neg', 'zfs_unshare_005_neg'] [tests/functional/cli_root/zfs_upgrade] tests = ['zfs_upgrade_001_pos', 'zfs_upgrade_002_pos', 'zfs_upgrade_003_pos', -- cgit v1.2.3