Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/atime/atime_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/atime/atime_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/atime/atime_test.sh (revision 297878) @@ -1,88 +1,86 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case atime_001_pos cleanup atime_001_pos_head() { atf_set "descr" "Setting atime=on, the access time for files is updated when read." - atf_set "require.config" rt_short atf_set "require.progs" zfs } atime_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/atime_common.kshlib . $(atf_get_srcdir)/atime.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/atime_001_pos.ksh || atf_fail "Testcase failed" } atime_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/atime_common.kshlib . $(atf_get_srcdir)/atime.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case atime_002_neg cleanup atime_002_neg_head() { atf_set "descr" "Setting atime=off, the access time for files will not be updatedwhen read." - atf_set "require.config" rt_short atf_set "require.progs" zfs } atime_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/atime_common.kshlib . $(atf_get_srcdir)/atime.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/atime_002_neg.ksh || atf_fail "Testcase failed" } atime_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/atime_common.kshlib . $(atf_get_srcdir)/atime.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case atime_001_pos atf_add_test_case atime_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/bootfs/bootfs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/bootfs/bootfs_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/bootfs/bootfs_test.sh (revision 297878) @@ -1,192 +1,184 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case bootfs_001_pos bootfs_001_pos_head() { atf_set "descr" "Valid datasets are accepted as bootfs property values" - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool zfs } bootfs_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_002_neg bootfs_002_neg_head() { atf_set "descr" "Invalid datasets are rejected as boot property values" - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool } bootfs_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_002_neg.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_003_pos bootfs_003_pos_head() { atf_set "descr" "Valid pool names are accepted by zpool set bootfs" - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool zfs } bootfs_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_003_pos.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_004_neg bootfs_004_neg_head() { atf_set "descr" "Invalid pool names are rejected by zpool set bootfs" - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool zfs } bootfs_004_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_004_neg.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_005_neg bootfs_005_neg_head() { atf_set "descr" "Boot properties cannot be set on pools with older versions" - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool } bootfs_005_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_005_neg.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_006_pos bootfs_006_pos_head() { atf_set "descr" "Pools of correct vdev types accept boot property" - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool mkfile } bootfs_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_006_pos.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_007_pos bootfs_007_pos_head() { atf_set "descr" "setting bootfs on a pool which was configured with the whole disk will succeed" - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool } bootfs_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_007_pos.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_008_neg bootfs_008_neg_head() { atf_set "descr" "setting bootfs on a dataset which has gzip compression enabled will fail" - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool zfs } bootfs_008_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_008_neg.ksh || atf_fail "Testcase failed" } atf_test_case bootfs_009_neg bootfs_009_neg_head() { atf_set "descr" "Valid encrypted datasets can't be set bootfs property values" - atf_set "require.config" rt_short zfs_encryption + atf_set "require.config" zfs_encryption atf_set "require.progs" zfs zpool } bootfs_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/bootfs.cfg ksh93 $(atf_get_srcdir)/bootfs_009_neg.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case bootfs_001_pos atf_add_test_case bootfs_002_neg atf_add_test_case bootfs_003_pos atf_add_test_case bootfs_004_neg atf_add_test_case bootfs_005_neg atf_add_test_case bootfs_006_pos atf_add_test_case bootfs_007_pos atf_add_test_case bootfs_008_neg atf_add_test_case bootfs_009_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cache/cache_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cache/cache_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cache/cache_test.sh (revision 297878) @@ -1,360 +1,349 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case cache_001_pos cleanup cache_001_pos_head() { atf_set "descr" "Creating a pool with a cache device succeeds." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_001_pos.ksh || atf_fail "Testcase failed" } cache_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_002_pos cleanup cache_002_pos_head() { atf_set "descr" "Adding a cache device to normal pool works." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_002_pos.ksh || atf_fail "Testcase failed" } cache_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_003_pos cleanup cache_003_pos_head() { atf_set "descr" "Adding an extra cache device works." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_003_pos.ksh || atf_fail "Testcase failed" } cache_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_004_neg cleanup cache_004_neg_head() { atf_set "descr" "Attaching a cache device fails." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_004_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_004_neg.ksh || atf_fail "Testcase failed" } cache_004_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_005_neg cleanup cache_005_neg_head() { atf_set "descr" "Replacing a cache device fails." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_005_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_005_neg.ksh || atf_fail "Testcase failed" } cache_005_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_006_pos cleanup cache_006_pos_head() { atf_set "descr" "Exporting and importing pool with cache devices passes." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_006_pos.ksh || atf_fail "Testcase failed" } cache_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_007_neg cleanup cache_007_neg_head() { atf_set "descr" "A mirror/raidz/raidz2 cache is not supported." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_007_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_007_neg.ksh || atf_fail "Testcase failed" } cache_007_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_008_neg cleanup cache_008_neg_head() { atf_set "descr" "A raidz/raidz2 cache can not be added to existed pool." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_008_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_008_neg.ksh || atf_fail "Testcase failed" } cache_008_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_009_pos cleanup cache_009_pos_head() { atf_set "descr" "Offline and online a cache device succeed." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_009_pos.ksh || atf_fail "Testcase failed" } cache_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_010_neg cleanup cache_010_neg_head() { atf_set "descr" "Cache device can only be disk or slice." - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool mkfile atf_set "timeout" 1200 } cache_010_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_010_neg.ksh || atf_fail "Testcase failed" } cache_010_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_011_pos cleanup cache_011_pos_head() { atf_set "descr" "Remove cache device from pool with spare device should succeed" - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } cache_011_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_011_pos.ksh || atf_fail "Testcase failed" } cache_011_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cache.kshlib . $(atf_get_srcdir)/cache.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case cache_001_pos atf_add_test_case cache_002_pos atf_add_test_case cache_003_pos atf_add_test_case cache_004_neg atf_add_test_case cache_005_neg atf_add_test_case cache_006_pos atf_add_test_case cache_007_neg atf_add_test_case cache_008_neg atf_add_test_case cache_009_pos atf_add_test_case cache_010_neg atf_add_test_case cache_011_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cachefile/cachefile_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cachefile/cachefile_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cachefile/cachefile_test.sh (revision 297878) @@ -1,106 +1,102 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case cachefile_001_pos cachefile_001_pos_head() { atf_set "descr" "Creating a pool with \cachefile\ set doesn't update zpool.cache" - atf_set "require.config" rt_medium atf_set "require.progs" zpool } cachefile_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cachefile.kshlib . $(atf_get_srcdir)/cachefile.cfg ksh93 $(atf_get_srcdir)/cachefile_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case cachefile_002_pos cachefile_002_pos_head() { atf_set "descr" "Importing a pool with \cachefile\ set doesn't update zpool.cache" - atf_set "require.config" rt_medium atf_set "require.progs" zpool } cachefile_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cachefile.kshlib . $(atf_get_srcdir)/cachefile.cfg ksh93 $(atf_get_srcdir)/cachefile_002_pos.ksh || atf_fail "Testcase failed" } atf_test_case cachefile_003_pos cachefile_003_pos_head() { atf_set "descr" "Setting altroot=path and cachefile=$CPATH for zpool create succeed." - atf_set "require.config" rt_medium atf_set "require.progs" zpool } cachefile_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cachefile.kshlib . $(atf_get_srcdir)/cachefile.cfg ksh93 $(atf_get_srcdir)/cachefile_003_pos.ksh || atf_fail "Testcase failed" } atf_test_case cachefile_004_pos cachefile_004_pos_head() { atf_set "descr" "Verify set, export and destroy when cachefile is set on pool." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool } cachefile_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/cachefile.kshlib . $(atf_get_srcdir)/cachefile.cfg ksh93 $(atf_get_srcdir)/cachefile_004_pos.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case cachefile_001_pos atf_add_test_case cachefile_002_pos atf_add_test_case cachefile_003_pos atf_add_test_case cachefile_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_001/assertion_001_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_001/assertion_001_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_001/assertion_001_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case clean_mirror_001_pos cleanup clean_mirror_001_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely wipedwithout affecting the content of the pool" - atf_set "require.config" rt_medium } clean_mirror_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/clean_mirror_001_pos.ksh || atf_fail "Testcase failed" } clean_mirror_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case clean_mirror_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_002/assertion_002_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_002/assertion_002_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_002/assertion_002_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case clean_mirror_002_pos cleanup clean_mirror_002_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely wipedwithout affecting the content of the pool" - atf_set "require.config" rt_medium } clean_mirror_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/clean_mirror_002_pos.ksh || atf_fail "Testcase failed" } clean_mirror_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case clean_mirror_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_003/assertion_003_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_003/assertion_003_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_003/assertion_003_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case clean_mirror_003_pos cleanup clean_mirror_003_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely mangledwithout affecting the content of the pool" - atf_set "require.config" rt_medium } clean_mirror_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/clean_mirror_003_pos.ksh || atf_fail "Testcase failed" } clean_mirror_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case clean_mirror_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_004/assertion_004_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_004/assertion_004_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_004/assertion_004_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case clean_mirror_004_pos cleanup clean_mirror_004_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely mangledwithout affecting the content of the pool" - atf_set "require.config" rt_medium } clean_mirror_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/clean_mirror_004_pos.ksh || atf_fail "Testcase failed" } clean_mirror_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../clean_mirror_common.kshlib . $(atf_get_srcdir)/../default.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case clean_mirror_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh (revision 297878) @@ -1,301 +1,301 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zpool_add_001_pos cleanup zpool_add_001_pos_head() { atf_set "descr" "'zpool add ...' can add devices to the pool." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_001_pos.ksh || atf_fail "Testcase failed" } zpool_add_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_002_pos cleanup zpool_add_002_pos_head() { atf_set "descr" "'zpool add -f ...' can successfully adddevices to the pool in some cases." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_002_pos.ksh || atf_fail "Testcase failed" } zpool_add_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_003_pos cleanup zpool_add_003_pos_head() { atf_set "descr" "'zpool add -n ...' can display the configurationwithout actually adding devices to the pool." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_003_pos.ksh || atf_fail "Testcase failed" } zpool_add_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_004_pos cleanup zpool_add_004_pos_head() { atf_set "descr" "'zpool add ...' can add zfs volume to the pool." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 2400 } zpool_add_004_pos_body() { atf_expect_fail "BUG26166 Cannot create pools on zvols" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_004_pos.ksh || atf_fail "Testcase failed" } zpool_add_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_005_pos cleanup zpool_add_005_pos_head() { atf_set "descr" "'zpool add' should fail with inapplicable scenarios." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm zpool atf_set "timeout" 2400 } zpool_add_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_005_pos.ksh || atf_fail "Testcase failed" } zpool_add_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_006_pos cleanup zpool_add_006_pos_head() { atf_set "descr" "'zpool add [-f]' can add large numbers of vdevs to the specified pool without any errors." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs mkfile zpool atf_set "timeout" 2400 } zpool_add_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_006_pos.ksh || atf_fail "Testcase failed" } zpool_add_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_007_neg cleanup zpool_add_007_neg_head() { atf_set "descr" "'zpool add' should return an error with badly-formed parameters." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_007_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_007_neg.ksh || atf_fail "Testcase failed" } zpool_add_007_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_008_neg cleanup zpool_add_008_neg_head() { atf_set "descr" "'zpool add' should return an error with nonexistent pools and vdevs" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_008_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_008_neg.ksh || atf_fail "Testcase failed" } zpool_add_008_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_009_neg cleanup zpool_add_009_neg_head() { atf_set "descr" "'zpool add' should fail if vdevs are the same or vdev iscontained in the given pool." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_add_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_add_009_neg.ksh || atf_fail "Testcase failed" } zpool_add_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_add.kshlib . $(atf_get_srcdir)/zpool_add.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_add_001_pos atf_add_test_case zpool_add_002_pos atf_add_test_case zpool_add_003_pos atf_add_test_case zpool_add_004_pos atf_add_test_case zpool_add_005_pos atf_add_test_case zpool_add_006_pos atf_add_test_case zpool_add_007_neg atf_add_test_case zpool_add_008_neg atf_add_test_case zpool_add_009_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh (revision 297878) @@ -1,723 +1,723 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zpool_create_001_pos cleanup zpool_create_001_pos_head() { atf_set "descr" "'zpool create ...' can successfully createa new pool with a name in ZFS namespace." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" mkfile zpool atf_set "timeout" 2400 } zpool_create_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_001_pos.ksh || atf_fail "Testcase failed" } zpool_create_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_002_pos cleanup zpool_create_002_pos_head() { atf_set "descr" "'zpool create -f ...' can successfully createa new pool in some cases." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" mkfile zpool atf_set "timeout" 2400 } zpool_create_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_002_pos.ksh || atf_fail "Testcase failed" } zpool_create_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_003_pos cleanup zpool_create_003_pos_head() { atf_set "descr" "'zpool create -n ...' can display the configureationwithout actually creating the pool." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_003_pos.ksh || atf_fail "Testcase failed" } zpool_create_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_004_pos cleanup zpool_create_004_pos_head() { atf_set "descr" "'zpool create [-f]' can create a storage pool with large numbers of vdevswithout any errors." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs mkfile zpool atf_set "timeout" 2400 } zpool_create_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_004_pos.ksh || atf_fail "Testcase failed" } zpool_create_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_005_pos cleanup zpool_create_005_pos_head() { atf_set "descr" "'zpool create [-R root][-m mountpoint] ...' can createan alternate pool or a new pool mounted at the specified mountpoint." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" mkfile zpool zfs atf_set "timeout" 2400 } zpool_create_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_005_pos.ksh || atf_fail "Testcase failed" } zpool_create_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_006_pos cleanup zpool_create_006_pos_head() { atf_set "descr" "Verify 'zpool create' succeed with keywords combination." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" mkfile zpool atf_set "timeout" 2400 } zpool_create_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_006_pos.ksh || atf_fail "Testcase failed" } zpool_create_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_007_neg cleanup zpool_create_007_neg_head() { atf_set "descr" "'zpool create' should return an error with badly-formed parameters." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_007_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_007_neg.ksh || atf_fail "Testcase failed" } zpool_create_007_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_008_pos cleanup zpool_create_008_pos_head() { atf_set "descr" "'zpool create' have to use '-f' scenarios" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool format atf_set "timeout" 2400 } zpool_create_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_008_pos.ksh || atf_fail "Testcase failed" } zpool_create_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_009_neg cleanup zpool_create_009_neg_head() { atf_set "descr" "Create a pool with same devices twice or create two pools withsame devices, 'zpool create' should fail." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_009_neg.ksh || atf_fail "Testcase failed" } zpool_create_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_010_neg cleanup zpool_create_010_neg_head() { atf_set "descr" "'zpool create' should return an error with VDEVs <64mb" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs mkfile zpool atf_set "timeout" 2400 } zpool_create_010_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_010_neg.ksh || atf_fail "Testcase failed" } zpool_create_010_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_011_neg cleanup zpool_create_011_neg_head() { atf_set "descr" "'zpool create' should be failed with inapplicable scenarios." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm zpool atf_set "timeout" 2400 } zpool_create_011_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_011_neg.ksh || atf_fail "Testcase failed" } zpool_create_011_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_012_neg cleanup zpool_create_012_neg_head() { atf_set "descr" "'zpool create' should fail with disk slice in swap." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool swap atf_set "timeout" 2400 } zpool_create_012_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_012_neg.ksh || atf_fail "Testcase failed" } zpool_create_012_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_013_neg cleanup zpool_create_013_neg_head() { atf_set "descr" "'zpool create' should fail with metadevice in swap." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" metadb metaclear metastat zpool metainit swap atf_set "timeout" 2400 } zpool_create_013_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_013_neg.ksh || atf_fail "Testcase failed" } zpool_create_013_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_014_neg cleanup zpool_create_014_neg_head() { atf_set "descr" "'zpool create' should fail with regular file in swap." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs mkfile swap zpool atf_set "timeout" 2400 } zpool_create_014_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_014_neg.ksh || atf_fail "Testcase failed" } zpool_create_014_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_015_neg cleanup zpool_create_015_neg_head() { atf_set "descr" "'zpool create' should fail with zfs vol device in swap." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool swap atf_set "timeout" 2400 } zpool_create_015_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_015_neg.ksh || atf_fail "Testcase failed" } zpool_create_015_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_016_pos cleanup zpool_create_016_pos_head() { atf_set "descr" "'zpool create' should success with no device in swap." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm swapadd zpool swap atf_set "timeout" 2400 } zpool_create_016_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_016_pos.ksh || atf_fail "Testcase failed" } zpool_create_016_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_017_neg cleanup zpool_create_017_neg_head() { atf_set "descr" "'zpool create' should fail with mountpoint exists and not empty." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_017_neg_body() { [ `uname -s` = "FreeBSD" ] && atf_skip "FreeBSD does not consider creating pools on non-empty mountpoints a bug" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_017_neg.ksh || atf_fail "Testcase failed" } zpool_create_017_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_018_pos cleanup zpool_create_018_pos_head() { atf_set "descr" "zpool create can create pools with specified properties" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_018_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_018_pos.ksh || atf_fail "Testcase failed" } zpool_create_018_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_019_pos cleanup zpool_create_019_pos_head() { atf_set "descr" "zpool create cannot create pools specifying readonly properties" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_019_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_019_pos.ksh || atf_fail "Testcase failed" } zpool_create_019_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_020_pos cleanup zpool_create_020_pos_head() { atf_set "descr" "zpool create -R works as expected" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 2400 } zpool_create_020_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_020_pos.ksh || atf_fail "Testcase failed" } zpool_create_020_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_021_pos cleanup zpool_create_021_pos_head() { atf_set "descr" "'zpool create -O property=value pool' can successfully create a poolwith correct filesystem property set." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_021_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_021_pos.ksh || atf_fail "Testcase failed" } zpool_create_021_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_022_pos cleanup zpool_create_022_pos_head() { atf_set "descr" "'zpool create -O property=value pool' can successfully create a poolwith multiple filesystem properties set." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_022_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_022_pos.ksh || atf_fail "Testcase failed" } zpool_create_022_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_023_neg cleanup zpool_create_023_neg_head() { atf_set "descr" "'zpool create -O' should return an error with badly formed parameters." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 2400 } zpool_create_023_neg_body() { atf_expect_fail 'BUG26172: "zpool create" does not validate the sharenfs parameter' export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_create_023_neg.ksh || atf_fail "Testcase failed" } zpool_create_023_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_create_001_pos atf_add_test_case zpool_create_002_pos atf_add_test_case zpool_create_003_pos atf_add_test_case zpool_create_004_pos atf_add_test_case zpool_create_005_pos atf_add_test_case zpool_create_006_pos atf_add_test_case zpool_create_007_neg atf_add_test_case zpool_create_008_pos atf_add_test_case zpool_create_009_neg atf_add_test_case zpool_create_010_neg atf_add_test_case zpool_create_011_neg atf_add_test_case zpool_create_012_neg atf_add_test_case zpool_create_013_neg atf_add_test_case zpool_create_014_neg atf_add_test_case zpool_create_015_neg atf_add_test_case zpool_create_016_pos atf_add_test_case zpool_create_017_neg atf_add_test_case zpool_create_018_pos atf_add_test_case zpool_create_019_pos atf_add_test_case zpool_create_020_pos atf_add_test_case zpool_create_021_pos atf_add_test_case zpool_create_022_pos atf_add_test_case zpool_create_023_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh (revision 297878) @@ -1,614 +1,594 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zpool_import_002_pos cleanup zpool_import_002_pos_head() { atf_set "descr" "Verify that an exported pool can be imported and cannot be imported more than once." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool sum mkfile zdb atf_set "timeout" 2400 } zpool_import_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_002_pos.ksh || atf_fail "Testcase failed" } zpool_import_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_003_pos cleanup zpool_import_003_pos_head() { atf_set "descr" "Destroyed pools are not listed unless with -D option is specified." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs atf_set "timeout" 2400 } zpool_import_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_003_pos.ksh || atf_fail "Testcase failed" } zpool_import_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_004_pos cleanup zpool_import_004_pos_head() { atf_set "descr" "Destroyed pools devices was moved to another directory,it still can be imported correctly." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_004_pos.ksh || atf_fail "Testcase failed" } zpool_import_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_005_pos cleanup zpool_import_005_pos_head() { atf_set "descr" "Destroyed pools devices was renamed, it still can be importedcorrectly." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_005_pos.ksh || atf_fail "Testcase failed" } zpool_import_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_006_pos cleanup zpool_import_006_pos_head() { atf_set "descr" "For mirror, N-1 destroyed pools devices was removed or usedby other pool, it still can be imported correctly." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_006_pos.ksh || atf_fail "Testcase failed" } zpool_import_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_007_pos cleanup zpool_import_007_pos_head() { atf_set "descr" "For raidz, one destroyed pools devices was removed or used byother pool, it still can be imported correctly." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_007_pos.ksh || atf_fail "Testcase failed" } zpool_import_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_008_pos cleanup zpool_import_008_pos_head() { atf_set "descr" "For raidz2, two destroyed pools devices was removed or used byother pool, it still can be imported correctly." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_008_pos.ksh || atf_fail "Testcase failed" } zpool_import_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_009_neg cleanup zpool_import_009_neg_head() { atf_set "descr" "Badly-formed 'zpool import' with inapplicable scenariosshould return an error." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool mkfile atf_set "timeout" 2400 } zpool_import_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_009_neg.ksh || atf_fail "Testcase failed" } zpool_import_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_010_pos cleanup zpool_import_010_pos_head() { atf_set "descr" "'zpool -D -a' can import all the specified directoriesdestroyed pools." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs atf_set "timeout" 2400 } zpool_import_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_010_pos.ksh || atf_fail "Testcase failed" } zpool_import_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_011_neg cleanup zpool_import_011_neg_head() { atf_set "descr" "For strip pool, any destroyed pool devices was demaged,zpool import -D will failed." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_011_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_011_neg.ksh || atf_fail "Testcase failed" } zpool_import_011_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_012_pos cleanup zpool_import_012_pos_head() { atf_set "descr" "Verify all mount & share status of sub-filesystems within a poolcan be restored after import [-Df]." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool mkfile zdb share atf_set "timeout" 2400 } zpool_import_012_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_012_pos.ksh || atf_fail "Testcase failed" } zpool_import_012_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_013_neg cleanup zpool_import_013_neg_head() { atf_set "descr" "'zpool import' fail while pool may be in use from other system,it need import forcefully." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool mkfile atf_set "timeout" 2400 } zpool_import_013_neg_body() { atf_expect_fail 'BUG26195: "zpool import" without "-f" will import foreign, in-use, downrev pools' export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_013_neg.ksh || atf_fail "Testcase failed" } zpool_import_013_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_014_pos cleanup zpool_import_014_pos_head() { atf_set "descr" "'zpool import' can import destroyed disk-backed pools" - atf_set "require.config" rt_short atf_set "require.config" at_least_1_disks atf_set "require.progs" zfs zpool } zpool_import_014_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/zpool_import_014_pos.ksh || atf_fail "Testcase failed" } zpool_import_014_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_all_001_pos cleanup zpool_import_all_001_pos_head() { atf_set "descr" "Verify that 'zpool import -a' succeeds as root." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool sum mkfile atf_set "timeout" 2400 } zpool_import_all_001_pos_body() { atf_skip "This test relies heavily on Solaris slices. It could be ported, but that is difficult due to the high degree of obfuscation in the code" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_all_001_pos.ksh || atf_fail "Testcase failed" } zpool_import_all_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_missing_001_pos cleanup zpool_import_missing_001_pos_head() { atf_set "descr" "Verify that import could handle damaged or missing device." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zfs sum zpool zdb atf_set "timeout" 2400 } zpool_import_missing_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_missing_001_pos.ksh || atf_fail "Testcase failed" } zpool_import_missing_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_missing_002_pos cleanup zpool_import_missing_002_pos_head() { atf_set "descr" "Verify that import could handle moving device." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfs zdb atf_set "timeout" 2400 } zpool_import_missing_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_missing_002_pos.ksh || atf_fail "Testcase failed" } zpool_import_missing_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_missing_003_pos cleanup zpool_import_missing_003_pos_head() { atf_set "descr" "Verify that import could handle device overlapped." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool sum zfs atf_set "timeout" 2400 } zpool_import_missing_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_missing_003_pos.ksh || atf_fail "Testcase failed" } zpool_import_missing_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_missing_004_pos zpool_import_missing_004_pos_head() { atf_set "descr" "Verify that zpool import succeeds when devices are missing" - atf_set "require.config" rt_short atf_set "require.progs" mkfile zfs zpool atf_set "timeout" 300 } zpool_import_missing_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/zpool_import_missing_004_pos.ksh || atf_fail "Testcase failed" } atf_test_case zpool_import_missing_005_pos zpool_import_missing_005_pos_head() { atf_set "descr" "Verify that zpool import succeeds when devices of all types have been renamed" atf_set "require.progs" mkfile mdconfig zfs zpool atf_set "timeout" 300 } zpool_import_missing_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/zpool_import_missing_005_pos.ksh || atf_fail "Testcase failed" } atf_test_case zpool_import_rename_001_pos cleanup zpool_import_rename_001_pos_head() { atf_set "descr" "Verify that an imported pool can be renamed." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool sum mkfile zdb atf_set "timeout" 2400 } zpool_import_rename_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_import_rename_001_pos.ksh || atf_fail "Testcase failed" } zpool_import_rename_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_corrupt_001_pos cleanup zpool_import_corrupt_001_pos_head() { atf_set "descr" "Verify that a disk-backed exported pool with some of its vdev labels corrupted can still be imported" - atf_set "require.config" rt_medium atf_set "require.config" at_least_1_disks atf_set "require.progs" zfs zpool zdb atf_set "timeout" 2400 } zpool_import_corrupt_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/zpool_import_corrupt_001_pos.ksh || atf_fail "Testcase failed" } zpool_import_corrupt_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_import.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_import_002_pos atf_add_test_case zpool_import_003_pos atf_add_test_case zpool_import_004_pos atf_add_test_case zpool_import_005_pos atf_add_test_case zpool_import_006_pos atf_add_test_case zpool_import_007_pos atf_add_test_case zpool_import_008_pos atf_add_test_case zpool_import_009_neg atf_add_test_case zpool_import_010_pos atf_add_test_case zpool_import_011_neg atf_add_test_case zpool_import_012_pos atf_add_test_case zpool_import_013_neg atf_add_test_case zpool_import_014_pos atf_add_test_case zpool_import_all_001_pos atf_add_test_case zpool_import_missing_001_pos atf_add_test_case zpool_import_missing_002_pos atf_add_test_case zpool_import_missing_003_pos atf_add_test_case zpool_import_missing_004_pos atf_add_test_case zpool_import_missing_005_pos atf_add_test_case zpool_import_rename_001_pos atf_add_test_case zpool_import_corrupt_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh (revision 297878) @@ -1,314 +1,305 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zpool_upgrade_001_pos cleanup zpool_upgrade_001_pos_head() { atf_set "descr" "Executing 'zpool upgrade -v' command succeeds." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_001_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_002_pos cleanup zpool_upgrade_002_pos_head() { atf_set "descr" "Import pools of all versions - zpool upgrade on each pools works" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_002_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_003_pos cleanup zpool_upgrade_003_pos_head() { atf_set "descr" "Upgrading a pool that has already been upgraded succeeds." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_003_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_004_pos cleanup zpool_upgrade_004_pos_head() { atf_set "descr" "zpool upgrade -a works" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg [[ -n "$KEEP" ]] && \ atf_skip "Can't test unmount -a when pools are in KEEP" ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_004_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_005_neg cleanup zpool_upgrade_005_neg_head() { atf_set "descr" "Variations of upgrade -v print usage message,return with non-zero status" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_005_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_005_neg.ksh || atf_fail "Testcase failed" } zpool_upgrade_005_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_006_neg cleanup zpool_upgrade_006_neg_head() { atf_set "descr" "Attempting to upgrade a non-existent pool will return an error" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_006_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_006_neg.ksh || atf_fail "Testcase failed" } zpool_upgrade_006_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_007_pos cleanup zpool_upgrade_007_pos_head() { atf_set "descr" "Import pools of all versions - 'zfs upgrade' on each pools works" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool # This test can take quite a while, especially on debug bits. atf_set "timeout" 7200 } zpool_upgrade_007_pos_body() { atf_fail "This test causes a panic on FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_007_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_008_pos cleanup zpool_upgrade_008_pos_head() { atf_set "descr" "Zpool upgrade should be able to upgrade pools to a given version using -V" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_008_pos.ksh || atf_fail "Testcase failed" } zpool_upgrade_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_009_neg cleanup zpool_upgrade_009_neg_head() { atf_set "descr" "Zpool upgrade -V shouldn't be able to upgrade a pool to an unknown version" - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool atf_set "timeout" 1800 } zpool_upgrade_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_upgrade_009_neg.ksh || atf_fail "Testcase failed" } zpool_upgrade_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_upgrade.kshlib . $(atf_get_srcdir)/zpool_upgrade.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_upgrade_001_pos atf_add_test_case zpool_upgrade_002_pos atf_add_test_case zpool_upgrade_003_pos atf_add_test_case zpool_upgrade_004_pos atf_add_test_case zpool_upgrade_005_neg atf_add_test_case zpool_upgrade_006_neg atf_add_test_case zpool_upgrade_007_pos atf_add_test_case zpool_upgrade_008_pos atf_add_test_case zpool_upgrade_009_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/compression/compression_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/compression/compression_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/compression/compression_test.sh (revision 297878) @@ -1,114 +1,111 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case compress_001_pos cleanup compress_001_pos_head() { atf_set "descr" "Ensure that compressed files are smaller." - atf_set "require.config" rt_long atf_set "require.progs" zfs } compress_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/compress_001_pos.ksh || atf_fail "Testcase failed" } compress_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case compress_003_pos cleanup compress_003_pos_head() { atf_set "descr" "Changing blocksize doesn't casue system panic with compression settings" - atf_set "require.config" rt_long atf_set "require.progs" zfs mkfile } compress_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/compress_003_pos.ksh || atf_fail "Testcase failed" } compress_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case compress_004_pos cleanup compress_004_pos_head() { atf_set "descr" "Creating non-power-of-2 blocksize file and freeing the filestorage space at will should work normally with compression setting" - atf_set "require.config" rt_long atf_set "require.progs" zfs } compress_004_pos_body() { if [[ $(uname) = "FreeBSD" ]]; then atf_skip "FreeBSD does not implement F_FREESP in fcntl()" fi export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/compress_004_pos.ksh || atf_fail "Testcase failed" } compress_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/compress.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case compress_001_pos atf_add_test_case compress_003_pos atf_add_test_case compress_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/ctime/ctime_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/ctime/ctime_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/ctime/ctime_test.sh (revision 297878) @@ -1,57 +1,56 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2014 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case ctime_001_pos cleanup ctime_001_pos_head() { atf_set "descr" "A file's ctime should change when the file is modified" - atf_set "require.config" rt_short atf_set "require.progs" zfs } ctime_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/ctime.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" $(atf_get_srcdir)/ctime_001_pos || atf_fail "Testcase failed" } ctime_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/ctime.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case ctime_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_allow/zfs_allow_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_allow/zfs_allow_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_allow/zfs_allow_test.sh (revision 297878) @@ -1,367 +1,366 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zfs_allow_001_pos cleanup zfs_allow_001_pos_head() { atf_set "descr" "everyone' is interpreted as a keyword even if a useror group named 'everyone' exists." atf_set "require.progs" zfs svcs } zfs_allow_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_001_pos.ksh || atf_fail "Testcase failed" } zfs_allow_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_002_pos cleanup zfs_allow_002_pos_head() { atf_set "descr" " is interpreted as user if possible, then as group." atf_set "require.progs" zfs svcs } zfs_allow_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_002_pos.ksh || atf_fail "Testcase failed" } zfs_allow_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_003_pos cleanup zfs_allow_003_pos_head() { atf_set "descr" "Verify option '-l' only allow permission to the dataset itself." atf_set "require.progs" zfs svcs } zfs_allow_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_003_pos.ksh || atf_fail "Testcase failed" } zfs_allow_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_004_pos cleanup zfs_allow_004_pos_head() { atf_set "descr" "Verify option '-d' allow permission to the descendent datasets." atf_set "require.progs" zfs svcs } zfs_allow_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_004_pos.ksh || atf_fail "Testcase failed" } zfs_allow_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_005_pos cleanup zfs_allow_005_pos_head() { atf_set "descr" "Verify option '-c' will be granted locally to the creator." atf_set "require.progs" zfs svcs runwattr } zfs_allow_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_005_pos.ksh || atf_fail "Testcase failed" } zfs_allow_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_006_pos cleanup zfs_allow_006_pos_head() { atf_set "descr" "Changing permissions in a set will change what is allowedwherever the set is used." atf_set "require.progs" zfs svcs } zfs_allow_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_006_pos.ksh || atf_fail "Testcase failed" } zfs_allow_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_007_pos cleanup zfs_allow_007_pos_head() { atf_set "descr" "Verify permission set can be masked on descendent dataset." atf_set "require.progs" zfs svcs } zfs_allow_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_007_pos.ksh || atf_fail "Testcase failed" } zfs_allow_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_008_pos cleanup zfs_allow_008_pos_head() { atf_set "descr" "Verify non-root user can allow permissions." atf_set "require.progs" zfs svcs runwattr } zfs_allow_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_008_pos.ksh || atf_fail "Testcase failed" } zfs_allow_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_009_neg cleanup zfs_allow_009_neg_head() { atf_set "descr" "Verify invalid arguments are handled correctly." atf_set "require.progs" zfs svcs } zfs_allow_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_009_neg.ksh || atf_fail "Testcase failed" } zfs_allow_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_010_pos cleanup zfs_allow_010_pos_head() { atf_set "descr" "Verify privileged user has correct permissions once which wasdelegated to him in datasets" atf_set "require.progs" zfs svcs } zfs_allow_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_010_pos.ksh || atf_fail "Testcase failed" } zfs_allow_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_011_neg cleanup zfs_allow_011_neg_head() { atf_set "descr" "Verify zpool subcmds and system readonly properties can't bedelegated." atf_set "require.progs" zfs svcs } zfs_allow_011_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_011_neg.ksh || atf_fail "Testcase failed" } zfs_allow_011_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_012_neg cleanup zfs_allow_012_neg_head() { atf_set "descr" "Verify privileged user can not use permissions properly whendelegation property is set off" - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool svcs } zfs_allow_012_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_allow_012_neg.ksh || atf_fail "Testcase failed" } zfs_allow_012_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_allow_001_pos atf_add_test_case zfs_allow_002_pos atf_add_test_case zfs_allow_003_pos atf_add_test_case zfs_allow_004_pos atf_add_test_case zfs_allow_005_pos atf_add_test_case zfs_allow_006_pos atf_add_test_case zfs_allow_007_pos atf_add_test_case zfs_allow_008_pos atf_add_test_case zfs_allow_009_neg atf_add_test_case zfs_allow_010_pos atf_add_test_case zfs_allow_011_neg atf_add_test_case zfs_allow_012_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_test.sh (revision 297878) @@ -1,118 +1,115 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case devices_001_pos cleanup devices_001_pos_head() { atf_set "descr" "Setting devices=on on file system, the devices files in this filesystem can be used." - atf_set "require.config" rt_short atf_set "require.progs" zfs } devices_001_pos_body() { atf_expect_fail "The devices property is not yet supported on FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/devices_001_pos.ksh || atf_fail "Testcase failed" } devices_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case devices_002_neg cleanup devices_002_neg_head() { atf_set "descr" "Setting devices=off on file system, the devices files in this filesystem can not be used." - atf_set "require.config" rt_short atf_set "require.progs" zfs } devices_002_neg_body() { atf_expect_fail "The devices property is not yet supported on FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/devices_002_neg.ksh || atf_fail "Testcase failed" } devices_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case devices_003_pos cleanup devices_003_pos_head() { atf_set "descr" "Writing random data into /dev/zfs should do no harm." - atf_set "require.config" rt_short } devices_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/devices_003_pos.ksh || atf_fail "Testcase failed" } devices_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/devices_common.kshlib . $(atf_get_srcdir)/devices.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case devices_001_pos atf_add_test_case devices_002_neg atf_add_test_case devices_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/exec/exec_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/exec/exec_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/exec/exec_test.sh (revision 297878) @@ -1,83 +1,81 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case exec_001_pos cleanup exec_001_pos_head() { atf_set "descr" "Setting exec=on on a filesystem, processes can be executed fromthis file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs } exec_001_pos_body() { export PATH=$(atf_get_srcdir):$PATH export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/exec_001_pos.ksh || atf_fail "Testcase failed" } exec_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case exec_002_neg cleanup exec_002_neg_head() { atf_set "descr" "Setting exec=off on a filesystem, processes can not be executedfrom this file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs } exec_002_neg_body() { atf_expect_fail "FreeBSD does not enforce the exec property for mmap(): TeamTrack BUG25314" PATH=$(atf_get_srcdir):$PATH export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/exec_002_neg.ksh || atf_fail "Testcase failed" } exec_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case exec_001_pos atf_add_test_case exec_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_pool/grow_pool_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_pool/grow_pool_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_pool/grow_pool_test.sh (revision 297878) @@ -1,57 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case grow_pool_001_pos cleanup grow_pool_001_pos_head() { atf_set "descr" "A zpool may be increased in capacity by adding a disk" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool } grow_pool_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/grow_pool.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/grow_pool_001_pos.ksh || atf_fail "Testcase failed" } grow_pool_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/grow_pool.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case grow_pool_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_replicas/grow_replicas_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_replicas/grow_replicas_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_replicas/grow_replicas_test.sh (revision 297878) @@ -1,57 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case grow_replicas_001_pos cleanup grow_replicas_001_pos_head() { atf_set "descr" "A zpool mirror/raidz may be increased in capacity by adding a disk." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool } grow_replicas_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/grow_replicas.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/grow_replicas_001_pos.ksh || atf_fail "Testcase failed" } grow_replicas_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/grow_replicas.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case grow_replicas_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/history/history_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/history/history_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/history/history_test.sh (revision 297878) @@ -1,319 +1,309 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case history_001_pos history_001_pos_head() { atf_set "descr" "Verify zpool sub-commands which modify state are logged." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool nawk atf_set "timeout" 1800 } history_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/history_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case history_002_pos cleanup history_002_pos_head() { atf_set "descr" "Verify zfs sub-commands which modify state are logged." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_002_pos.ksh || atf_fail "Testcase failed" } history_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_003_pos cleanup history_003_pos_head() { atf_set "descr" "zpool history limitation test." - atf_set "require.config" rt_long atf_set "require.progs" zpool zfs atf_set "timeout" 1800 } history_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_003_pos.ksh || atf_fail "Testcase failed" } history_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_004_pos cleanup history_004_pos_head() { atf_set "descr" "'zpool history' can copes with many simultaneous command." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_004_pos.ksh || atf_fail "Testcase failed" } history_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_005_neg cleanup history_005_neg_head() { atf_set "descr" "Verify 'zpool list|status|iostat' will not be logged." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 1800 } history_005_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_005_neg.ksh || atf_fail "Testcase failed" } history_005_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_006_neg cleanup history_006_neg_head() { atf_set "descr" "Verify 'zfs list|get|mount|unmount|share|unshare|send' will notbe logged." - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_006_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_006_neg.ksh || atf_fail "Testcase failed" } history_006_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_007_pos cleanup history_007_pos_head() { atf_set "descr" "Verify command history moves with pool while migrating." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 1800 } history_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_007_pos.ksh || atf_fail "Testcase failed" } history_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_008_pos cleanup history_008_pos_head() { atf_set "descr" "Internal journal records all the recursively operations." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_008_pos.ksh || atf_fail "Testcase failed" } history_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_009_pos cleanup history_009_pos_head() { atf_set "descr" "Verify the delegation internal history are correctly." - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_009_pos.ksh || atf_fail "Testcase failed" } history_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case history_010_pos cleanup history_010_pos_head() { atf_set "descr" "Verify internal long history information are correct." - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } history_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/history_010_pos.ksh || atf_fail "Testcase failed" } history_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/history_common.kshlib . $(atf_get_srcdir)/history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case history_001_pos atf_add_test_case history_002_pos atf_add_test_case history_003_pos atf_add_test_case history_004_pos atf_add_test_case history_005_neg atf_add_test_case history_006_neg atf_add_test_case history_007_pos atf_add_test_case history_008_pos atf_add_test_case history_009_pos atf_add_test_case history_010_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotplug/hotplug_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotplug/hotplug_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotplug/hotplug_test.sh (revision 297878) @@ -1,360 +1,349 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case hotplug_001_pos cleanup hotplug_001_pos_head() { atf_set "descr" "When removing a device from a redundant pool, the device'sstate will be indicated as 'REMOVED'. No FMA faulty message." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_001_pos.ksh || atf_fail "Testcase failed" } hotplug_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_002_pos cleanup hotplug_002_pos_head() { atf_set "descr" "When removing and reinserting a device, the device status isONLINE with no FMA errors." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_002_pos.ksh || atf_fail "Testcase failed" } hotplug_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_003_pos cleanup hotplug_003_pos_head() { atf_set "descr" "Having removed a device from a redundant pool and inserted a newdevice, the new device state will be 'ONLINE' when autoreplace is on,\and 'UNAVAIL' when autoreplace is off" - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_003_pos.ksh || atf_fail "Testcase failed" } hotplug_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_004_pos cleanup hotplug_004_pos_head() { atf_set "descr" "When device replacement fails, the original device's state willbe 'UNAVAIL' and an FMA fault will be generated." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_004_pos.ksh || atf_fail "Testcase failed" } hotplug_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_005_pos cleanup hotplug_005_pos_head() { atf_set "descr" "Regarding of autoreplace, when removing offline device andreinserting again. This device's status is 'ONLINE'. \No FMA fault was generated." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_005_pos.ksh || atf_fail "Testcase failed" } hotplug_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_006_pos cleanup hotplug_006_pos_head() { atf_set "descr" "When unsetting/setting autoreplace, then replacing device, verifythe device's status is 'UNAVAIL/ONLINE'. No FMA fault is generated." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_006_pos.ksh || atf_fail "Testcase failed" } hotplug_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_007_pos cleanup hotplug_007_pos_head() { atf_set "descr" "When autoreplace is 'on', replacing the device with a smaller one.Verify the device's status is 'UNAVAIL'. FMA fault has been generated." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_007_pos.ksh || atf_fail "Testcase failed" } hotplug_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_008_pos cleanup hotplug_008_pos_head() { atf_set "descr" "When removing hotspare device, verify device status is 'REMOVED'." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1800 } hotplug_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_008_pos.ksh || atf_fail "Testcase failed" } hotplug_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_009_pos cleanup hotplug_009_pos_head() { atf_set "descr" "Power off machine and replacing device, verify device status isONLINE when autoreplace is on and UNAVAIL when autoreplace is off" - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm svcadm svcs atf_set "timeout" 1800 } hotplug_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_009_pos.ksh || atf_fail "Testcase failed" } hotplug_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_010_pos cleanup hotplug_010_pos_head() { atf_set "descr" "Removing device offlined and reinserting onlined,verify the device status ONLINE." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm svcadm svcs atf_set "timeout" 1800 } hotplug_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_010_pos.ksh || atf_fail "Testcase failed" } hotplug_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotplug_011_pos cleanup hotplug_011_pos_head() { atf_set "descr" "Removing device offlined, verify device status is UNAVAIL,when the system is onlined." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool lofiadm svcadm svcs atf_set "timeout" 1800 } hotplug_011_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotplug_011_pos.ksh || atf_fail "Testcase failed" } hotplug_011_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotplug.kshlib . $(atf_get_srcdir)/hotplug.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case hotplug_001_pos atf_add_test_case hotplug_002_pos atf_add_test_case hotplug_003_pos atf_add_test_case hotplug_004_pos atf_add_test_case hotplug_005_pos atf_add_test_case hotplug_006_pos atf_add_test_case hotplug_007_pos atf_add_test_case hotplug_008_pos atf_add_test_case hotplug_009_pos atf_add_test_case hotplug_010_pos atf_add_test_case hotplug_011_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh (revision 297878) @@ -1,871 +1,846 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case hotspare_add_001_pos cleanup hotspare_add_001_pos_head() { atf_set "descr" "'zpool add spare ...' can add devices to the pool." - atf_set "require.config" rt_short atf_set "timeout" 3600 } hotspare_add_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_add_001_pos.ksh || atf_fail "Testcase failed" } hotspare_add_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_add_002_pos cleanup hotspare_add_002_pos_head() { atf_set "descr" "'zpool add spare ...' can add devices to the pool while it has spare-in device." - atf_set "require.config" rt_medium atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_add_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_add_002_pos.ksh || atf_fail "Testcase failed" } hotspare_add_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_add_003_neg cleanup hotspare_add_003_neg_head() { atf_set "descr" "'zpool add [-f]' with hot spares should fail with inapplicable scenarios." - atf_set "require.config" rt_short disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_add_003_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_add_003_neg.ksh || atf_fail "Testcase failed" } hotspare_add_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_add_004_neg cleanup hotspare_add_004_neg_head() { atf_set "descr" "'zpool add [-f]' will not allow a swap device to be used as a hotspare'" - atf_set "require.config" rt_short disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool swapon swapoff swapctl } hotspare_add_004_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_add_004_neg.ksh || atf_fail "Testcase failed" } hotspare_add_004_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_clone_001_pos cleanup hotspare_clone_001_pos_head() { atf_set "descr" "'zpool detach ...' against hotspare should do no harm to clone." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool sum atf_set "timeout" 3600 } hotspare_clone_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_clone_001_pos.ksh || atf_fail "Testcase failed" } hotspare_clone_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_clone_002_pos cleanup hotspare_clone_002_pos_head() { atf_set "descr" "'zpool detach ...' against basic vdev should do no harm to clone." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool sum atf_set "timeout" 3600 } hotspare_clone_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_clone_002_pos.ksh || atf_fail "Testcase failed" } hotspare_clone_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_create_001_neg cleanup hotspare_create_001_neg_head() { atf_set "descr" "'zpool create [-f]' with hot spares should be failedwith inapplicable scenarios." - atf_set "require.config" rt_short disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm zpool atf_set "timeout" 3600 } hotspare_create_001_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_create_001_neg.ksh || atf_fail "Testcase failed" } hotspare_create_001_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_detach_001_pos cleanup hotspare_detach_001_pos_head() { atf_set "descr" "'zpool detach ...' should deactivate the spared-in hot spare device successfully." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 3600 } hotspare_detach_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_detach_001_pos.ksh || atf_fail "Testcase failed" } hotspare_detach_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_detach_002_pos cleanup hotspare_detach_002_pos_head() { atf_set "descr" "'zpool detach ...' against a functioning device that have spared should take the hot spare permanently swapping in successfully." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_detach_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_detach_002_pos.ksh || atf_fail "Testcase failed" } hotspare_detach_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_detach_003_pos cleanup hotspare_detach_003_pos_head() { atf_set "descr" "'zpool replace ' against a functioning device that have spared should complete and the hot spare should return to available." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_detach_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_detach_003_pos.ksh || atf_fail "Testcase failed" } hotspare_detach_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_detach_004_pos cleanup hotspare_detach_004_pos_head() { atf_set "descr" "'zpool replace ' against a hot spare device that have been activated should successful while the another dev is a available hot spare." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_detach_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_detach_004_pos.ksh || atf_fail "Testcase failed" } hotspare_detach_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_detach_005_neg cleanup hotspare_detach_005_neg_head() { atf_set "descr" "'zpool detach ' against a hot spare device that NOT activated should fail and issue an error message." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_detach_005_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_detach_005_neg.ksh || atf_fail "Testcase failed" } hotspare_detach_005_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_export_001_neg cleanup hotspare_export_001_neg_head() { atf_set "descr" "export pool that using shared hotspares will fail" - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_export_001_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_export_001_neg.ksh || atf_fail "Testcase failed" } hotspare_export_001_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_import_001_pos cleanup hotspare_import_001_pos_head() { atf_set "descr" "'zpool export/import ' should runs successfully regardless the hotspare is only in list, activated, or offline." - atf_set "require.config" rt_long atf_set "require.progs" zpool sum atf_set "timeout" 3600 } hotspare_import_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_import_001_pos.ksh || atf_fail "Testcase failed" } hotspare_import_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_onoffline_003_neg cleanup hotspare_onoffline_003_neg_head() { atf_set "descr" "'zpool offline/online ' against a hot spare works as expect." - atf_set "require.config" rt_short atf_set "require.progs" zpool zdb atf_set "timeout" 3600 } hotspare_onoffline_003_neg_body() { atf_expect_fail "This testcase has always failed on FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_onoffline_003_neg.ksh || atf_fail "Testcase failed" } hotspare_onoffline_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_onoffline_004_neg cleanup hotspare_onoffline_004_neg_head() { atf_set "descr" "'zpool offline/online ' against a spared basic vdev during I/O completes." - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool zdb atf_set "timeout" 3600 } hotspare_onoffline_004_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_onoffline_004_neg.ksh || atf_fail "Testcase failed" } hotspare_onoffline_004_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_remove_001_pos cleanup hotspare_remove_001_pos_head() { atf_set "descr" "'zpool remove ...' can remove spare device from the pool." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_remove_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_remove_001_pos.ksh || atf_fail "Testcase failed" } hotspare_remove_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_remove_002_neg cleanup hotspare_remove_002_neg_head() { atf_set "descr" "'zpool remove ...' should fail with inapplicable scenarios." - atf_set "require.config" rt_medium atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_remove_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_remove_002_neg.ksh || atf_fail "Testcase failed" } hotspare_remove_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_remove_003_neg cleanup hotspare_remove_003_neg_head() { atf_set "descr" "Executing 'zpool remove' with bad options fails" - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_remove_003_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_remove_003_neg.ksh || atf_fail "Testcase failed" } hotspare_remove_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_remove_004_pos cleanup hotspare_remove_004_pos_head() { atf_set "descr" "'zpool remove ...' can remove spare device from the pool." - atf_set "require.config" rt_medium atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_remove_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_remove_004_pos.ksh || atf_fail "Testcase failed" } hotspare_remove_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_replace_001_neg cleanup hotspare_replace_001_neg_head() { atf_set "descr" "'zpool replace ' should fail with inapplicable scenarios." - atf_set "require.config" rt_medium atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_replace_001_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_replace_001_neg.ksh || atf_fail "Testcase failed" } hotspare_replace_001_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_replace_002_neg cleanup hotspare_replace_002_neg_head() { atf_set "descr" "'zpool replace ' should fail while the hot spares smaller than the basic vdev." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 3600 } hotspare_replace_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_replace_002_neg.ksh || atf_fail "Testcase failed" } hotspare_replace_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_replace_003_neg cleanup hotspare_replace_003_neg_head() { atf_set "descr" "'zpool replace' of disabled hotspares should result in ignoring them after destroy." - atf_set "require.config" rt_short atf_set "require.progs" camcontrol zpool atf_set "require.config" at_least_5_disks atf_set "timeout" 3600 } hotspare_replace_003_neg_body() { atf_expect_fail "Rally: DE189: ZFS config management needs improvement" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_replace_003_neg.ksh || atf_fail "Testcase failed" } hotspare_replace_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_scrub_001_pos cleanup hotspare_scrub_001_pos_head() { atf_set "descr" "'zpool scrub ' should runs successfully regardlessthe hotspare is only in list or activated." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 3600 } hotspare_scrub_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_scrub_001_pos.ksh || atf_fail "Testcase failed" } hotspare_scrub_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_scrub_002_pos cleanup hotspare_scrub_002_pos_head() { atf_set "descr" "'zpool scrub' scans spare vdevs" - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool } hotspare_scrub_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_scrub_002_pos.ksh || atf_fail "Testcase failed" } hotspare_scrub_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_shared_001_pos cleanup hotspare_shared_001_pos_head() { atf_set "descr" "'zpool add spare ...' can add a disk as a shared spare to multiple pools." - atf_set "require.config" rt_medium atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool atf_set "timeout" 3600 } hotspare_shared_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_shared_001_pos.ksh || atf_fail "Testcase failed" } hotspare_shared_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_snapshot_001_pos cleanup hotspare_snapshot_001_pos_head() { atf_set "descr" "'zpool detach ...' against hotspare should do no harm to snapshot." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool sum atf_set "timeout" 3600 } hotspare_snapshot_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_snapshot_001_pos.ksh || atf_fail "Testcase failed" } hotspare_snapshot_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case hotspare_snapshot_002_pos cleanup hotspare_snapshot_002_pos_head() { atf_set "descr" "'zpool detach ...' against basic vdev do no harm to snapshot." - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool sum atf_set "timeout" 3600 } hotspare_snapshot_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/hotspare_snapshot_002_pos.ksh || atf_fail "Testcase failed" } hotspare_snapshot_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/hotspare.kshlib . $(atf_get_srcdir)/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case hotspare_add_001_pos atf_add_test_case hotspare_add_002_pos atf_add_test_case hotspare_add_003_neg atf_add_test_case hotspare_add_004_neg atf_add_test_case hotspare_clone_001_pos atf_add_test_case hotspare_clone_002_pos atf_add_test_case hotspare_create_001_neg atf_add_test_case hotspare_detach_001_pos atf_add_test_case hotspare_detach_002_pos atf_add_test_case hotspare_detach_003_pos atf_add_test_case hotspare_detach_004_pos atf_add_test_case hotspare_detach_005_neg atf_add_test_case hotspare_export_001_neg atf_add_test_case hotspare_import_001_pos atf_add_test_case hotspare_onoffline_003_neg atf_add_test_case hotspare_onoffline_004_neg atf_add_test_case hotspare_remove_001_pos atf_add_test_case hotspare_remove_002_neg atf_add_test_case hotspare_remove_003_neg atf_add_test_case hotspare_remove_004_pos atf_add_test_case hotspare_replace_001_neg atf_add_test_case hotspare_replace_002_neg atf_add_test_case hotspare_replace_003_neg atf_add_test_case hotspare_scrub_001_pos atf_add_test_case hotspare_scrub_002_pos atf_add_test_case hotspare_shared_001_pos atf_add_test_case hotspare_snapshot_001_pos atf_add_test_case hotspare_snapshot_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/inheritance/inheritance_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/inheritance/inheritance_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/inheritance/inheritance_test.sh (revision 297878) @@ -1,57 +1,56 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case inherit_001_pos cleanup inherit_001_pos_head() { atf_set "descr" "Test properties are inherited correctly" - atf_set "require.config" rt_long atf_set "timeout" 1800 atf_set "require.progs" zfs } inherit_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inherit.kshlib . $(atf_get_srcdir)/inherit.cfg ksh93 $(atf_get_srcdir)/inherit_001_pos.ksh || atf_fail "Testcase failed" } inherit_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case inherit_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/inuse/inuse_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/inuse/inuse_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/inuse/inuse_test.sh (revision 297878) @@ -1,219 +1,210 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case inuse_001_pos inuse_001_pos_head() { atf_set "descr" "Ensure ZFS cannot use a device designated as a dump device" - atf_set "require.config" rt_short atf_set "require.progs" dumpadm zpool atf_set "timeout" 1200 } inuse_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_002_pos inuse_002_pos_head() { atf_set "descr" "Ensure ZFS does not interfere with devices in use by SVM" - atf_set "require.config" rt_short atf_set "require.progs" metainit metadb metastat zpool metaclear atf_set "timeout" 1200 } inuse_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_002_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_003_pos inuse_003_pos_head() { atf_set "descr" "Ensure ZFS does not interfere with devices that are in use byufsdump or ufsrestore" - atf_set "require.config" rt_short atf_set "require.progs" zpool ufsrestore ufsdump atf_set "timeout" 1200 } inuse_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_003_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_004_pos inuse_004_pos_head() { atf_set "descr" "format will disallow modification of a mounted zfs disk partition or a spare device" - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool format atf_set "timeout" 1200 } inuse_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_004_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_005_pos inuse_005_pos_head() { atf_set "descr" "Verify newfs over active pool fails." - atf_set "require.config" rt_medium atf_set "timeout" 1200 } inuse_005_pos_body() { atf_expect_fail "REQ25571 ZFS does not open geoms in exclusive mode" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_005_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_006_pos inuse_006_pos_head() { atf_set "descr" "Verify dumpadm over active pool fails." - atf_set "require.config" rt_short atf_set "require.progs" dumpadm atf_set "timeout" 1200 } inuse_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_006_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_007_pos inuse_007_pos_head() { atf_set "descr" "Verify dumpadm over exported pool succeed." - atf_set "require.config" rt_short atf_set "require.progs" dumpadm zpool atf_set "timeout" 1200 } inuse_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_007_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_008_pos inuse_008_pos_head() { atf_set "descr" "Verify newfs over exported pool succeed." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 1200 } inuse_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_008_pos.ksh || atf_fail "Testcase failed" } atf_test_case inuse_009_pos inuse_009_pos_head() { atf_set "descr" "Verify format over exported pool succeed." - atf_set "require.config" rt_short atf_set "require.progs" zpool atf_set "timeout" 1200 } inuse_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/inuse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/inuse_009_pos.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case inuse_001_pos atf_add_test_case inuse_002_pos atf_add_test_case inuse_003_pos atf_add_test_case inuse_004_pos atf_add_test_case inuse_005_pos atf_add_test_case inuse_006_pos atf_add_test_case inuse_007_pos atf_add_test_case inuse_008_pos atf_add_test_case inuse_009_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/iscsi/iscsi_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/iscsi/iscsi_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/iscsi/iscsi_test.sh (revision 297878) @@ -1,204 +1,198 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case iscsi_001_pos cleanup iscsi_001_pos_head() { atf_set "descr" "Verify that setting shareiscsi property on volume will make itan iSCSI target as expected." - atf_set "require.config" rt_long atf_set "require.progs" zfs } iscsi_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_001_pos.ksh || atf_fail "Testcase failed" } iscsi_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case iscsi_002_neg cleanup iscsi_002_neg_head() { atf_set "descr" "Verify file systems and snapshots can not be shared via iSCSI." - atf_set "require.config" rt_long atf_set "require.progs" zfs } iscsi_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_002_neg.ksh || atf_fail "Testcase failed" } iscsi_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case iscsi_003_neg cleanup iscsi_003_neg_head() { atf_set "descr" "Verify invalid value of shareiscsi can not be set" - atf_set "require.config" rt_long atf_set "require.progs" zfs } iscsi_003_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_003_neg.ksh || atf_fail "Testcase failed" } iscsi_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case iscsi_004_pos cleanup iscsi_004_pos_head() { atf_set "descr" "Verify renaming a volume does not change target's iSCSI name." - atf_set "require.config" rt_long atf_set "require.progs" zfs } iscsi_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_004_pos.ksh || atf_fail "Testcase failed" } iscsi_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case iscsi_005_pos cleanup iscsi_005_pos_head() { atf_set "descr" "Verify export/import have right effects on iSCSI targets." - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool } iscsi_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_005_pos.ksh || atf_fail "Testcase failed" } iscsi_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case iscsi_006_neg cleanup iscsi_006_neg_head() { atf_set "descr" "Verify iscsioptions can not be changed by zfs command." - atf_set "require.config" rt_long atf_set "require.progs" zfs } iscsi_006_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/iscsi_006_neg.ksh || atf_fail "Testcase failed" } iscsi_006_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/iscsi_common.kshlib . $(atf_get_srcdir)/iscsi.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case iscsi_001_pos atf_add_test_case iscsi_002_neg atf_add_test_case iscsi_003_neg atf_add_test_case iscsi_004_pos atf_add_test_case iscsi_005_pos atf_add_test_case iscsi_006_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/large_files/large_files_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/large_files/large_files_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/large_files/large_files_test.sh (revision 297878) @@ -1,56 +1,55 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case large_files_001_pos cleanup large_files_001_pos_head() { atf_set "descr" "Write a file to the allowable ZFS fs size." - atf_set "require.config" rt_short } large_files_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/large_files.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/large_files_001_pos.ksh || atf_fail "Testcase failed" } large_files_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/large_files.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case large_files_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/link_count/link_count_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/link_count/link_count_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/link_count/link_count_test.sh (revision 297878) @@ -1,56 +1,55 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2014 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case link_count_001 cleanup link_count_001_head() { atf_set "descr" "Verify file link count is zero on zfs" - atf_set "require.config" rt_short atf_set "require.progs" zfs } link_count_001_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/link_count.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/link_count_001.ksh || atf_fail "Testcase failed" } link_count_001_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/link_count.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case link_count_001 } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/mdb/mdb_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/mdb/mdb_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mdb/mdb_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case mdb_001_pos cleanup mdb_001_pos_head() { atf_set "descr" "Verify that the ZFS mdb dcmds and walkers are working as expected." - atf_set "require.config" rt_long atf_set "require.progs" mdb atf_set "timeout" 1800 } mdb_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mdb.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mdb_001_pos.ksh || atf_fail "Testcase failed" } mdb_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mdb.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case mdb_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/migration/migration_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/migration/migration_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/migration/migration_test.sh (revision 297878) @@ -1,378 +1,366 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case migration_001_pos cleanup migration_001_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to ZFS fs using tar" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_001_pos.ksh || atf_fail "Testcase failed" } migration_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_002_pos cleanup migration_002_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to UFS fs using tar" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_002_pos.ksh || atf_fail "Testcase failed" } migration_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_003_pos cleanup migration_003_pos_head() { atf_set "descr" "Migrating test file from UFS fs to ZFS fs using tar" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_003_pos.ksh || atf_fail "Testcase failed" } migration_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_004_pos cleanup migration_004_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to ZFS fs using cpio" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_004_pos.ksh || atf_fail "Testcase failed" } migration_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_005_pos cleanup migration_005_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to uFS fs using cpio" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_005_pos.ksh || atf_fail "Testcase failed" } migration_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_006_pos cleanup migration_006_pos_head() { atf_set "descr" "Migrating test file from UFS fs to ZFS fs using cpio" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_006_pos.ksh || atf_fail "Testcase failed" } migration_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_007_pos cleanup migration_007_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to ZFS fs using dd" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_007_pos.ksh || atf_fail "Testcase failed" } migration_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_008_pos cleanup migration_008_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to UFS fs using dd" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_008_pos.ksh || atf_fail "Testcase failed" } migration_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_009_pos cleanup migration_009_pos_head() { atf_set "descr" "Migrating test file from UFS fs to ZFS fs using dd" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_009_pos.ksh || atf_fail "Testcase failed" } migration_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_010_pos cleanup migration_010_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to ZFS fs using cp" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_010_pos.ksh || atf_fail "Testcase failed" } migration_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_011_pos cleanup migration_011_pos_head() { atf_set "descr" "Migrating test file from ZFS fs to UFS fs using cp" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_011_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_011_pos.ksh || atf_fail "Testcase failed" } migration_011_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case migration_012_pos cleanup migration_012_pos_head() { atf_set "descr" "Migrating test file from UFS fs to ZFS fs using cp" - atf_set "require.config" rt_short atf_set "require.progs" zfs } migration_012_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/migration_012_pos.ksh || atf_fail "Testcase failed" } migration_012_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/migration.kshlib . $(atf_get_srcdir)/migration.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case migration_001_pos atf_add_test_case migration_002_pos atf_add_test_case migration_003_pos atf_add_test_case migration_004_pos atf_add_test_case migration_005_pos atf_add_test_case migration_006_pos atf_add_test_case migration_007_pos atf_add_test_case migration_008_pos atf_add_test_case migration_009_pos atf_add_test_case migration_010_pos atf_add_test_case migration_011_pos atf_add_test_case migration_012_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_read/mmap_read_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_read/mmap_read_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_read/mmap_read_test.sh (revision 297878) @@ -1,57 +1,56 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case mmap_read_001_pos cleanup mmap_read_001_pos_head() { atf_set "descr" "read()s from mmap()'ed file contain correct data." - atf_set "require.config" rt_short atf_set "require.progs" zfs zdb } mmap_read_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/mmap_read.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mmap_read_001_pos.ksh || atf_fail "Testcase failed" } mmap_read_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/mmap_read.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case mmap_read_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_write/mmap_write_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_write/mmap_write_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_write/mmap_write_test.sh (revision 297878) @@ -1,56 +1,55 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case mmap_write_001_pos cleanup mmap_write_001_pos_head() { atf_set "descr" "write()s to a file and mmap() that file at the same time does notresult in a deadlock." - atf_set "require.config" rt_long } mmap_write_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/mmap_write.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mmap_write_001_pos.ksh || atf_fail "Testcase failed" } mmap_write_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/mmap_write.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case mmap_write_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/mount/mount_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/mount/mount_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mount/mount_test.sh (revision 297878) @@ -1,88 +1,86 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2014 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case umount_001 cleanup umount_001_head() { atf_set "descr" "zfs umount should unmount a file system" - atf_set "require.config" rt_short atf_set "require.progs" zfs } umount_001_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/vars.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mounttest.ksh -u umount || \ atf_fail "Testcase failed" } umount_001_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/vars.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case umountall_001 cleanup umountall_001_head() { atf_set "descr" "zfs umount -a should unmount all ZFS file systems" - atf_set "require.config" rt_short atf_set "require.progs" zfs } umountall_001_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/vars.cfg if [[ -n "$KEEP" ]]; then atf_skip "Can't test unmount -a when pools are in KEEP" fi ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mounttest.ksh -u 'umount -a' || \ atf_fail "Testcase failed" } umountall_001_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/vars.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case umount_001 atf_add_test_case umountall_001 } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/mv_files/mv_files_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/mv_files/mv_files_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mv_files/mv_files_test.sh (revision 297878) @@ -1,90 +1,88 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case mv_files_001_pos cleanup mv_files_001_pos_head() { atf_set "descr" "Doing a 'mv' of a large amount of files within a zfs filesystemworks without errors." - atf_set "require.config" rt_long atf_set "require.progs" zfs zdb atf_set "timeout" 1200 } mv_files_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mv_files_common.kshlib . $(atf_get_srcdir)/mv_files.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mv_files_001_pos.ksh || atf_fail "Testcase failed" } mv_files_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mv_files_common.kshlib . $(atf_get_srcdir)/mv_files.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case mv_files_002_pos cleanup mv_files_002_pos_head() { atf_set "descr" "Doing a 'mv' of a large amount of files across two zfs filesystemsworks without errors." - atf_set "require.config" rt_long atf_set "require.progs" zfs zdb atf_set "timeout" 1200 } mv_files_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mv_files_common.kshlib . $(atf_get_srcdir)/mv_files.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mv_files_002_pos.ksh || atf_fail "Testcase failed" } mv_files_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/mv_files_common.kshlib . $(atf_get_srcdir)/mv_files.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case mv_files_001_pos atf_add_test_case mv_files_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/nestedfs/nestedfs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/nestedfs/nestedfs_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/nestedfs/nestedfs_test.sh (revision 297878) @@ -1,57 +1,56 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case nestedfs_001_pos cleanup nestedfs_001_pos_head() { atf_set "descr" "Verify a nested file system can be created/destroyed." - atf_set "require.config" rt_short atf_set "require.progs" zfs } nestedfs_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/nestedfs.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/nestedfs_001_pos.ksh || atf_fail "Testcase failed" } nestedfs_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/nestedfs.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case nestedfs_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/no_space/no_space_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/no_space/no_space_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/no_space/no_space_test.sh (revision 297878) @@ -1,57 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case enospc_001_pos cleanup enospc_001_pos_head() { atf_set "descr" "ENOSPC is returned when file system is full." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } enospc_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/enospc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/enospc_001_pos.ksh || atf_fail "Testcase failed" } enospc_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/enospc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case enospc_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/online_offline/online_offline_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/online_offline/online_offline_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/online_offline/online_offline_test.sh (revision 297878) @@ -1,86 +1,84 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case online_offline_001_pos cleanup online_offline_001_pos_head() { atf_set "descr" "Turning a disk offline and back online during I/O completes." - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool zdb atf_set "timeout" 3600 } online_offline_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/online_offline.cfg ksh93 $(atf_get_srcdir)/online_offline_001_pos.ksh || atf_fail "Testcase failed" } online_offline_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/online_offline.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case online_offline_002_neg cleanup online_offline_002_neg_head() { atf_set "descr" "Offlining a disk should fail if the pool would go critical" - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool zdb atf_set "timeout" 3600 } online_offline_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/online_offline.cfg ksh93 $(atf_get_srcdir)/online_offline_002_neg.ksh || atf_fail "Testcase failed" } online_offline_002_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/online_offline.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case online_offline_001_pos atf_add_test_case online_offline_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/pool_names/pool_names_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/pool_names/pool_names_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/pool_names/pool_names_test.sh (revision 297878) @@ -1,69 +1,67 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case pool_names_001_pos pool_names_001_pos_head() { atf_set "descr" "Ensure that pool names can use the ASCII subset of UTF-8" - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool atf_set "timeout" 1200 } pool_names_001_pos_body() { atf_expect_fail "REQ25521 FreeBSD does not support dataset names as long as Illumos does" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/pool_names.cfg ksh93 $(atf_get_srcdir)/pool_names_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case pool_names_002_neg pool_names_002_neg_head() { atf_set "descr" "Ensure that a set of invalid names cannot be used to create pools." - atf_set "require.config" rt_long atf_set "require.progs" zpool atf_set "timeout" 1200 } pool_names_002_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/pool_names.cfg ksh93 $(atf_get_srcdir)/pool_names_002_neg.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case pool_names_001_pos atf_add_test_case pool_names_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/poolversion/poolversion_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/poolversion/poolversion_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/poolversion/poolversion_test.sh (revision 297878) @@ -1,82 +1,80 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case poolversion_001_pos cleanup poolversion_001_pos_head() { atf_set "descr" "zpool set version can upgrade a pool" - atf_set "require.config" rt_short atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } poolversion_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/poolversion_001_pos.ksh || atf_fail "Testcase failed" } poolversion_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case poolversion_002_pos cleanup poolversion_002_pos_head() { atf_set "descr" "zpool set version can only increment pool version" - atf_set "require.config" rt_short atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } poolversion_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/poolversion_002_pos.ksh || atf_fail "Testcase failed" } poolversion_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case poolversion_001_pos atf_add_test_case poolversion_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/privilege/privilege_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/privilege/privilege_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/privilege/privilege_test.sh (revision 297878) @@ -1,84 +1,82 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case privilege_001_pos cleanup privilege_001_pos_head() { atf_set "descr" "The RBAC profile \ZFS Storage Management\ works" - atf_set "require.config" rt_short atf_set "require.progs" pfexec svcadm zfs zpool svcs } privilege_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/privilege.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/privilege_001_pos.ksh || atf_fail "Testcase failed" } privilege_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/privilege.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case privilege_002_pos cleanup privilege_002_pos_head() { atf_set "descr" "The RBAC profile \ZFS File System Management\ works" - atf_set "require.config" rt_short atf_set "require.progs" pfexec svcadm zfs zpool svcs } privilege_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/privilege.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/privilege_002_pos.ksh || atf_fail "Testcase failed" } privilege_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/privilege.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case privilege_001_pos atf_add_test_case privilege_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/quota/quota_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/quota/quota_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/quota/quota_test.sh (revision 297878) @@ -1,204 +1,198 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case quota_001_pos cleanup quota_001_pos_head() { atf_set "descr" "Verify that file size is limited by the file system quota" - atf_set "require.config" rt_medium atf_set "require.progs" zfs } quota_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_001_pos.ksh || atf_fail "Testcase failed" } quota_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case quota_002_pos cleanup quota_002_pos_head() { atf_set "descr" "Verify that a file write cannot exceed the file system quota" - atf_set "require.config" rt_medium atf_set "require.progs" zfs } quota_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_002_pos.ksh || atf_fail "Testcase failed" } quota_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case quota_003_pos cleanup quota_003_pos_head() { atf_set "descr" "Verify that file size is limited by the file system quota(dataset version)" - atf_set "require.config" rt_medium atf_set "require.progs" zfs } quota_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_003_pos.ksh || atf_fail "Testcase failed" } quota_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case quota_004_pos cleanup quota_004_pos_head() { atf_set "descr" "Verify that a file write cannot exceed the file system quota(dataset version)" - atf_set "require.config" rt_medium atf_set "require.progs" zfs } quota_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_004_pos.ksh || atf_fail "Testcase failed" } quota_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case quota_005_pos cleanup quota_005_pos_head() { atf_set "descr" "Verify that quota does not inherit its value from parent." - atf_set "require.config" rt_short atf_set "require.progs" zfs } quota_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_005_pos.ksh || atf_fail "Testcase failed" } quota_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case quota_006_neg cleanup quota_006_neg_head() { atf_set "descr" "Verify cannot set quota lower than the space currently in use" - atf_set "require.config" rt_short atf_set "require.progs" zfs } quota_006_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/quota_006_neg.ksh || atf_fail "Testcase failed" } quota_006_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/quota.kshlib . $(atf_get_srcdir)/quota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case quota_001_pos atf_add_test_case quota_002_pos atf_add_test_case quota_003_pos atf_add_test_case quota_004_pos atf_add_test_case quota_005_pos atf_add_test_case quota_006_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/redundancy/redundancy_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/redundancy/redundancy_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/redundancy/redundancy_test.sh (revision 297878) @@ -1,147 +1,143 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case redundancy_001_pos cleanup redundancy_001_pos_head() { atf_set "descr" "Verify raidz pool can withstand one device is failing." - atf_set "require.config" rt_long atf_set "timeout" 1800 } redundancy_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/redundancy_001_pos.ksh || atf_fail "Testcase failed" } redundancy_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case redundancy_002_pos cleanup redundancy_002_pos_head() { atf_set "descr" "Verify raidz2 pool can withstand two devices are failing." - atf_set "require.config" rt_long atf_set "timeout" 1800 } redundancy_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/redundancy_002_pos.ksh || atf_fail "Testcase failed" } redundancy_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case redundancy_003_pos cleanup redundancy_003_pos_head() { atf_set "descr" "Verify mirrored pool can withstand N-1 devices are failing or missing." - atf_set "require.config" rt_long atf_set "timeout" 1800 } redundancy_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/redundancy_003_pos.ksh || atf_fail "Testcase failed" } redundancy_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case redundancy_004_neg cleanup redundancy_004_neg_head() { atf_set "descr" "Verify striped pool have no data redundancy." - atf_set "require.config" rt_long atf_set "require.progs" zpool atf_set "timeout" 1800 } redundancy_004_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/redundancy_004_neg.ksh || atf_fail "Testcase failed" } redundancy_004_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/redundancy.kshlib . $(atf_get_srcdir)/redundancy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case redundancy_001_pos atf_add_test_case redundancy_002_pos atf_add_test_case redundancy_003_pos atf_add_test_case redundancy_004_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/refquota/refquota_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/refquota/refquota_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/refquota/refquota_test.sh (revision 297878) @@ -1,192 +1,186 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case refquota_001_pos cleanup refquota_001_pos_head() { atf_set "descr" "refquota limits the amount of space a dataset can consume,but does not include space used by descendents." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refquota_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_001_pos.ksh || atf_fail "Testcase failed" } refquota_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refquota_002_pos cleanup refquota_002_pos_head() { atf_set "descr" "Quotas are enforced using the minimum of the two properties" - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refquota_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_002_pos.ksh || atf_fail "Testcase failed" } refquota_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refquota_003_pos cleanup refquota_003_pos_head() { atf_set "descr" "Sub-filesystem quotas are not enforced by property 'refquota'" - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refquota_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_003_pos.ksh || atf_fail "Testcase failed" } refquota_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refquota_004_pos cleanup refquota_004_pos_head() { atf_set "descr" "refquotas are not limited by snapshots." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refquota_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_004_pos.ksh || atf_fail "Testcase failed" } refquota_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refquota_005_pos cleanup refquota_005_pos_head() { atf_set "descr" "refquotas are not limited by sub-filesystem snapshots." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refquota_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_005_pos.ksh || atf_fail "Testcase failed" } refquota_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refquota_006_neg cleanup refquota_006_neg_head() { atf_set "descr" "'zfs set refquota' can handle incorrect arguments correctly." - atf_set "require.config" rt_short atf_set "require.progs" zfs } refquota_006_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refquota_006_neg.ksh || atf_fail "Testcase failed" } refquota_006_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case refquota_001_pos atf_add_test_case refquota_002_pos atf_add_test_case refquota_003_pos atf_add_test_case refquota_004_pos atf_add_test_case refquota_005_pos atf_add_test_case refquota_006_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/refreserv/refreserv_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/refreserv/refreserv_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/refreserv/refreserv_test.sh (revision 297878) @@ -1,167 +1,162 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case refreserv_001_pos cleanup refreserv_001_pos_head() { atf_set "descr" "Reservations are enforced using the maximum of'reserv' and 'refreserv'" - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refreserv_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refreserv_001_pos.ksh || atf_fail "Testcase failed" } refreserv_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refreserv_002_pos cleanup refreserv_002_pos_head() { atf_set "descr" "Setting full size as refreservation, verify no snapshotcan be created." - atf_set "require.config" rt_short atf_set "require.progs" zfs } refreserv_002_pos_body() { atf_expect_fail "BUG25520 this test incorrectly assumes that the avail, reserv, and refreserv properties are exact values that apply to data but not metadata" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refreserv_002_pos.ksh || atf_fail "Testcase failed" } refreserv_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refreserv_003_pos cleanup refreserv_003_pos_head() { atf_set "descr" "Verify a snapshot will only be allowed if there is enoughfree space outside of this refreservation." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } refreserv_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refreserv_003_pos.ksh || atf_fail "Testcase failed" } refreserv_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refreserv_004_pos cleanup refreserv_004_pos_head() { atf_set "descr" "Verify refreservation is limited by available space." - atf_set "require.config" rt_short atf_set "require.progs" zfs mkfile } refreserv_004_pos_body() { atf_expect_fail "BUG25520 this test incorrectly assumes that the avail, reserv, and refreserv properties are exact values that apply to data but not metadata" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refreserv_004_pos.ksh || atf_fail "Testcase failed" } refreserv_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case refreserv_005_pos cleanup refreserv_005_pos_head() { atf_set "descr" "Volume refreservation is limited by volsize" - atf_set "require.config" rt_short atf_set "require.progs" zfs } refreserv_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/refreserv_005_pos.ksh || atf_fail "Testcase failed" } refreserv_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/refreserv.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case refreserv_001_pos atf_add_test_case refreserv_002_pos atf_add_test_case refreserv_003_pos atf_add_test_case refreserv_004_pos atf_add_test_case refreserv_005_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/replacement/replacement_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/replacement/replacement_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/replacement/replacement_test.sh (revision 297878) @@ -1,107 +1,104 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case replacement_001_pos cleanup replacement_001_pos_head() { atf_set "descr" "Replacing a disk during I/O completes." - atf_set "require.config" rt_long atf_set "require.config" at_least_3_disks atf_set "require.progs" zfs zpool zdb atf_set "timeout" 3600 } replacement_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/replacement_001_pos.ksh || atf_fail "Testcase failed" } replacement_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case replacement_002_pos cleanup replacement_002_pos_head() { atf_set "descr" "Replacing a disk during I/O completes." - atf_set "require.config" rt_long atf_set "require.config" at_least_3_disks atf_set "require.progs" zfs zpool zdb atf_set "timeout" 3600 } replacement_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/replacement_002_pos.ksh || atf_fail "Testcase failed" } replacement_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case replacement_003_pos cleanup replacement_003_pos_head() { atf_set "descr" "Replacing a disk during I/O completes." - atf_set "require.config" rt_medium atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool zdb atf_set "timeout" 3600 } replacement_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/replacement_003_pos.ksh || atf_fail "Testcase failed" } replacement_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case replacement_001_pos atf_add_test_case replacement_002_pos atf_add_test_case replacement_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/reservation/reservation_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/reservation/reservation_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/reservation/reservation_test.sh (revision 297878) @@ -1,558 +1,540 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case reservation_001_pos cleanup reservation_001_pos_head() { atf_set "descr" "Verify that to set a reservation on a filesystem or volume must use value smaller than space \ available property of pool" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_001_pos.ksh || atf_fail "Testcase failed" } reservation_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_002_pos cleanup reservation_002_pos_head() { atf_set "descr" "Reservation values cannot exceed the amount of space available in the pool" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_002_pos.ksh || atf_fail "Testcase failed" } reservation_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_003_pos cleanup reservation_003_pos_head() { atf_set "descr" "Verify it is possible to set reservations multiple times on a filesystem regular and sparse volume" - atf_set "require.config" rt_medium atf_set "require.progs" zfs } reservation_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_003_pos.ksh || atf_fail "Testcase failed" } reservation_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_004_pos cleanup reservation_004_pos_head() { atf_set "descr" "Verify space released when a dataset with reservation is destroyed" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_004_pos.ksh || atf_fail "Testcase failed" } reservation_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_005_pos cleanup reservation_005_pos_head() { atf_set "descr" "Verify space released when reservation on a dataset is setto 'none'" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_005_pos.ksh || atf_fail "Testcase failed" } reservation_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_006_pos cleanup reservation_006_pos_head() { atf_set "descr" "Verify can create files both inside and outside reserved areas" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_006_pos.ksh || atf_fail "Testcase failed" } reservation_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_007_pos cleanup reservation_007_pos_head() { atf_set "descr" "Verify reservations on data sets doesn't affect other data sets at same level except for consuming space from common pool" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_007_pos.ksh || atf_fail "Testcase failed" } reservation_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_008_pos cleanup reservation_008_pos_head() { atf_set "descr" "Verify reducing reservation allows other datasets to use space" - atf_set "require.config" rt_long atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_008_pos.ksh || atf_fail "Testcase failed" } reservation_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_009_pos cleanup reservation_009_pos_head() { atf_set "descr" "Setting top level dataset reservation to 'none' allows more data to be written to top level filesystem" - atf_set "require.config" rt_medium atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_009_pos.ksh || atf_fail "Testcase failed" } reservation_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_010_pos cleanup reservation_010_pos_head() { atf_set "descr" "Destroying top level filesystem with reservation allows more data to be written to another top level filesystem" - atf_set "require.config" rt_medium atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_010_pos.ksh || atf_fail "Testcase failed" } reservation_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_011_pos cleanup reservation_011_pos_head() { atf_set "descr" "Verify reservation settings do not affect quota settings" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_011_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_011_pos.ksh || atf_fail "Testcase failed" } reservation_011_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_012_pos cleanup reservation_012_pos_head() { atf_set "descr" "Verify reservations protect space" - atf_set "require.config" rt_medium atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_012_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_012_pos.ksh || atf_fail "Testcase failed" } reservation_012_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_013_pos cleanup reservation_013_pos_head() { atf_set "descr" "Reservation properties preserved across exports and imports" - atf_set "require.config" rt_short atf_set "require.progs" zfs zpool } reservation_013_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_013_pos.ksh || atf_fail "Testcase failed" } reservation_013_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_014_pos cleanup reservation_014_pos_head() { atf_set "descr" "Verify cannot set reservation larger than quota" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_014_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_014_pos.ksh || atf_fail "Testcase failed" } reservation_014_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_015_pos cleanup reservation_015_pos_head() { atf_set "descr" "Setting volume reservation to 'none' allows more data to be written to top level filesystem" - atf_set "require.config" rt_medium atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_015_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_015_pos.ksh || atf_fail "Testcase failed" } reservation_015_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_016_pos cleanup reservation_016_pos_head() { atf_set "descr" "Destroying a regular volume with reservation allows more data to be written to top level filesystem" - atf_set "require.config" rt_medium atf_set "require.progs" zfs atf_set "timeout" 600 } reservation_016_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_016_pos.ksh || atf_fail "Testcase failed" } reservation_016_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_017_pos cleanup reservation_017_pos_head() { atf_set "descr" "Verify that the volsize changes of sparse volume are not reflectedin the reservation" - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_017_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_017_pos.ksh || atf_fail "Testcase failed" } reservation_017_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_018_pos cleanup reservation_018_pos_head() { atf_set "descr" "Verify that reservation doesnot inherit its value from parent." - atf_set "require.config" rt_short atf_set "require.progs" zfs } reservation_018_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_018_pos.ksh || atf_fail "Testcase failed" } reservation_018_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/reservation.kshlib . $(atf_get_srcdir)/reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case reservation_001_pos atf_add_test_case reservation_002_pos atf_add_test_case reservation_003_pos atf_add_test_case reservation_004_pos atf_add_test_case reservation_005_pos atf_add_test_case reservation_006_pos atf_add_test_case reservation_007_pos atf_add_test_case reservation_008_pos atf_add_test_case reservation_009_pos atf_add_test_case reservation_010_pos atf_add_test_case reservation_011_pos atf_add_test_case reservation_012_pos atf_add_test_case reservation_013_pos atf_add_test_case reservation_014_pos atf_add_test_case reservation_015_pos atf_add_test_case reservation_016_pos atf_add_test_case reservation_017_pos atf_add_test_case reservation_018_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/sas_phy_thrash/sas_phy_thrash_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/sas_phy_thrash/sas_phy_thrash_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/sas_phy_thrash/sas_phy_thrash_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case sas_phy_thrash_001_pos cleanup sas_phy_thrash_001_pos_head() { atf_set "descr" "" - atf_set "require.config" rt_long atf_set "require.config" allow_devfs_side_effects atf_set "require.progs" camcontrol } sas_phy_thrash_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/sas_phy_thrash.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/sas_phy_thrash_001_pos.ksh || atf_fail "Testcase failed" } sas_phy_thrash_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/sas_phy_thrash.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case sas_phy_thrash_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/scrub_mirror_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/scrub_mirror_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/scrub_mirror_test.sh (revision 297878) @@ -1,146 +1,146 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case scrub_mirror_001_pos cleanup scrub_mirror_001_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely wipedwithout affecting the content of the pool" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } scrub_mirror_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/scrub_mirror_001_pos.ksh || atf_fail "Testcase failed" } scrub_mirror_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case scrub_mirror_002_pos cleanup scrub_mirror_002_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely wipedwithout affecting the content of the pool" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } scrub_mirror_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/scrub_mirror_002_pos.ksh || atf_fail "Testcase failed" } scrub_mirror_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case scrub_mirror_003_pos cleanup scrub_mirror_003_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely mangledwithout affecting the content of the pool" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } scrub_mirror_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/scrub_mirror_003_pos.ksh || atf_fail "Testcase failed" } scrub_mirror_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case scrub_mirror_004_pos cleanup scrub_mirror_004_pos_head() { atf_set "descr" "The primary side of a zpool mirror may be completely mangledwithout affecting the content of the pool" - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } scrub_mirror_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/scrub_mirror_004_pos.ksh || atf_fail "Testcase failed" } scrub_mirror_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/scrub_mirror_common.kshlib . $(atf_get_srcdir)/default.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case scrub_mirror_001_pos atf_add_test_case scrub_mirror_002_pos atf_add_test_case scrub_mirror_003_pos atf_add_test_case scrub_mirror_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/slog/slog_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/slog/slog_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/slog/slog_test.sh (revision 297878) @@ -1,447 +1,437 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case slog_001_pos cleanup slog_001_pos_head() { atf_set "descr" "Creating a pool with a log device succeeds." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_001_pos.ksh || atf_fail "Testcase failed" } slog_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_002_pos cleanup slog_002_pos_head() { atf_set "descr" "Adding a log device to normal pool works." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_002_pos.ksh || atf_fail "Testcase failed" } slog_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_003_pos cleanup slog_003_pos_head() { atf_set "descr" "Adding an extra log device works." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_003_pos.ksh || atf_fail "Testcase failed" } slog_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_004_pos cleanup slog_004_pos_head() { atf_set "descr" "Attaching a log device passes." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_004_pos.ksh || atf_fail "Testcase failed" } slog_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_005_pos cleanup slog_005_pos_head() { atf_set "descr" "Detaching a log device passes." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_005_pos.ksh || atf_fail "Testcase failed" } slog_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_006_pos cleanup slog_006_pos_head() { atf_set "descr" "Replacing a log device passes." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_006_pos.ksh || atf_fail "Testcase failed" } slog_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_007_pos cleanup slog_007_pos_head() { atf_set "descr" "Exporting and importing pool with log devices passes." - atf_set "require.config" rt_long atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_007_pos.ksh || atf_fail "Testcase failed" } slog_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_008_neg cleanup slog_008_neg_head() { atf_set "descr" "A raidz/raidz2 log is not supported." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_008_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_008_neg.ksh || atf_fail "Testcase failed" } slog_008_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_009_neg cleanup slog_009_neg_head() { atf_set "descr" "A raidz/raidz2 log can not be added to existed pool." - atf_set "require.config" rt_medium atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_009_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_009_neg.ksh || atf_fail "Testcase failed" } slog_009_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_010_neg cleanup slog_010_neg_head() { atf_set "descr" "Slog device can not be replaced with spare device." - atf_set "require.config" rt_short atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_010_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_010_neg.ksh || atf_fail "Testcase failed" } slog_010_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_011_neg cleanup slog_011_neg_head() { atf_set "descr" "Offline and online a log device passes." atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_011_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_011_neg.ksh || atf_fail "Testcase failed" } slog_011_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_012_neg cleanup slog_012_neg_head() { atf_set "descr" "Pool can survive when one of mirror log device get corrupted." atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_012_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_012_neg.ksh || atf_fail "Testcase failed" } slog_012_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_013_pos cleanup slog_013_pos_head() { atf_set "descr" "Verify slog device can be disk, file, lofi device or any devicethat presents a block interface." atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool lofiadm atf_set "timeout" 1200 } slog_013_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_013_pos.ksh || atf_fail "Testcase failed" } slog_013_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case slog_014_pos cleanup slog_014_pos_head() { atf_set "descr" "log device can survive when one of the pool device get corrupted." atf_set "require.progs" mkfile zpool atf_set "timeout" 1200 } slog_014_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/slog_014_pos.ksh || atf_fail "Testcase failed" } slog_014_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/slog.kshlib . $(atf_get_srcdir)/slog.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case slog_001_pos atf_add_test_case slog_002_pos atf_add_test_case slog_003_pos atf_add_test_case slog_004_pos atf_add_test_case slog_005_pos atf_add_test_case slog_006_pos atf_add_test_case slog_007_pos atf_add_test_case slog_008_neg atf_add_test_case slog_009_neg atf_add_test_case slog_010_neg atf_add_test_case slog_011_neg atf_add_test_case slog_012_neg atf_add_test_case slog_013_pos atf_add_test_case slog_014_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/snapshot/snapshot_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/snapshot/snapshot_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/snapshot/snapshot_test.sh (revision 297878) @@ -1,681 +1,657 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case clone_001_pos cleanup clone_001_pos_head() { atf_set "descr" "Verify a cloned file system is writable." - atf_set "require.config" rt_short atf_set "require.progs" zfs } clone_001_pos_body() { atf_expect_fail "Creating a pool on a zvol is not yet supported in FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/clone_001_pos.ksh || atf_fail "Testcase failed" } clone_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rollback_001_pos cleanup rollback_001_pos_head() { atf_set "descr" "Verify that a rollback to a previous snapshot succeeds." - atf_set "require.config" rt_short atf_set "require.progs" zfs } rollback_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rollback_001_pos.ksh || atf_fail "Testcase failed" } rollback_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rollback_002_pos cleanup rollback_002_pos_head() { atf_set "descr" "Verify rollback is with respect to latest snapshot." - atf_set "require.config" rt_short atf_set "require.progs" zfs } rollback_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rollback_002_pos.ksh || atf_fail "Testcase failed" } rollback_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rollback_003_pos cleanup rollback_003_pos_head() { atf_set "descr" "Verify rollback succeeds when there are nested file systems." - atf_set "require.config" rt_short atf_set "require.progs" zfs } rollback_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rollback_003_pos.ksh || atf_fail "Testcase failed" } rollback_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_001_pos cleanup snapshot_001_pos_head() { atf_set "descr" "Verify a file system snapshot is identical to original." - atf_set "require.config" rt_short atf_set "require.progs" zfs sum } snapshot_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_001_pos.ksh || atf_fail "Testcase failed" } snapshot_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_002_pos cleanup snapshot_002_pos_head() { atf_set "descr" "Verify an archive of a file system is identical toan archive of its snapshot." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_002_pos.ksh || atf_fail "Testcase failed" } snapshot_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_003_pos cleanup snapshot_003_pos_head() { atf_set "descr" "Verify many snapshots of a file system can be taken." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_003_pos.ksh || atf_fail "Testcase failed" } snapshot_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_004_pos cleanup snapshot_004_pos_head() { atf_set "descr" "Verify that a snapshot of an empty file system remains empty." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_004_pos.ksh || atf_fail "Testcase failed" } snapshot_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_005_pos cleanup snapshot_005_pos_head() { atf_set "descr" "Verify that a snapshot of a dataset is identical tothe original dataset." - atf_set "require.config" rt_short atf_set "require.progs" zfs sum } snapshot_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_005_pos.ksh || atf_fail "Testcase failed" } snapshot_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_006_pos cleanup snapshot_006_pos_head() { atf_set "descr" "Verify that an archive of a dataset is identical toan archive of the dataset's snapshot." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_006_pos.ksh || atf_fail "Testcase failed" } snapshot_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_007_pos cleanup snapshot_007_pos_head() { atf_set "descr" "Verify that many snapshots can be made on a zfs dataset." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_007_pos.ksh || atf_fail "Testcase failed" } snapshot_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_008_pos cleanup snapshot_008_pos_head() { atf_set "descr" "Verify that destroying snapshots returns space to the pool." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_008_pos.ksh || atf_fail "Testcase failed" } snapshot_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_009_pos cleanup snapshot_009_pos_head() { atf_set "descr" "Verify snapshot -r can correctly create a snapshot tree." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_009_pos.ksh || atf_fail "Testcase failed" } snapshot_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_010_pos cleanup snapshot_010_pos_head() { atf_set "descr" "Verify 'destroy -r' can correctly destroy a snapshot subtree at any point." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_010_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_010_pos.ksh || atf_fail "Testcase failed" } snapshot_010_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_011_pos cleanup snapshot_011_pos_head() { atf_set "descr" "Verify that rollback to a snapshot created by snapshot -r succeeds." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_011_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_011_pos.ksh || atf_fail "Testcase failed" } snapshot_011_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_012_pos cleanup snapshot_012_pos_head() { atf_set "descr" "Verify that 'snapshot -r' can work with 'zfs promote'." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_012_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_012_pos.ksh || atf_fail "Testcase failed" } snapshot_012_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_013_pos cleanup snapshot_013_pos_head() { atf_set "descr" "Verify snapshots from 'snapshot -r' can be used for zfs send/recv" - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_013_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_013_pos.ksh || atf_fail "Testcase failed" } snapshot_013_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_014_pos cleanup snapshot_014_pos_head() { atf_set "descr" "Verify creating/destroying snapshots do things clean" - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } snapshot_014_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_014_pos.ksh || atf_fail "Testcase failed" } snapshot_014_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_015_pos cleanup snapshot_015_pos_head() { atf_set "descr" "Verify snapshot can be created via mkdir in .zfs/snapshot." - atf_set "require.config" rt_short atf_set "require.progs" zfs mkfile } snapshot_015_pos_body() { atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_015_pos.ksh || atf_fail "Testcase failed" } snapshot_015_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_016_pos cleanup snapshot_016_pos_head() { atf_set "descr" "Verify renamed snapshots via mv can be destroyed." - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_016_pos_body() { atf_expect_fail "Not all directory operations on the .zfs/snapshot directory are yet supported by FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_016_pos.ksh || atf_fail "Testcase failed" } snapshot_016_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_017_pos cleanup snapshot_017_pos_head() { atf_set "descr" "Directory structure of snapshots reflects filesystem structure." - atf_set "require.config" rt_short atf_set "require.progs" zfs mkfile } snapshot_017_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_017_pos.ksh || atf_fail "Testcase failed" } snapshot_017_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_018_pos cleanup snapshot_018_pos_head() { atf_set "descr" "Snapshot directory supports ACL operations" - atf_set "require.config" rt_short atf_set "require.progs" zfs mkfile getfacl getconf sha1 } snapshot_018_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_018_pos.ksh || atf_fail "Testcase failed" } snapshot_018_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_019_pos cleanup snapshot_019_pos_head() { atf_set "descr" "Accessing snapshots and unmounting them in parallel does not panic" - atf_set "require.config" rt_short atf_set "require.progs" zfs atf_set "timeout" 1200 } snapshot_019_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_019_pos.ksh || atf_fail "Testcase failed" } snapshot_019_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapshot_020_pos cleanup snapshot_020_pos_head() { atf_set "descr" "Verify mounted snapshots can be renamed and destroyed" - atf_set "require.config" rt_short atf_set "require.progs" zfs } snapshot_020_pos_body() { atf_expect_fail "TeamTrack: P2_29644 zfs rename does not unmount snapshots in a ctldir" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapshot_020_pos.ksh || atf_fail "Testcase failed" } snapshot_020_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case clone_001_pos atf_add_test_case rollback_001_pos atf_add_test_case rollback_002_pos atf_add_test_case rollback_003_pos atf_add_test_case snapshot_001_pos atf_add_test_case snapshot_002_pos atf_add_test_case snapshot_003_pos atf_add_test_case snapshot_004_pos atf_add_test_case snapshot_005_pos atf_add_test_case snapshot_006_pos atf_add_test_case snapshot_007_pos atf_add_test_case snapshot_008_pos atf_add_test_case snapshot_009_pos atf_add_test_case snapshot_010_pos atf_add_test_case snapshot_011_pos atf_add_test_case snapshot_012_pos atf_add_test_case snapshot_013_pos atf_add_test_case snapshot_014_pos atf_add_test_case snapshot_015_pos atf_add_test_case snapshot_016_pos atf_add_test_case snapshot_017_pos atf_add_test_case snapshot_018_pos atf_add_test_case snapshot_019_pos atf_add_test_case snapshot_020_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/snapused/snapused_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/snapused/snapused_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/snapused/snapused_test.sh (revision 297878) @@ -1,175 +1,170 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case snapused_001_pos cleanup snapused_001_pos_head() { atf_set "descr" "Verify used is correct." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } snapused_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapused_001_pos.ksh || atf_fail "Testcase failed" } snapused_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapused_002_pos cleanup snapused_002_pos_head() { atf_set "descr" "Verify usedbychildren is correct." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } snapused_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapused_002_pos.ksh || atf_fail "Testcase failed" } snapused_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapused_003_pos cleanup snapused_003_pos_head() { atf_set "descr" "Verify usedbydataset is correct." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } snapused_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapused_003_pos.ksh || atf_fail "Testcase failed" } snapused_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapused_004_pos cleanup snapused_004_pos_head() { atf_set "descr" "Verify usedbyrefreservation is correct." - atf_set "require.config" rt_medium atf_set "require.progs" zfs mkfile } snapused_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapused_004_pos.ksh || atf_fail "Testcase failed" } snapused_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapused_005_pos cleanup snapused_005_pos_head() { atf_set "descr" "Verify usedbysnapshots is correct." - atf_set "require.config" rt_short atf_set "require.progs" zfs mkfile } snapused_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapused_005_pos.ksh || atf_fail "Testcase failed" } snapused_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/snapused.kshlib . $(atf_get_srcdir)/snapused.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case snapused_001_pos atf_add_test_case snapused_002_pos atf_add_test_case snapused_003_pos atf_add_test_case snapused_004_pos atf_add_test_case snapused_005_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/sparse/sparse_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/sparse/sparse_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/sparse/sparse_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case sparse_001_pos cleanup sparse_001_pos_head() { atf_set "descr" "Ensure random blocks are read back correctly" - atf_set "require.config" rt_medium atf_set "require.progs" zdb atf_set "timeout" 3600 } sparse_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/sparse.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/sparse_001_pos.ksh || atf_fail "Testcase failed" } sparse_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/sparse.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case sparse_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/threadsappend_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/threadsappend_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/threadsappend_test.sh (revision 297878) @@ -1,57 +1,56 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case threadsappend_001_pos cleanup threadsappend_001_pos_head() { atf_set "descr" "Ensure multiple threads performing write appends to the sameZFS file succeed" - atf_set "require.config" rt_short } threadsappend_001_pos_body() { export PATH=$(atf_get_srcdir):$PATH export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/threadsappend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/threadsappend_001_pos.ksh || atf_fail "Testcase failed" } threadsappend_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/threadsappend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case threadsappend_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/truncate/truncate_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/truncate/truncate_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/truncate/truncate_test.sh (revision 297878) @@ -1,85 +1,83 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case truncate_001_pos cleanup truncate_001_pos_head() { atf_set "descr" "Ensure file with random blocks is truncated properly" - atf_set "require.config" rt_medium atf_set "require.progs" zdb atf_set "timeout" 3600 } truncate_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/truncate.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/truncate_001_pos.ksh || atf_fail "Testcase failed" } truncate_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/truncate.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case truncate_002_pos cleanup truncate_002_pos_head() { atf_set "descr" "Ensure zeroed file gets written correctly during a sync operation" - atf_set "require.config" rt_short atf_set "timeout" 3600 } truncate_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/truncate.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/truncate_002_pos.ksh || atf_fail "Testcase failed" } truncate_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/truncate.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case truncate_001_pos atf_add_test_case truncate_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity_test.sh (revision 297878) @@ -1,117 +1,115 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case txg_integrity_001_pos cleanup txg_integrity_001_pos_head() { atf_set "descr" "Ensure that non-aligned writes to the same blocks that crosstransaction groups do not corrupt the file." - atf_set "require.config" rt_long atf_set "timeout" 1800 } txg_integrity_001_pos_body() { export PATH=$(atf_get_srcdir):$PATH export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/txg_integrity.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/txg_integrity_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } txg_integrity_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/txg_integrity.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case fsync_integrity_001_pos cleanup fsync_integrity_001_pos_head() { atf_set "descr" "Verify the integrity of non-aligned writes to the same blocks within the same transaction group, where an fsync is issued by a non-final writer." - atf_set "require.config" rt_long atf_set "timeout" 1800 } fsync_integrity_001_pos_body() { export PATH=$(atf_get_srcdir):$PATH export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/txg_integrity.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/fsync_integrity_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } fsync_integrity_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/txg_integrity.cfg export DISK="/dev/md${TESTCASE_ID}" export TESTDEV=${DISK}p1 ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case txg_integrity_001_pos atf_add_test_case fsync_integrity_001_pos } save_artifacts() { # If ARTIFACTS_DIR is defined, save test artifacts for # post-mortem analysis if [[ -n $ARTIFACTS_DIR ]]; then TC_ARTIFACTS_DIR=${ARTIFACTS_DIR}/sys/cddl/zfs/tests/txg_integrity/$(atf_get ident) mkdir -p $TC_ARTIFACTS_DIR cp -a $TESTDIR/$TESTFILE $TC_ARTIFACTS_DIR bzip2 $TC_ARTIFACTS_DIR/$TESTFILE # Now export the pool and tar up the entire thing zpool export $TESTPOOL dd if=$TESTDEV bs=131072 of=$TC_ARTIFACTS_DIR/pool bzip2 $TC_ARTIFACTS_DIR/pool # Reimport it so that the cleanup script will work zpool import $TESTPOOL fi } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_test.sh (revision 297878) @@ -1,292 +1,284 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case utils_test_001_pos cleanup utils_test_001_pos_head() { atf_set "descr" "Ensure that the clri(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" clri } utils_test_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_001_pos.ksh || atf_fail "Testcase failed" } utils_test_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_002_pos cleanup utils_test_002_pos_head() { atf_set "descr" "Ensure that the labelit(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs labelit } utils_test_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_002_pos.ksh || atf_fail "Testcase failed" } utils_test_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_003_pos cleanup utils_test_003_pos_head() { atf_set "descr" "Ensure that the fsdb(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" fsdb } utils_test_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_003_pos.ksh || atf_fail "Testcase failed" } utils_test_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_004_pos cleanup utils_test_004_pos_head() { atf_set "descr" "Ensure that the quotaon(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs quotaon } utils_test_004_pos_body() { atf_expect_fail "FreeBSD's quotaon utility exits 0 even when you supply a nonexistent filesystem" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_004_pos.ksh || atf_fail "Testcase failed" } utils_test_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_005_pos cleanup utils_test_005_pos_head() { atf_set "descr" "Ensure that the ff(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" ff } utils_test_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_005_pos.ksh || atf_fail "Testcase failed" } utils_test_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_006_pos cleanup utils_test_006_pos_head() { atf_set "descr" "Ensure that the fsirand(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs fsirand } utils_test_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_006_pos.ksh || atf_fail "Testcase failed" } utils_test_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_007_pos cleanup utils_test_007_pos_head() { atf_set "descr" "Ensure that the fstyp(1M) utility succeeds on a ZFS file system." - atf_set "require.config" rt_short disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs fstyp } utils_test_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_007_pos.ksh || atf_fail "Testcase failed" } utils_test_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_008_pos cleanup utils_test_008_pos_head() { atf_set "descr" "Ensure that the ncheck(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" zfs ncheck } utils_test_008_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_008_pos.ksh || atf_fail "Testcase failed" } utils_test_008_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case utils_test_009_pos cleanup utils_test_009_pos_head() { atf_set "descr" "Ensure that the tunefs(1M) utility fails on a ZFS file system." - atf_set "require.config" rt_short atf_set "require.progs" tunefs } utils_test_009_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/utils_test_009_pos.ksh || atf_fail "Testcase failed" } utils_test_009_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/utils_test.kshlib . $(atf_get_srcdir)/utils_test.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case utils_test_001_pos atf_add_test_case utils_test_002_pos atf_add_test_case utils_test_003_pos atf_add_test_case utils_test_004_pos atf_add_test_case utils_test_005_pos atf_add_test_case utils_test_006_pos atf_add_test_case utils_test_007_pos atf_add_test_case utils_test_008_pos atf_add_test_case utils_test_009_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/write_dirs/write_dirs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/write_dirs/write_dirs_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/write_dirs/write_dirs_test.sh (revision 297878) @@ -1,86 +1,86 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case write_dirs_001_pos cleanup write_dirs_001_pos_head() { atf_set "descr" "Creating directories with 50 big files in each, until file systemis full." - atf_set "require.config" rt_long disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 1200 } write_dirs_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/write_dirs.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/write_dirs_001_pos.ksh || atf_fail "Testcase failed" } write_dirs_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/write_dirs.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case write_dirs_002_pos cleanup write_dirs_002_pos_head() { atf_set "descr" "Creating directories with 5000 files in each, until file systemis full." - atf_set "require.config" rt_long disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zpool atf_set "timeout" 1200 } write_dirs_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/write_dirs.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/write_dirs_002_pos.ksh || atf_fail "Testcase failed" } write_dirs_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/write_dirs.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case write_dirs_001_pos atf_add_test_case write_dirs_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh (revision 297878) @@ -1,608 +1,591 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012,2013 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zfsd_fault_001_pos cleanup zfsd_fault_001_pos_head() { atf_set "descr" "ZFS will fault a vdev that produces IO errors" - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool zfsd atf_set "timeout" 300 } zfsd_fault_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_fault_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_fault_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_degrade_001_pos cleanup zfsd_degrade_001_pos_head() { atf_set "descr" "ZFS will degrade a vdev that produces checksum errors" - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" mkfile zpool zfsd atf_set "timeout" 300 } zfsd_degrade_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_degrade_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_degrade_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_degrade_002_pos cleanup zfsd_degrade_002_pos_head() { atf_set "descr" "ZFS will degrade a spare that produces checksum errors" - atf_set "require.config" rt_long atf_set "require.config" at_least_3_disks atf_set "require.progs" mkfile zpool zfsd atf_set "timeout" 300 } zfsd_degrade_002_pos_body() { atf_expect_fail "BUG25761 An active spare on a raidz array will incorrectly account its checksum errors" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_degrade_002_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_degrade_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_001_pos cleanup zfsd_hotspare_001_pos_head() { atf_set "descr" "An active, damaged spare will be replaced by an available spare" - atf_set "require.config" rt_long atf_set "require.progs" zpool zfsd atf_set "timeout" 3600 } zfsd_hotspare_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_002_pos cleanup zfsd_hotspare_002_pos_head() { atf_set "descr" "If a vdev becomes degraded, the spare will be activated." - atf_set "require.config" rt_long atf_set "require.progs" zpool zfsd zinject atf_set "timeout" 3600 } zfsd_hotspare_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_002_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_003_pos cleanup zfsd_hotspare_003_pos_head() { atf_set "descr" "A faulted vdev will be replaced by an available spare" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool zfsd zinject atf_set "timeout" 3600 } zfsd_hotspare_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_003_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_004_pos cleanup zfsd_hotspare_004_pos_head() { atf_set "descr" "Removing a disk from a pool results in the spare activating" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_hotspare_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_004_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_005_pos cleanup zfsd_hotspare_005_pos_head() { atf_set "descr" "A spare that is added to a degraded pool will be activated" - atf_set "require.config" rt_long atf_set "require.progs" zpool zfsd zinject atf_set "timeout" 3600 } zfsd_hotspare_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_005_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_006_pos cleanup zfsd_hotspare_006_pos_head() { atf_set "descr" "zfsd will replace two vdevs that fail simultaneously" - atf_set "require.config" rt_long atf_set "require.progs" zpool zfsd zinject atf_set "timeout" 3600 } zfsd_hotspare_006_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_006_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_006_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_hotspare_007_pos cleanup zfsd_hotspare_007_pos_head() { atf_set "descr" "zfsd will swap failed drives at startup" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_hotspare_007_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_hotspare_007_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_hotspare_007_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_autoreplace_001_neg cleanup zfsd_autoreplace_001_neg_head() { atf_set "descr" "A pool without autoreplace set will not replace by physical path" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_001_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_autoreplace_001_neg.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_autoreplace_001_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_autoreplace_002_pos cleanup zfsd_autoreplace_002_pos_head() { atf_set "descr" "A pool with autoreplace set will replace by physical path" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_autoreplace_002_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_autoreplace_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_autoreplace_003_pos cleanup zfsd_autoreplace_003_pos_head() { atf_set "descr" "A pool with autoreplace set will replace by physical path even if a spare is active" - atf_set "require.config" rt_long atf_set "require.config" at_least_5_disks atf_set "require.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_autoreplace_003_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_autoreplace_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/hotspare_cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_replace_001_pos cleanup zfsd_replace_001_pos_head() { atf_set "descr" "ZFSD will automatically replace a SAS disk that dissapears and reappears in the same location, with the same devname" - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool camcontrol zfsd zfs } zfsd_replace_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_replace_001_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_replace_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_replace_002_pos cleanup zfsd_replace_002_pos_head() { atf_set "descr" "A pool can come back online after all disks have dissapeared and reappeared" - atf_set "require.config" rt_long atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool camcontrol zfsd zfs } zfsd_replace_002_pos_body() { atf_expect_fail "ZFS hangs when an array becomes critical" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_replace_002_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_replace_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_replace_003_pos cleanup zfsd_replace_003_pos_head() { atf_set "descr" "ZFSD will correctly replace disks that dissapear and reappear with different devnames" - atf_set "require.config" rt_long atf_set "require.config" at_least_3_disks atf_set "require.progs" zpool camcontrol zfsd zfs } zfsd_replace_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_replace_003_pos.ksh if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_replace_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfsd_import_001_pos cleanup zfsd_import_001_pos_head() { atf_set "descr" "If a removed drive gets reinserted while the pool is exported, it will detach its spare when imported." - atf_set "require.config" rt_long atf_set "require.progs" zfsd zpool atf_set "timeout" 3600 } zfsd_import_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfsd_import_001_pos.ksh || atf_fail "Testcase failed" if [[ $? != 0 ]]; then save_artifacts atf_fail "Testcase failed" fi } zfsd_import_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfsd_fault_001_pos atf_add_test_case zfsd_degrade_001_pos atf_add_test_case zfsd_degrade_002_pos atf_add_test_case zfsd_hotspare_001_pos atf_add_test_case zfsd_hotspare_002_pos atf_add_test_case zfsd_hotspare_003_pos atf_add_test_case zfsd_hotspare_004_pos atf_add_test_case zfsd_hotspare_005_pos atf_add_test_case zfsd_hotspare_006_pos atf_add_test_case zfsd_hotspare_007_pos atf_add_test_case zfsd_autoreplace_001_neg atf_add_test_case zfsd_autoreplace_002_pos atf_add_test_case zfsd_autoreplace_003_pos atf_add_test_case zfsd_replace_001_pos atf_add_test_case zfsd_replace_002_pos atf_add_test_case zfsd_replace_003_pos atf_add_test_case zfsd_import_001_pos } save_artifacts() { # If ARTIFACTS_DIR is defined, save test artifacts for # post-mortem analysis if [[ -n $ARTIFACTS_DIR ]]; then TC_ARTIFACTS_DIR=${ARTIFACTS_DIR}/sys/cddl/zfs/tests/zfsd/$(atf_get ident) mkdir -p $TC_ARTIFACTS_DIR cp -a /var/log/zfsd.log* $TC_ARTIFACTS_DIR bzip2 $TC_ARTIFACTS_DIR/zfsd.log fi } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zil/zil_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zil/zil_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zil/zil_test.sh (revision 297878) @@ -1,89 +1,87 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zil_001_pos cleanup zil_001_pos_head() { atf_set "descr" "Verify that basic files and directory operations work" - atf_set "require.config" rt_medium atf_set "require.progs" zfs zpool zdb } zil_001_pos_body() { atf_fail "This test causes a panic on FreeBSD" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zil.kshlib . $(atf_get_srcdir)/zil.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zil_001_pos.ksh || atf_fail "Testcase failed" } zil_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zil.kshlib . $(atf_get_srcdir)/zil.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zil_002_pos cleanup zil_002_pos_head() { atf_set "descr" "Verify that creating and deleting content works" - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool zdb } zil_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zil.kshlib . $(atf_get_srcdir)/zil.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zil_002_pos.ksh || atf_fail "Testcase failed" } zil_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zil.kshlib . $(atf_get_srcdir)/zil.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zil_001_pos atf_add_test_case zil_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zinject/zinject_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zinject/zinject_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zinject/zinject_test.sh (revision 297878) @@ -1,150 +1,150 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zinject_001_pos cleanup zinject_001_pos_head() { atf_set "descr" "Verify fault inject handle content error successfully." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } zinject_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zinject_001_pos.ksh || atf_fail "Testcase failed" } zinject_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zinject_002_pos cleanup zinject_002_pos_head() { atf_set "descr" "Verify fault inject handle metadnode error successfully." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } zinject_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zinject_002_pos.ksh || atf_fail "Testcase failed" } zinject_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zinject_003_pos cleanup zinject_003_pos_head() { atf_set "descr" "Verify fault inject handle into first metadnodecause filesystem unmountable." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } zinject_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zinject_003_pos.ksh || atf_fail "Testcase failed" } zinject_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zinject_004_pos cleanup zinject_004_pos_head() { atf_set "descr" "Verify fault inject handle device error successfully." - atf_set "require.config" rt_medium disks_are_physical + atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool atf_set "timeout" 1800 } zinject_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zinject_004_pos.ksh || atf_fail "Testcase failed" } zinject_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zinject.kshlib . $(atf_get_srcdir)/zinject.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zinject_001_pos atf_add_test_case zinject_002_pos atf_add_test_case zinject_003_pos atf_add_test_case zinject_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zones/zones_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zones/zones_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zones/zones_test.sh (revision 297878) @@ -1,180 +1,175 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zones_001_pos cleanup zones_001_pos_head() { atf_set "descr" "Local zone contains ZFS datasets as expected." - atf_set "require.config" rt_long atf_set "require.progs" zfs zoneadm zonecfg atf_set "timeout" 3600 } zones_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zones_001_pos.ksh || atf_fail "Testcase failed" } zones_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zones_002_pos cleanup zones_002_pos_head() { atf_set "descr" "A ZFS fs is created when the parent dir of zonepath is a ZFS fs." - atf_set "require.config" rt_long atf_set "require.progs" zfs zoneadm zonecfg atf_set "timeout" 3600 } zones_002_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zones_002_pos.ksh || atf_fail "Testcase failed" } zones_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zones_003_pos cleanup zones_003_pos_head() { atf_set "descr" "Zone cloning via ZFS snapshots works as expected." - atf_set "require.config" rt_long atf_set "require.progs" zfs zoneadm zonecfg atf_set "timeout" 3600 } zones_003_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zones_003_pos.ksh || atf_fail "Testcase failed" } zones_003_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zones_004_pos cleanup zones_004_pos_head() { atf_set "descr" "A ZFS fs is destroyed when the zone it was created for is deleted." - atf_set "require.config" rt_long atf_set "require.progs" zfs zoneadm zonecfg atf_set "timeout" 3600 } zones_004_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zones_004_pos.ksh || atf_fail "Testcase failed" } zones_004_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zones_005_pos cleanup zones_005_pos_head() { atf_set "descr" "Pool properties can be read but can't be set within a zone" - atf_set "require.config" rt_long atf_set "require.progs" zpool zonecfg zoneadm atf_set "timeout" 3600 } zones_005_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zones_005_pos.ksh || atf_fail "Testcase failed" } zones_005_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zones_common.kshlib . $(atf_get_srcdir)/zones.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zones_001_pos atf_add_test_case zones_002_pos atf_add_test_case zones_003_pos atf_add_test_case zones_004_pos atf_add_test_case zones_005_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_cli/zvol_cli_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_cli/zvol_cli_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_cli/zvol_cli_test.sh (revision 297878) @@ -1,112 +1,109 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zvol_cli_001_pos cleanup zvol_cli_001_pos_head() { atf_set "descr" "Executing well-formed 'zfs list' commands should return success" - atf_set "require.config" rt_short atf_set "require.progs" zfs } zvol_cli_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_cli_001_pos.ksh || atf_fail "Testcase failed" } zvol_cli_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_cli_002_pos cleanup zvol_cli_002_pos_head() { atf_set "descr" "Creating a volume a 50 letter name should work." - atf_set "require.config" rt_short atf_set "require.progs" zfs } zvol_cli_002_pos_body() { atf_expect_fail "REQ25548 Increase FreeBSDs mount path length limit" export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_cli_002_pos.ksh || atf_fail "Testcase failed" } zvol_cli_002_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_cli_003_neg cleanup zvol_cli_003_neg_head() { atf_set "descr" "Try each ZFS volume sub-command without parameters to make sure it returns an error." - atf_set "require.config" rt_short atf_set "require.progs" zfs } zvol_cli_003_neg_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_cli_003_neg.ksh || atf_fail "Testcase failed" } zvol_cli_003_neg_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zvol_cli.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zvol_cli_001_pos atf_add_test_case zvol_cli_002_pos atf_add_test_case zvol_cli_003_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_test.sh (revision 297877) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_test.sh (revision 297878) @@ -1,58 +1,57 @@ # CDDL HEADER START # # The contents of this file are subject to the terms of the # Common Development and Distribution License (the "License"). # You may not use this file except in compliance with the License. # # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE # or http://www.opensolaris.org/os/licensing. # See the License for the specific language governing permissions # and limitations under the License. # # When distributing Covered Code, include this CDDL HEADER in each # file and include the License file at usr/src/OPENSOLARIS.LICENSE. # If applicable, add the following below this CDDL HEADER, with the # fields enclosed by brackets "[]" replaced with your own identifying # information: Portions Copyright [yyyy] [name of copyright owner] # # CDDL HEADER END # # # Copyright 2012 Spectra Logic. All rights reserved. # Use is subject to license terms. # atf_test_case zvol_thrash_001_pos cleanup zvol_thrash_001_pos_head() { atf_set "descr" "Cause frequent device removal and arrival in the prescence of zvols. ZFS should not taste them for VDev GUIDs. If it does, \ deadlocks (SpectraLogic MST 23637) and panics (SpectraLogic BUG23665 \ and BUG23677) may result" - atf_set "require.config" rt_long atf_set "require.progs" zfs zpool camcontrol atf_set "timeout" 900 } zvol_thrash_001_pos_body() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zvol_thrash.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_thrash_001_pos.ksh || atf_fail "Testcase failed" } zvol_thrash_001_pos_cleanup() { export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zvol_thrash.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zvol_thrash_001_pos }