Changeset View
Changeset View
Standalone View
Standalone View
tests/sys/cddl/zfs/tests/delegate/zfs_unallow_test.sh
Show All 24 Lines | |||||
# Use is subject to license terms. | # Use is subject to license terms. | ||||
# | # | ||||
atf_test_case zfs_unallow_001_pos cleanup | atf_test_case zfs_unallow_001_pos cleanup | ||||
zfs_unallow_001_pos_head() | zfs_unallow_001_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify '-l' only removed the local permissions." | atf_set "descr" "Verify '-l' only removed the local permissions." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_001_pos_body() | zfs_unallow_001_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_001_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_002_pos cleanup | atf_test_case zfs_unallow_002_pos cleanup | ||||
zfs_unallow_002_pos_head() | zfs_unallow_002_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify '-d' only removed the descendent permissions." | atf_set "descr" "Verify '-d' only removed the descendent permissions." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_002_pos_body() | zfs_unallow_002_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_002_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_003_pos cleanup | atf_test_case zfs_unallow_003_pos cleanup | ||||
zfs_unallow_003_pos_head() | zfs_unallow_003_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify options '-r' and '-l'+'-d' will unallow permission tothis dataset and the descendent datasets." | atf_set "descr" "Verify options '-r' and '-l'+'-d' will unallow permission tothis dataset and the descendent datasets." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_003_pos_body() | zfs_unallow_003_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_003_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_004_pos cleanup | atf_test_case zfs_unallow_004_pos cleanup | ||||
zfs_unallow_004_pos_head() | zfs_unallow_004_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify '-s' will remove permissions from the named set." | atf_set "descr" "Verify '-s' will remove permissions from the named set." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_004_pos_body() | zfs_unallow_004_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_004_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_005_pos cleanup | atf_test_case zfs_unallow_005_pos cleanup | ||||
zfs_unallow_005_pos_head() | zfs_unallow_005_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify option '-c' will remove the created permission set." | atf_set "descr" "Verify option '-c' will remove the created permission set." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_005_pos_body() | zfs_unallow_005_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_005_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_006_pos cleanup | atf_test_case zfs_unallow_006_pos cleanup | ||||
zfs_unallow_006_pos_head() | zfs_unallow_006_pos_head() | ||||
{ | { | ||||
atf_set "descr" "Verify option '-u', '-g' and '-e' only removed the specified typepermissions set." | atf_set "descr" "Verify option '-u', '-g' and '-e' only removed the specified typepermissions set." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_006_pos_body() | zfs_unallow_006_pos_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_006_pos_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_007_neg cleanup | atf_test_case zfs_unallow_007_neg cleanup | ||||
zfs_unallow_007_neg_head() | zfs_unallow_007_neg_head() | ||||
{ | { | ||||
atf_set "descr" "zfs unallow won't remove those permissions which inherited fromits parent dataset." | atf_set "descr" "zfs unallow won't remove those permissions which inherited fromits parent dataset." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_007_neg_body() | zfs_unallow_007_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 9 Lines | zfs_unallow_007_neg_cleanup() | ||||
ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" | ||||
} | } | ||||
atf_test_case zfs_unallow_008_neg cleanup | atf_test_case zfs_unallow_008_neg cleanup | ||||
zfs_unallow_008_neg_head() | zfs_unallow_008_neg_head() | ||||
{ | { | ||||
atf_set "descr" "zfs unallow can handle invalid arguments." | atf_set "descr" "zfs unallow can handle invalid arguments." | ||||
atf_set "require.progs" zfs sudo | atf_set "require.progs" "ksh93 zfs sudo" | ||||
} | } | ||||
zfs_unallow_008_neg_body() | zfs_unallow_008_neg_body() | ||||
{ | { | ||||
. $(atf_get_srcdir)/../../include/default.cfg | . $(atf_get_srcdir)/../../include/default.cfg | ||||
. $(atf_get_srcdir)/delegate_common.kshlib | . $(atf_get_srcdir)/delegate_common.kshlib | ||||
. $(atf_get_srcdir)/delegate.cfg | . $(atf_get_srcdir)/delegate.cfg | ||||
verify_disk_count "$DISKS" 1 | verify_disk_count "$DISKS" 1 | ||||
Show All 25 Lines |