Index: projects/zfsd/head/tests/sys/cddl/zfs/include/default.cfg.in =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/include/default.cfg.in (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/include/default.cfg.in (revision 323033) @@ -1,48 +1,50 @@ # # 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 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)default.cfg 1.8 08/11/03 SMI" # # Read the user config file, if it exists # export STF_SUITE=%%STFSUITEDIR%% . $STF_SUITE/include/libtest.kshlib # source the autogenerated commands.cfg file (built from the commands.txt file . $STF_SUITE/include/commands.cfg # Turn ATF variables into environment variables export DISKS=`atf_config_get disks ""` export KEEP=`atf_config_get keep_pools "" | ${SED} -E 's/ +/|/g'` +export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") + . $STF_SUITE/include/constants.cfg # finally, if we're running in a local zone # we take some additional actions if ! is_global_zone; then reexport_pool fi Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/cifs/cifs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/cifs/cifs_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/cifs/cifs_test.sh (revision 323033) @@ -1,117 +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 cifs_attr_001_pos cleanup cifs_attr_001_pos_head() { atf_set "descr" "Verify set/clear DOS attributes will succeed while user haswrite_attributes permission or PRIV_FILE_OWNER privilege" atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runwattr } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cifs_attr_001_pos.ksh || atf_fail "Testcase failed" } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cifs_attr_002_pos cleanup cifs_attr_002_pos_head() { atf_set "descr" "Verify set/clear BSD'ish attributes will succeed while user hasPRIV_FILE_FLAG_SET/PRIV_FILE_FLAG_CLEAR privilege" atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runwattr } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cifs_attr_002_pos.ksh || atf_fail "Testcase failed" } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cifs_attr_003_pos cleanup cifs_attr_003_pos_head() { atf_set "descr" "Verify DOS & BSD'ish attributes will provide theaccess limitation as expected." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runat } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cifs_attr_003_pos.ksh || atf_fail "Testcase failed" } cifs_attr_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)/cifs.kshlib . $(atf_get_srcdir)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case cifs_attr_001_pos atf_add_test_case cifs_attr_002_pos atf_add_test_case cifs_attr_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/nontrivial/nontrivial_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/nontrivial/nontrivial_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/nontrivial/nontrivial_test.sh (revision 323033) @@ -1,719 +1,667 @@ # 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_acl_chmod_001_neg cleanup zfs_acl_chmod_001_neg_head() { atf_set "descr" "Verify illegal operating to ACL, it will fail." atf_set "require.config" zfs_acl } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_001_neg.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_002_pos cleanup zfs_acl_chmod_002_pos_head() { atf_set "descr" "Verify acl after upgrading." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_aclmode_001_pos cleanup zfs_acl_chmod_aclmode_001_pos_head() { atf_set "descr" "Verify chmod have correct behaviour to directory and file whenfilesystem has the different aclmode setting." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_chmod_aclmode_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_aclmode_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_aclmode_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_compact_001_pos cleanup zfs_acl_chmod_compact_001_pos_head() { atf_set "descr" "chmod A{+|=} should set compact ACL correctly." atf_set "require.config" zfs_acl } zfs_acl_chmod_compact_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_compact_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_compact_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_delete_001_pos cleanup zfs_acl_chmod_delete_001_pos_head() { atf_set "descr" "Verify that the combined delete_child/delete permission forowner/group/everyone are correct." atf_set "require.config" zfs_acl } zfs_acl_chmod_delete_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_delete_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_delete_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_inherit_001_pos cleanup zfs_acl_chmod_inherit_001_pos_head() { atf_set "descr" "Verify chmod have correct behaviour to directory and file whensetting different inherit strategies to them." atf_set "require.config" zfs_acl } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_inherit_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_inherit_002_pos cleanup zfs_acl_chmod_inherit_002_pos_head() { atf_set "descr" "Verify chmod have correct behaviour to directory and file whenfilesystem has the different aclinherit setting." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_inherit_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_inherit_003_pos cleanup zfs_acl_chmod_inherit_003_pos_head() { atf_set "descr" "Verify chmod have correct behaviour to directory and file whenfilesystem has the different aclinherit setting." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_inherit_003_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_inherit_004_pos cleanup zfs_acl_chmod_inherit_004_pos_head() { atf_set "descr" "Verify aclinherit=passthrough-x will inherit the 'x' bits while mode request." atf_set "require.config" zfs_acl atf_set "require.progs" zfs zpool } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_inherit_004_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_inherit_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_owner_001_pos cleanup zfs_acl_chmod_owner_001_pos_head() { atf_set "descr" "Verify that the chown/chgrp could take owner/groupwhile permission is granted." atf_set "require.config" zfs_acl } zfs_acl_chmod_owner_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_owner_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_owner_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_rwacl_001_pos cleanup zfs_acl_chmod_rwacl_001_pos_head() { atf_set "descr" "Verify chmod A[number]{+|-|=} read_acl/write_acl have correctbehaviour to access permission." atf_set "require.config" zfs_acl } zfs_acl_chmod_rwacl_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_rwacl_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_rwacl_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_rwx_001_pos cleanup zfs_acl_chmod_rwx_001_pos_head() { atf_set "descr" "chmod A{+|-|=} have the correct behaviour to the ACL list." atf_set "require.config" zfs_acl } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_rwx_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_rwx_002_pos cleanup zfs_acl_chmod_rwx_002_pos_head() { atf_set "descr" "chmod A{+|-|=} read_data|write_data|execute for owner@, group@or everyone@ correctly alters mode bits." atf_set "require.config" zfs_acl } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_rwx_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_rwx_003_pos cleanup zfs_acl_chmod_rwx_003_pos_head() { atf_set "descr" "Verify that the read_data/write_data/execute permission forowner/group/everyone are correct." atf_set "require.config" zfs_acl } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_rwx_003_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_rwx_004_pos cleanup zfs_acl_chmod_rwx_004_pos_head() { atf_set "descr" "Verify that explicit ACL setting to specified user or group willoverride existed access rule." atf_set "require.config" zfs_acl } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_rwx_004_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_rwx_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_xattr_001_pos cleanup zfs_acl_chmod_xattr_001_pos_head() { atf_set "descr" "Verify that the permission of read_xattr/write_xattr forowner/group/everyone are correct." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runat } zfs_acl_chmod_xattr_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_xattr_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_xattr_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_chmod_xattr_002_pos cleanup zfs_acl_chmod_xattr_002_pos_head() { atf_set "descr" "Verify that the permission of write_xattr forowner/group/everyone while remove extended attributes are correct." atf_set "require.config" zfs_xattr atf_set "require.progs" runat } zfs_acl_chmod_xattr_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_xattr_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_xattr_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cp_001_pos cleanup zfs_acl_cp_001_pos_head() { atf_set "descr" "Verify that '$CP [-p]' supports ZFS ACLs." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cp_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cp_002_pos cleanup zfs_acl_cp_002_pos_head() { atf_set "descr" "Verify that '$CP [-p]' supports ZFS ACLs." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" zfs runat } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cp_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cpio_001_pos cleanup zfs_acl_cpio_001_pos_head() { atf_set "descr" "Verify that '$CPIO' command supports to archive ZFS ACLs." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_cpio_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cpio_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_cpio_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cpio_002_pos cleanup zfs_acl_cpio_002_pos_head() { atf_set "descr" "Verify that '$CPIO' command supports to archive ZFS ACLs & xattrs." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" zfs runat } zfs_acl_cpio_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cpio_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_cpio_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_find_001_pos cleanup zfs_acl_find_001_pos_head() { atf_set "descr" "Verify that '$FIND' command supports ZFS ACLs." atf_set "require.config" zfs_acl } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_find_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_ls_001_pos cleanup zfs_acl_ls_001_pos_head() { atf_set "descr" "Verify that '$LS' command supports ZFS ACLs." atf_set "require.config" zfs_acl } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_ls_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_mv_001_pos cleanup zfs_acl_mv_001_pos_head() { atf_set "descr" "Verify that '$MV' supports ZFS ACLs." atf_set "require.config" zfs_acl } zfs_acl_mv_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_mv_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_mv_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_tar_001_pos cleanup zfs_acl_tar_001_pos_head() { atf_set "descr" "Verify that '$TAR' command supports to archive ZFS ACLs." atf_set "require.config" zfs_acl atf_set "require.progs" zfs } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_tar_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_tar_002_pos cleanup zfs_acl_tar_002_pos_head() { atf_set "descr" "Verify that '$TAR' command supports to archive ZFS ACLs & xattrs." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" zfs runat } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_tar_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_acl_chmod_001_neg atf_add_test_case zfs_acl_chmod_002_pos atf_add_test_case zfs_acl_chmod_aclmode_001_pos atf_add_test_case zfs_acl_chmod_compact_001_pos atf_add_test_case zfs_acl_chmod_delete_001_pos atf_add_test_case zfs_acl_chmod_inherit_001_pos atf_add_test_case zfs_acl_chmod_inherit_002_pos atf_add_test_case zfs_acl_chmod_inherit_003_pos atf_add_test_case zfs_acl_chmod_inherit_004_pos atf_add_test_case zfs_acl_chmod_owner_001_pos atf_add_test_case zfs_acl_chmod_rwacl_001_pos atf_add_test_case zfs_acl_chmod_rwx_001_pos atf_add_test_case zfs_acl_chmod_rwx_002_pos atf_add_test_case zfs_acl_chmod_rwx_003_pos atf_add_test_case zfs_acl_chmod_rwx_004_pos atf_add_test_case zfs_acl_chmod_xattr_001_pos atf_add_test_case zfs_acl_chmod_xattr_002_pos atf_add_test_case zfs_acl_cp_001_pos atf_add_test_case zfs_acl_cp_002_pos atf_add_test_case zfs_acl_cpio_001_pos atf_add_test_case zfs_acl_cpio_002_pos atf_add_test_case zfs_acl_find_001_pos atf_add_test_case zfs_acl_ls_001_pos atf_add_test_case zfs_acl_mv_001_pos atf_add_test_case zfs_acl_tar_001_pos atf_add_test_case zfs_acl_tar_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/trivial/trivial_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/trivial/trivial_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/acl/trivial/trivial_test.sh (revision 323033) @@ -1,533 +1,495 @@ # 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_acl_chmod_001_pos cleanup zfs_acl_chmod_001_pos_head() { atf_set "descr" "Verify chmod permission settings on files and directories" } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_chmod_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_chmod_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_compress_001_pos cleanup zfs_acl_compress_001_pos_head() { atf_set "descr" "Compress will keep file attribute intact after the file iscompressed and uncompressed" atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_compress_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cp_001_pos cleanup zfs_acl_cp_001_pos_head() { atf_set "descr" "Verifies that cp will include file attribute when using the -@ flag" atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cp_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cp_002_neg cleanup zfs_acl_cp_002_neg_head() { atf_set "descr" "Verifies that cp will not include file attribute when the -@ flagis not present." atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cp_002_neg.ksh || atf_fail "Testcase failed" } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_cp_003_neg cleanup zfs_acl_cp_003_neg_head() { atf_set "descr" "Verifies that cp won't be able to include file attribute whenattribute is unreadable (except root)" atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runat } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_cp_003_neg.ksh || atf_fail "Testcase failed" } zfs_acl_cp_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_find_001_pos cleanup zfs_acl_find_001_pos_head() { atf_set "descr" "Verifies ability to find files with attribute with-xattr flag and using '-exec runat ls'" atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_find_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_find_002_neg cleanup zfs_acl_find_002_neg_head() { atf_set "descr" "verifies -xattr doesn't include files withoutattribute and using '-exec runat ls'" atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runat } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_find_002_neg.ksh || atf_fail "Testcase failed" } zfs_acl_find_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_ls_001_pos cleanup zfs_acl_ls_001_pos_head() { atf_set "descr" "Verifies that ls displays @ in the file permissions using ls -@for files with attribute." atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_ls_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_ls_002_neg cleanup zfs_acl_ls_002_neg_head() { atf_set "descr" "Verifies that ls doesn't display @ in the filepermissions using ls -@ for files without attribute." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" runat } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_ls_002_neg.ksh || atf_fail "Testcase failed" } zfs_acl_ls_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_mv_001_pos cleanup zfs_acl_mv_001_pos_head() { atf_set "descr" "Verifies that mv will include file attribute." atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_mv_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_mv_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_mv_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pack_001_pos cleanup zfs_acl_pack_001_pos_head() { atf_set "descr" "Verifies that pack will keep file attribute intact after the fileis packed and unpacked" atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" unpack pack } zfs_acl_pack_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pack_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pack_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_001_pos cleanup zfs_acl_pax_001_pos_head() { atf_set "descr" "Verify include attribute in pax archive and restore with paxshould succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_002_pos cleanup zfs_acl_pax_002_pos_head() { atf_set "descr" "Verify include attribute in pax archive and restore with tarshould succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_002_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_003_pos cleanup zfs_acl_pax_003_pos_head() { atf_set "descr" "Verify include attribute in pax archive and restore with cpioshould succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_003_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_004_pos cleanup zfs_acl_pax_004_pos_head() { atf_set "descr" "Verify files include attribute in pax archive and restore with paxshould succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_004_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_005_pos cleanup zfs_acl_pax_005_pos_head() { atf_set "descr" "Verify files include attribute in cpio archive and restore withcpio should succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_005_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_pax_006_pos cleanup zfs_acl_pax_006_pos_head() { atf_set "descr" "Verify files include attribute in tar archive and restore withtar should succeed." atf_set "require.config" zfs_acl zfs_xattr atf_set "require.progs" pax } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_pax_006_pos.ksh || atf_fail "Testcase failed" } zfs_acl_pax_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_tar_001_pos cleanup zfs_acl_tar_001_pos_head() { atf_set "descr" "Verifies that tar will include file attribute when @ flag ispresent." atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_tar_001_pos.ksh || atf_fail "Testcase failed" } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_acl_tar_002_neg cleanup zfs_acl_tar_002_neg_head() { atf_set "descr" "Verifies that tar will not include files attribute when @ flag isnot present" atf_set "require.config" zfs_acl zfs_xattr } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_acl_tar_002_neg.ksh || atf_fail "Testcase failed" } zfs_acl_tar_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)/../acl.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_acl_chmod_001_pos atf_add_test_case zfs_acl_compress_001_pos atf_add_test_case zfs_acl_cp_001_pos atf_add_test_case zfs_acl_cp_002_neg atf_add_test_case zfs_acl_cp_003_neg atf_add_test_case zfs_acl_find_001_pos atf_add_test_case zfs_acl_find_002_neg atf_add_test_case zfs_acl_ls_001_pos atf_add_test_case zfs_acl_ls_002_neg atf_add_test_case zfs_acl_mv_001_pos atf_add_test_case zfs_acl_pack_001_pos atf_add_test_case zfs_acl_pax_001_pos atf_add_test_case zfs_acl_pax_002_pos atf_add_test_case zfs_acl_pax_003_pos atf_add_test_case zfs_acl_pax_004_pos atf_add_test_case zfs_acl_pax_005_pos atf_add_test_case zfs_acl_pax_006_pos atf_add_test_case zfs_acl_tar_001_pos atf_add_test_case zfs_acl_tar_002_neg } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/atime/atime_test.sh (revision 323033) @@ -1,86 +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 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/bootfs/bootfs_test.sh (revision 323033) @@ -1,184 +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 bootfs_001_pos bootfs_001_pos_head() { atf_set "descr" "Valid datasets are accepted as bootfs property values" atf_set "require.progs" 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.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.progs" 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.progs" 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.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.progs" zfs zpool } 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.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.progs" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cache/cache_test.sh (revision 323033) @@ -1,349 +1,327 @@ # 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" zfs zpool 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.progs" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cachefile/cachefile_test.sh (revision 323033) @@ -1,102 +1,98 @@ # 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.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.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.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.progs" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_001/assertion_001_test.sh (revision 323033) @@ -1,57 +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 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" } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_002/assertion_002_test.sh (revision 323033) @@ -1,57 +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 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" } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_003/assertion_003_test.sh (revision 323033) @@ -1,57 +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 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" } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/clean_mirror/assertion_004/assertion_004_test.sh (revision 323033) @@ -1,57 +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 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" } 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/zdb/zdb_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zdb/zdb_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zdb/zdb_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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 zdb_001_neg cleanup zdb_001_neg_head() { atf_set "descr" "Execute zdb using invalid parameters." atf_set "require.progs" zdb } zdb_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)/zdb.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zdb_001_neg.ksh || atf_fail "Testcase failed" } zdb_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)/zdb.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zdb_001_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs/zfs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs/zfs_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs/zfs_test.sh (revision 323033) @@ -1,109 +1,103 @@ # 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_001_neg cleanup zfs_001_neg_head() { atf_set "descr" "Badly-formed zfs sub-command should return an error." atf_set "require.progs" zfs } zfs_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)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_001_neg.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_002_pos cleanup zfs_002_pos_head() { atf_set "descr" "With ZFS_ABORT set, all zfs commands can abort and generate a core file." atf_set "require.progs" zfs coreadm } zfs_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)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_003_neg cleanup zfs_003_neg_head() { atf_set "descr" "zfs fails with unexpected scenarios." atf_set "require.progs" zfs } zfs_003_neg_body() { atf_skip "FreeBSD does not allow /dev/zfs to be renamed" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_003_neg.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_malformed.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_001_neg atf_add_test_case zfs_002_pos atf_add_test_case zfs_003_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/zfs_clone_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/zfs_clone_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_clone/zfs_clone_test.sh (revision 323033) @@ -1,264 +1,246 @@ # 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_clone_001_neg cleanup zfs_clone_001_neg_head() { atf_set "descr" "Badly-formed 'zfs clone' with inapplicable scenariosshould return an error." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_001_neg.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_002_pos cleanup zfs_clone_002_pos_head() { atf_set "descr" "clone -p should work as expected." atf_set "require.progs" zfs } zfs_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_003_pos cleanup zfs_clone_003_pos_head() { atf_set "descr" "'zfs clone -o property=value filesystem' can successfully createa ZFS clone filesystem with correct property set." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_003_pos.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_004_pos cleanup zfs_clone_004_pos_head() { atf_set "descr" "'zfs clone -o property=value filesystem' can successfully createa ZFS clone filesystem with multiple properties set." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_004_pos.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_005_pos cleanup zfs_clone_005_pos_head() { atf_set "descr" "'zfs clone -o property=value -V size volume' can successfullycreate a ZFS clone volume with correct property set." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_005_pos.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_006_pos cleanup zfs_clone_006_pos_head() { atf_set "descr" "'zfs clone -o property=value volume' can successfullycreate a ZFS clone volume with multiple correct properties set." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_006_pos.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_007_pos cleanup zfs_clone_007_pos_head() { atf_set "descr" "'zfs clone -o version=' could upgrade version,but downgrade is denied." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_007_pos.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_008_neg cleanup zfs_clone_008_neg_head() { atf_set "descr" "Verify 'zfs clone -o ' fails with bad argument." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_008_neg.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_009_neg cleanup zfs_clone_009_neg_head() { atf_set "descr" "Verify 'zfs clone -o ' fails with bad argument." atf_set "require.progs" zfs } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_clone_009_neg.ksh || atf_fail "Testcase failed" } zfs_clone_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)/zfs_clone.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_clone_001_neg atf_add_test_case zfs_clone_002_pos atf_add_test_case zfs_clone_003_pos atf_add_test_case zfs_clone_004_pos atf_add_test_case zfs_clone_005_pos atf_add_test_case zfs_clone_006_pos atf_add_test_case zfs_clone_007_pos atf_add_test_case zfs_clone_008_neg atf_add_test_case zfs_clone_009_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_copies/zfs_copies_test.sh (revision 323033) @@ -1,199 +1,187 @@ # 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_copies_001_pos cleanup zfs_copies_001_pos_head() { atf_set "descr" "Verify 'copies' property with correct arguments works or not." atf_set "require.progs" zfs } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_001_pos.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_copies_002_pos cleanup zfs_copies_002_pos_head() { atf_set "descr" "Verify that the space used by multiple copies is charged correctly." atf_set "require.progs" zfs } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_002_pos.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_copies_003_pos cleanup zfs_copies_003_pos_head() { atf_set "descr" "Verify that ZFS volume space used by multiple copies is charged correctly." atf_set "require.progs" zfs } zfs_copies_003_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_003_pos.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_copies_004_neg cleanup zfs_copies_004_neg_head() { atf_set "descr" "Verify that copies property cannot be set to any value other than 1,2 or 3" atf_set "require.progs" zfs } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_004_neg.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_copies_005_neg cleanup zfs_copies_005_neg_head() { atf_set "descr" "Verify that copies cannot be set with pool version 1" atf_set "require.progs" zfs zpool } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_005_neg.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_copies_006_pos cleanup zfs_copies_006_pos_head() { atf_set "descr" "Verify that ZFS volume space used by multiple copies is charged correctly." atf_set "require.progs" zfs } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_copies_006_pos.ksh || atf_fail "Testcase failed" } zfs_copies_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)/zfs_copies.kshlib . $(atf_get_srcdir)/zfs_copies.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_copies_001_pos atf_add_test_case zfs_copies_002_pos atf_add_test_case zfs_copies_003_pos atf_add_test_case zfs_copies_004_neg atf_add_test_case zfs_copies_005_neg atf_add_test_case zfs_copies_006_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_create/zfs_create_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_create/zfs_create_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_create/zfs_create_test.sh (revision 323033) @@ -1,422 +1,396 @@ # 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_create_001_pos cleanup zfs_create_001_pos_head() { atf_set "descr" "'zfs create ' can create a ZFS filesystem in the namespace." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_001_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_002_pos cleanup zfs_create_002_pos_head() { atf_set "descr" "'zfs create -s -V ' succeeds" atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_003_pos cleanup zfs_create_003_pos_head() { atf_set "descr" "Verify creating volume with specified blocksize works." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_003_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_004_pos cleanup zfs_create_004_pos_head() { atf_set "descr" "'zfs create -o property=value filesystem' can successfully createa ZFS filesystem with correct property set." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_004_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_005_pos cleanup zfs_create_005_pos_head() { atf_set "descr" "'zfs create -o property=value filesystem' can successfully createa ZFS filesystem with multiple properties set." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_005_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_006_pos cleanup zfs_create_006_pos_head() { atf_set "descr" "'zfs create -o property=value -V size volume' can successfullycreate a ZFS volume with correct property set." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_006_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_007_pos cleanup zfs_create_007_pos_head() { atf_set "descr" "'zfs create -o property=value -V size volume' can successfullycreate a ZFS volume with correct property set." atf_set "require.progs" zfs } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_007_pos.ksh || atf_fail "Testcase failed" } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_008_neg cleanup zfs_create_008_neg_head() { atf_set "descr" "'zfs create' should return an error with badly-formed parameters." atf_set "require.progs" zfs } zfs_create_008_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_008_neg.ksh || atf_fail "Testcase failed" } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_009_neg cleanup zfs_create_009_neg_head() { atf_set "descr" "Verify 'zfs create ' fails with bad argument." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_009_neg.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_010_neg cleanup zfs_create_010_neg_head() { atf_set "descr" "Verify 'zfs create [-s] [-b ] -V ' fails withbadly-formed or arguments." atf_set "require.progs" zfs } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_010_neg.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_011_pos cleanup zfs_create_011_pos_head() { atf_set "descr" "'zfs create -p' works as expected." atf_set "require.progs" zfs } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_011_pos.ksh || atf_fail "Testcase failed" } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_012_pos cleanup zfs_create_012_pos_head() { atf_set "descr" "'zfs create -p -o version=1' only cause the leaf filesystem to be version=1." atf_set "require.progs" zfs } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_012_pos.ksh || atf_fail "Testcase failed" } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_013_pos cleanup zfs_create_013_pos_head() { atf_set "descr" "'zfs create -s -V ' succeeds" atf_set "require.progs" zfs } zfs_create_013_pos_body() { atf_expect_fail "REQ25548 FreeBSD's mount path limit is too short" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_create_013_pos.ksh || atf_fail "Testcase failed" } zfs_create_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)/zfs_create_common.kshlib . $(atf_get_srcdir)/properties.kshlib . $(atf_get_srcdir)/zfs_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_create_001_pos atf_add_test_case zfs_create_002_pos atf_add_test_case zfs_create_003_pos atf_add_test_case zfs_create_004_pos atf_add_test_case zfs_create_005_pos atf_add_test_case zfs_create_006_pos atf_add_test_case zfs_create_007_pos atf_add_test_case zfs_create_008_neg atf_add_test_case zfs_create_009_neg atf_add_test_case zfs_create_010_neg atf_add_test_case zfs_create_011_pos atf_add_test_case zfs_create_012_pos atf_add_test_case zfs_create_013_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_destroy/zfs_destroy_test.sh (revision 323033) @@ -1,234 +1,221 @@ # 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_destroy_001_pos cleanup zfs_destroy_001_pos_head() { atf_set "descr" "'zfs destroy -r|-R|-f|-rf|-Rf ' shouldrecursively destroy all children." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_001_pos.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_002_pos cleanup zfs_destroy_002_pos_head() { atf_set "descr" "Verify 'zfs destroy' can destroy the specified datasets without activedependents." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_002_pos.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_003_pos cleanup zfs_destroy_003_pos_head() { atf_set "descr" "Verify that 'zfs destroy [-rR]' succeeds as root." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_003_pos.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_004_pos cleanup zfs_destroy_004_pos_head() { atf_set "descr" "Verify that 'zfs destroy -f' succeeds as root." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_004_pos.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_005_neg cleanup zfs_destroy_005_neg_head() { atf_set "descr" "Seperately verify 'zfs destroy -f|-r|-rf|-R|-rR ' willfail in different conditions." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_005_neg_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_005_neg.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_006_neg cleanup zfs_destroy_006_neg_head() { atf_set "descr" "'zfs destroy' should return an error with badly-formed parameters." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_006_neg.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_007_neg cleanup zfs_destroy_007_neg_head() { atf_set "descr" "Destroy dataset which is namespace-parent of origin should failed." atf_set "require.progs" zfs atf_set "timeout" 3600 } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_destroy_007_neg.ksh || atf_fail "Testcase failed" } zfs_destroy_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)/zfs_destroy_common.kshlib . $(atf_get_srcdir)/zfs_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_destroy_001_pos atf_add_test_case zfs_destroy_002_pos atf_add_test_case zfs_destroy_003_pos atf_add_test_case zfs_destroy_004_pos atf_add_test_case zfs_destroy_005_neg atf_add_test_case zfs_destroy_006_neg atf_add_test_case zfs_destroy_007_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh (revision 323033) @@ -1,332 +1,312 @@ # 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_get_001_pos cleanup zfs_get_001_pos_head() { atf_set "descr" "Setting the valid options and properties 'zfs get' should returnthe correct property value." atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_001_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_002_pos cleanup zfs_get_002_pos_head() { atf_set "descr" "Setting the valid options and properties 'zfs get' return correctvalue. It should be successful." atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_002_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_003_pos cleanup zfs_get_003_pos_head() { atf_set "descr" "'zfs get' should get consistent report with different option." atf_set "require.progs" zfs } zfs_get_003_pos_body() { atf_expect_fail "BUG26181: The remount mount option is broken in SpectraBSD" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_003_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_004_pos cleanup zfs_get_004_pos_head() { atf_set "descr" "Verify the functions of 'zfs get all' work." atf_set "require.progs" zfs zpool } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_004_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_005_neg cleanup zfs_get_005_neg_head() { atf_set "descr" "Setting the invalid option and properties, 'zfs get' should befailed." atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_005_neg.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_006_neg cleanup zfs_get_006_neg_head() { atf_set "descr" "Verify 'zfs get all' fails with invalid combination scenarios." atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_006_neg.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_007_neg cleanup zfs_get_007_neg_head() { atf_set "descr" "'zfs get -o' fails with invalid options or column names" atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_007_neg.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_008_pos cleanup zfs_get_008_pos_head() { atf_set "descr" "Verify '-d ' can work with other options" atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_008_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_009_pos cleanup zfs_get_009_pos_head() { atf_set "descr" "'zfs get -d ' should get expected output." atf_set "require.progs" zfs atf_set "timeout" 1200 } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_009_pos.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_010_neg cleanup zfs_get_010_neg_head() { atf_set "descr" "A negative depth or a non numeric depth should fail in 'zfs get -d '" atf_set "require.progs" zfs } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_get_010_neg.ksh || atf_fail "Testcase failed" } zfs_get_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)/zfs_get_list_d.kshlib . $(atf_get_srcdir)/zfs_get_common.kshlib . $(atf_get_srcdir)/zfs_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_get_001_pos atf_add_test_case zfs_get_002_pos atf_add_test_case zfs_get_003_pos atf_add_test_case zfs_get_004_pos atf_add_test_case zfs_get_005_neg atf_add_test_case zfs_get_006_neg atf_add_test_case zfs_get_007_neg atf_add_test_case zfs_get_008_pos atf_add_test_case zfs_get_009_pos atf_add_test_case zfs_get_010_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/zfs_inherit_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/zfs_inherit_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_inherit/zfs_inherit_test.sh (revision 323033) @@ -1,108 +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 zfs_inherit_001_neg cleanup zfs_inherit_001_neg_head() { atf_set "descr" "'zfs inherit' should return an error when attempting to inherit un-inheritable properties." atf_set "require.progs" zfs } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_inherit_001_neg.ksh || atf_fail "Testcase failed" } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_inherit_002_neg cleanup zfs_inherit_002_neg_head() { atf_set "descr" "'zfs inherit' should return an error with bad parameters in one command." atf_set "require.progs" zfs } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_inherit_002_neg.ksh || atf_fail "Testcase failed" } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_inherit_003_pos cleanup zfs_inherit_003_pos_head() { atf_set "descr" "'zfs inherit' should inherit user property." atf_set "require.progs" zfs } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_inherit_003_pos.ksh || atf_fail "Testcase failed" } zfs_inherit_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)/zfs_inherit.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_inherit_001_neg atf_add_test_case zfs_inherit_002_neg atf_add_test_case zfs_inherit_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh (revision 323033) @@ -1,378 +1,354 @@ # 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_mount_001_pos cleanup zfs_mount_001_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd ' succeeds as root." atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_001_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_002_pos cleanup zfs_mount_002_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd' with a filesystemwhose name is not in 'zfs list' will fail with return code 1." atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_002_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_003_pos cleanup zfs_mount_003_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd' with a filesystemwhose mountpoint property is 'legacy' or 'none' \will fail with return code 1." atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_003_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_004_pos cleanup zfs_mount_004_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd 'with a mounted filesystem will fail with return code 1." atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_004_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_005_pos cleanup zfs_mount_005_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd' with a filesystemwhose mountpoint is currently in use will fail with return code 1." atf_set "require.progs" zfs } zfs_mount_005_pos_body() { [[ `uname -s` = "FreeBSD" ]] && atf_skip "Unlike Illumos, FreeBSD allows the behavior the prohibition of which is tested by this testcase" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_005_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_006_pos cleanup zfs_mount_006_pos_head() { atf_set "descr" "Verify that '$ZFS $mountcmd 'which mountpoint be the identical or the top of an existing one \will fail with return code 1." atf_set "require.progs" zfs } zfs_mount_006_pos_body() { [[ `uname -s` = "FreeBSD" ]] && atf_skip "Unlike Illumos, FreeBSD allows the behavior the prohibition of which is tested by this testcase" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_006_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_007_pos cleanup zfs_mount_007_pos_head() { atf_set "descr" "Verify '-o' will set filesystem property temporarily,without affecting the property that is stored on disk." atf_set "require.progs" zfs } zfs_mount_007_pos_body() { atf_expect_fail "BUG26181: The remount mount option is broken in SpectraBSD" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_007_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_008_pos cleanup zfs_mount_008_pos_head() { atf_set "descr" "Verify 'zfs mount -O' will override existing mount point." atf_set "require.progs" zfs } zfs_mount_008_pos_body() { [[ `uname -s` = "FreeBSD" ]] && \ atf_skip "Overlay mounts are not 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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_008_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_009_neg cleanup zfs_mount_009_neg_head() { atf_set "descr" "Badly-formed 'zfs $mountcmd' with inapplicable scenariosshould return an error." atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.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)/zfs_mount_009_neg.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_010_neg cleanup zfs_mount_010_neg_head() { atf_set "descr" "zfs mount fails with mounted filesystem or busy mountpoint" atf_set "require.progs" zfs } zfs_mount_010_neg_body() { [[ `uname -s` = "FreeBSD" ]] && atf_skip "Unlike Illumos, FreeBSD allows the behavior the prohibition of which is tested by this testcase" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_010_neg.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_011_neg cleanup zfs_mount_011_neg_head() { atf_set "descr" "zfs mount fails with bad parameters" atf_set "require.progs" zfs } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_mount_011_neg.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_all_001_pos cleanup zfs_mount_all_001_pos_head() { atf_set "descr" "Verify that 'zfs $mountall' succeeds as root,and all available ZFS filesystems are mounted." atf_set "require.progs" zfs } zfs_mount_all_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.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)/zfs_mount_all_001_pos.ksh || atf_fail "Testcase failed" } zfs_mount_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)/zfs_mount.kshlib . $(atf_get_srcdir)/zfs_mount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_mount_001_pos atf_add_test_case zfs_mount_002_pos atf_add_test_case zfs_mount_003_pos atf_add_test_case zfs_mount_004_pos atf_add_test_case zfs_mount_005_pos atf_add_test_case zfs_mount_006_pos atf_add_test_case zfs_mount_007_pos atf_add_test_case zfs_mount_008_pos atf_add_test_case zfs_mount_009_neg atf_add_test_case zfs_mount_010_neg atf_add_test_case zfs_mount_011_neg atf_add_test_case zfs_mount_all_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/zfs_promote_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/zfs_promote_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_promote/zfs_promote_test.sh (revision 323033) @@ -1,254 +1,238 @@ # 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_promote_001_pos cleanup zfs_promote_001_pos_head() { atf_set "descr" "'zfs promote' can promote a clone filesystem." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_001_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_002_pos cleanup zfs_promote_002_pos_head() { atf_set "descr" "'zfs promote' can deal with multiple snapshots in a filesystem." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_002_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_003_pos cleanup zfs_promote_003_pos_head() { atf_set "descr" "'zfs promote' can deal with multi-point snapshots." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_003_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_004_pos cleanup zfs_promote_004_pos_head() { atf_set "descr" "'zfs promote' can deal with multi-level clone." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_004_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_005_pos cleanup zfs_promote_005_pos_head() { atf_set "descr" "The original fs was unmounted, 'zfs promote' still should succeed." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_005_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_006_neg cleanup zfs_promote_006_neg_head() { atf_set "descr" "'zfs promote' will fail with invalid arguments." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_006_neg.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_007_neg cleanup zfs_promote_007_neg_head() { atf_set "descr" "'zfs promote' can deal with name conflicts." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_007_neg.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_008_pos cleanup zfs_promote_008_pos_head() { atf_set "descr" "'zfs promote' can promote a volume clone." atf_set "require.progs" zfs } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_promote_008_pos.ksh || atf_fail "Testcase failed" } zfs_promote_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)/zfs_promote_common.kshlib . $(atf_get_srcdir)/zfs_promote.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_promote_001_pos atf_add_test_case zfs_promote_002_pos atf_add_test_case zfs_promote_003_pos atf_add_test_case zfs_promote_004_pos atf_add_test_case zfs_promote_005_pos atf_add_test_case zfs_promote_006_neg atf_add_test_case zfs_promote_007_neg atf_add_test_case zfs_promote_008_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_property/zfs_property_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_property/zfs_property_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_property/zfs_property_test.sh (revision 323033) @@ -1,57 +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 zfs_set_property_001_pos cleanup zfs_set_property_001_pos_head() { atf_set "descr" "Verify each of the file system properties." atf_set "require.progs" zfs } zfs_set_property_001_pos_body() { atf_skip "Due to changing zfs ls output, test needs a re-write." - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_property.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_set_property_001_pos.ksh || atf_fail "Testcase failed" } zfs_set_property_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)/zfs_property.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_set_property_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/zfs_receive_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/zfs_receive_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_receive/zfs_receive_test.sh (revision 323033) @@ -1,264 +1,246 @@ # 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_receive_001_pos cleanup zfs_receive_001_pos_head() { atf_set "descr" "Verifying 'zfs receive [] -d ' works." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_001_pos.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_002_pos cleanup zfs_receive_002_pos_head() { atf_set "descr" "Verifying 'zfs receive ' works." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_002_pos.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_003_pos cleanup zfs_receive_003_pos_head() { atf_set "descr" "'zfs recv -F' to force rollback." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_003_pos.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_004_neg cleanup zfs_receive_004_neg_head() { atf_set "descr" "Verify that invalid parameters to 'zfs receive' are caught." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_004_neg.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_005_neg cleanup zfs_receive_005_neg_head() { atf_set "descr" "Verify 'zfs receive' fails with unsupported scenarios." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_005_neg.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_006_pos cleanup zfs_receive_006_pos_head() { atf_set "descr" "'zfs recv -d ' should succeed no matter ancestor filesystemexists." atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_006_pos.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_007_neg cleanup zfs_receive_007_neg_head() { atf_set "descr" "'zfs recv -F' should fail if the incremental stream does not match" atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_007_neg.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_008_pos cleanup zfs_receive_008_pos_head() { atf_set "descr" "Verifying 'zfs receive -vn []and zfs receive -vn -d '" atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_008_pos.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_009_neg cleanup zfs_receive_009_neg_head() { atf_set "descr" "Verify 'zfs receive' fails with bad option, missing or too many arguments" atf_set "require.progs" zfs } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_receive_009_neg.ksh || atf_fail "Testcase failed" } zfs_receive_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)/zfs_receive.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_receive_001_pos atf_add_test_case zfs_receive_002_pos atf_add_test_case zfs_receive_003_pos atf_add_test_case zfs_receive_004_neg atf_add_test_case zfs_receive_005_neg atf_add_test_case zfs_receive_006_pos atf_add_test_case zfs_receive_007_neg atf_add_test_case zfs_receive_008_pos atf_add_test_case zfs_receive_009_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/zfs_rename_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/zfs_rename_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rename/zfs_rename_test.sh (revision 323033) @@ -1,394 +1,368 @@ # 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_rename_001_pos cleanup zfs_rename_001_pos_head() { atf_set "descr" "'zfs rename' should successfully rename valid datasets" atf_set "require.progs" zfs } zfs_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_001_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_002_pos cleanup zfs_rename_002_pos_head() { atf_set "descr" "'zfs rename' should successfully rename valid datasets" atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_002_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_003_pos cleanup zfs_rename_003_pos_head() { atf_set "descr" "'zfs rename' can address the abbreviated snapshot name." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_003_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_004_neg cleanup zfs_rename_004_neg_head() { atf_set "descr" "'zfs rename' should fail when datasets are of a different type." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_004_neg.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_005_neg cleanup zfs_rename_005_neg_head() { atf_set "descr" "'zfs rename' should fail while datasets are within different pool." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_005_neg.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_006_pos cleanup zfs_rename_006_pos_head() { atf_set "descr" "'zfs rename' can successfully rename a volume snapshot." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_006_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_007_pos cleanup zfs_rename_007_pos_head() { atf_set "descr" "Rename dataset, verify that the data haven't changed." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_007_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_008_pos cleanup zfs_rename_008_pos_head() { atf_set "descr" "zfs rename -r can rename snapshot recursively." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_008_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_009_neg cleanup zfs_rename_009_neg_head() { atf_set "descr" "zfs rename -r failed, when snapshot name is already existing." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_009_neg.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_010_neg cleanup zfs_rename_010_neg_head() { atf_set "descr" "The recursive flag -r can only be used for snapshots." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_010_neg.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_011_pos cleanup zfs_rename_011_pos_head() { atf_set "descr" "'zfs rename -p' should work as expected" atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_011_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_012_neg cleanup zfs_rename_012_neg_head() { atf_set "descr" "'zfs rename' should fail with bad option, null target dataset andtoo long target dataset name." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_012_neg.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_013_pos cleanup zfs_rename_013_pos_head() { atf_set "descr" "zfs rename -r can rename snapshot when child datasetsdon't have a snapshot of the given name." atf_set "require.progs" zfs } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rename_013_pos.ksh || atf_fail "Testcase failed" } zfs_rename_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)/zfs_rename.kshlib . $(atf_get_srcdir)/zfs_rename.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_rename_001_pos atf_add_test_case zfs_rename_002_pos atf_add_test_case zfs_rename_003_pos atf_add_test_case zfs_rename_004_neg atf_add_test_case zfs_rename_005_neg atf_add_test_case zfs_rename_006_pos atf_add_test_case zfs_rename_007_pos atf_add_test_case zfs_rename_008_pos atf_add_test_case zfs_rename_009_neg atf_add_test_case zfs_rename_010_neg atf_add_test_case zfs_rename_011_pos atf_add_test_case zfs_rename_012_neg atf_add_test_case zfs_rename_013_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/zfs_reservation_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/zfs_reservation_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_reservation/zfs_reservation_test.sh (revision 323033) @@ -1,82 +1,78 @@ # 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_reservation_001_pos cleanup zfs_reservation_001_pos_head() { atf_set "descr" "Verify that a reservation > 2^64 -1 fails." atf_set "require.progs" zfs } 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)/zfs_reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_reservation_001_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_reservation_002_pos cleanup zfs_reservation_002_pos_head() { atf_set "descr" "Ensure a reservation of 0 or 'none' is allowed." atf_set "require.progs" zfs } 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)/zfs_reservation.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_reservation_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_reservation.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_reservation_001_pos atf_add_test_case zfs_reservation_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/zfs_rollback_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/zfs_rollback_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_rollback/zfs_rollback_test.sh (revision 323033) @@ -1,146 +1,138 @@ # 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_rollback_001_pos cleanup zfs_rollback_001_pos_head() { atf_set "descr" "'zfs rollback -r|-rf|-R|-Rf' will recursively destroy anysnapshots more recent than the one specified." atf_set "require.progs" zfs atf_set "timeout" 1800 } 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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rollback_001_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rollback_002_pos cleanup zfs_rollback_002_pos_head() { atf_set "descr" "'zfs rollback -f' will force unmount any filesystems." atf_set "require.progs" zfs atf_set "timeout" 1800 } 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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rollback_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rollback_003_neg cleanup zfs_rollback_003_neg_head() { atf_set "descr" "Seperately verify 'zfs rollback ''|-f|-r|-rf will fail indifferent conditions." atf_set "require.progs" zfs atf_set "timeout" 1800 } zfs_rollback_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rollback_003_neg.ksh || atf_fail "Testcase failed" } zfs_rollback_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rollback_004_neg cleanup zfs_rollback_004_neg_head() { atf_set "descr" "'zfs rollback' should fail with bad options,too many arguments,non-snapshot datasets or missing datasets." atf_set "require.progs" zfs atf_set "timeout" 1800 } zfs_rollback_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_rollback_004_neg.ksh || atf_fail "Testcase failed" } zfs_rollback_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)/zfs_rollback_common.kshlib . $(atf_get_srcdir)/zfs_rollback.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_rollback_001_pos atf_add_test_case zfs_rollback_002_pos atf_add_test_case zfs_rollback_003_neg atf_add_test_case zfs_rollback_004_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_send/zfs_send_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_send/zfs_send_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_send/zfs_send_test.sh (revision 323033) @@ -1,134 +1,126 @@ # 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_send_001_pos cleanup zfs_send_001_pos_head() { atf_set "descr" "Verify 'zfs send' can create valid send streams as expected." atf_set "require.progs" zfs } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_send_001_pos.ksh || atf_fail "Testcase failed" } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_send_002_pos cleanup zfs_send_002_pos_head() { atf_set "descr" "Verify 'zfs send' generates valid streams with a property setup" atf_set "require.progs" zfs } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_send_002_pos.ksh || atf_fail "Testcase failed" } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_send_003_pos cleanup zfs_send_003_pos_head() { atf_set "descr" "'zfs send -i' can deal with abbreviated snapshot name." atf_set "require.progs" zfs } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_send_003_pos.ksh || atf_fail "Testcase failed" } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_send_004_neg cleanup zfs_send_004_neg_head() { atf_set "descr" "Verify that invalid parameters to 'zfs send' are caught." atf_set "require.progs" zfs } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_send_004_neg.ksh || atf_fail "Testcase failed" } zfs_send_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)/zfs_send.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_send_001_pos atf_add_test_case zfs_send_002_pos atf_add_test_case zfs_send_003_pos atf_add_test_case zfs_send_004_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_test.sh (revision 323033) @@ -1,787 +1,735 @@ # 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" "Setting a valid {primary|secondary}cache on file system and volume,It should be successful." 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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cache_002_neg cleanup cache_002_neg_head() { atf_set "descr" "Setting invalid {primary|secondary}cache on fs and volume,It should fail." atf_set "require.progs" zfs atf_set "timeout" 1200 } cache_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cache_002_neg.ksh || atf_fail "Testcase failed" } cache_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case canmount_001_pos cleanup canmount_001_pos_head() { atf_set "descr" "Setting a valid property of canmount to file system, it must be successful." atf_set "require.progs" zfs atf_set "timeout" 1200 } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/canmount_001_pos.ksh || atf_fail "Testcase failed" } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case canmount_002_pos cleanup canmount_002_pos_head() { atf_set "descr" "Setting canmount=noauto to file system, it must be successful." atf_set "require.progs" zfs atf_set "timeout" 1200 } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.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)/canmount_002_pos.ksh || atf_fail "Testcase failed" } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case canmount_003_pos cleanup canmount_003_pos_head() { atf_set "descr" "While canmount=noauto and the dataset is mounted, zfs must not attempt to unmount it" atf_set "require.progs" zfs atf_set "timeout" 1200 } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.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)/canmount_003_pos.ksh || atf_fail "Testcase failed" } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case canmount_004_pos cleanup canmount_004_pos_head() { atf_set "descr" "Verify canmount=noauto work fine when setting sharenfs or sharesmb." atf_set "require.progs" zfs atf_set "timeout" 1200 } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/canmount_004_pos.ksh || atf_fail "Testcase failed" } canmount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case checksum_001_pos cleanup checksum_001_pos_head() { atf_set "descr" "Setting a valid checksum on a file system, volume,it should be successful." atf_set "timeout" 1200 } checksum_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/checksum_001_pos.ksh || atf_fail "Testcase failed" } checksum_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case compression_001_pos cleanup compression_001_pos_head() { atf_set "descr" "Setting a valid compression on file system and volume,It should be successful." atf_set "timeout" 1200 } compression_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/compression_001_pos.ksh || atf_fail "Testcase failed" } compression_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case mountpoint_001_pos cleanup mountpoint_001_pos_head() { atf_set "descr" "Setting a valid mountpoint to file system, it must be successful." atf_set "require.progs" zfs atf_set "timeout" 1200 } mountpoint_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mountpoint_001_pos.ksh || atf_fail "Testcase failed" } mountpoint_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case mountpoint_002_pos cleanup mountpoint_002_pos_head() { atf_set "descr" "Setting a valid mountpoint for an unmounted file system,it remains unmounted." atf_set "require.progs" zfs atf_set "timeout" 1200 } mountpoint_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mountpoint_002_pos.ksh || atf_fail "Testcase failed" } mountpoint_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case mountpoint_003_pos cleanup mountpoint_003_pos_head() { atf_set "descr" "With legacy mount, FSType-specific option works well." atf_set "require.progs" zfs atf_set "timeout" 1200 } mountpoint_003_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/mountpoint_003_pos.ksh || atf_fail "Testcase failed" } mountpoint_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case onoffs_001_pos cleanup onoffs_001_pos_head() { atf_set "descr" "Setting a valid value to atime, readonly, setuid or zoned on filesystem or volume. It should be successful." atf_set "require.progs" zfs atf_set "timeout" 1200 } onoffs_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/onoffs_001_pos.ksh || atf_fail "Testcase failed" } onoffs_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case property_alias_001_pos cleanup property_alias_001_pos_head() { atf_set "descr" "Properties with aliases also work with those aliases." atf_set "require.progs" zfs atf_set "timeout" 1200 } property_alias_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/property_alias_001_pos.ksh || atf_fail "Testcase failed" } property_alias_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case readonly_001_pos cleanup readonly_001_pos_head() { atf_set "descr" "Setting a valid readonly property on a dataset succeeds." atf_set "require.progs" zfs atf_set "timeout" 1200 } readonly_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/readonly_001_pos.ksh || atf_fail "Testcase failed" } readonly_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case reservation_001_neg cleanup reservation_001_neg_head() { atf_set "descr" "Verify invalid reservation values are rejected" atf_set "require.progs" zfs atf_set "timeout" 1200 } reservation_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/reservation_001_neg.ksh || atf_fail "Testcase failed" } reservation_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case ro_props_001_pos cleanup ro_props_001_pos_head() { atf_set "descr" "Verify that read-only properties are immutable." atf_set "require.progs" zfs atf_set "timeout" 1200 } ro_props_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/ro_props_001_pos.ksh || atf_fail "Testcase failed" } ro_props_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case share_mount_001_neg cleanup share_mount_001_neg_head() { atf_set "descr" "Verify that we cannot share or mount legacy filesystems." atf_set "require.progs" zfs atf_set "timeout" 1200 } share_mount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/share_mount_001_neg.ksh || atf_fail "Testcase failed" } share_mount_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case snapdir_001_pos cleanup snapdir_001_pos_head() { atf_set "descr" "Setting a valid snapdir property on a dataset succeeds." atf_set "require.progs" zfs atf_set "timeout" 1200 } snapdir_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/snapdir_001_pos.ksh || atf_fail "Testcase failed" } snapdir_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case user_property_001_pos cleanup user_property_001_pos_head() { atf_set "descr" "ZFS can set any valid user defined property to the non-readonlydataset." atf_set "require.progs" zfs atf_set "timeout" 1200 } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/user_property_001_pos.ksh || atf_fail "Testcase failed" } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case user_property_002_pos cleanup user_property_002_pos_head() { atf_set "descr" "User defined property inherited from its parent." atf_set "require.progs" zfs atf_set "timeout" 1200 } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/user_property_002_pos.ksh || atf_fail "Testcase failed" } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case user_property_003_neg cleanup user_property_003_neg_head() { atf_set "descr" "ZFS can handle invalid user property." atf_set "require.progs" zfs atf_set "timeout" 1200 } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/user_property_003_neg.ksh || atf_fail "Testcase failed" } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case user_property_004_pos cleanup user_property_004_pos_head() { atf_set "descr" "User property has no effect to snapshot until 'Snapshot properties' supported." atf_set "require.progs" zfs zpool atf_set "timeout" 1200 } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/user_property_004_pos.ksh || atf_fail "Testcase failed" } user_property_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case version_001_neg cleanup version_001_neg_head() { atf_set "descr" "Verify invalid version values are rejected" atf_set "require.progs" zfs atf_set "timeout" 1200 } version_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/version_001_neg.ksh || atf_fail "Testcase failed" } version_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_set_001_neg cleanup zfs_set_001_neg_head() { atf_set "descr" "Setting invalid value to mountpoint, checksum, compression, atime,readonly, setuid, zoned or canmount on a file system file system or volume. \It should be failed." atf_set "timeout" 1200 } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_set_001_neg.ksh || atf_fail "Testcase failed" } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_set_002_neg cleanup zfs_set_002_neg_head() { atf_set "descr" "'zfs set' fails with invalid arguments" atf_set "require.progs" zfs atf_set "timeout" 1200 } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_set_002_neg.ksh || atf_fail "Testcase failed" } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_set_003_neg cleanup zfs_set_003_neg_head() { atf_set "descr" "'zfs set mountpoint/sharenfs' fails with invalid scenarios" atf_set "require.progs" zfs atf_set "timeout" 1200 } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_set_003_neg.ksh || atf_fail "Testcase failed" } zfs_set_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)/zfs_set_common.kshlib . $(atf_get_srcdir)/zfs_set.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_neg atf_add_test_case canmount_001_pos atf_add_test_case canmount_002_pos atf_add_test_case canmount_003_pos atf_add_test_case canmount_004_pos atf_add_test_case checksum_001_pos atf_add_test_case compression_001_pos atf_add_test_case mountpoint_001_pos atf_add_test_case mountpoint_002_pos atf_add_test_case mountpoint_003_pos atf_add_test_case onoffs_001_pos atf_add_test_case property_alias_001_pos atf_add_test_case readonly_001_pos atf_add_test_case reservation_001_neg atf_add_test_case ro_props_001_pos atf_add_test_case share_mount_001_neg atf_add_test_case snapdir_001_pos atf_add_test_case user_property_001_pos atf_add_test_case user_property_002_pos atf_add_test_case user_property_003_neg atf_add_test_case user_property_004_pos atf_add_test_case version_001_neg atf_add_test_case zfs_set_001_neg atf_add_test_case zfs_set_002_neg atf_add_test_case zfs_set_003_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_share/zfs_share_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_share/zfs_share_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_share/zfs_share_test.sh (revision 323033) @@ -1,316 +1,294 @@ # 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_share_001_pos cleanup zfs_share_001_pos_head() { atf_set "descr" "Verify that 'zfs share' succeeds as root." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_001_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_002_pos cleanup zfs_share_002_pos_head() { atf_set "descr" "Verify that zfs share with a non-existent file system fails." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_002_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_003_pos cleanup zfs_share_003_pos_head() { atf_set "descr" "Verify that '$ZFS share' with a file systemwhose sharenfs property is 'off' \will fail with return code 1." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_003_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_004_pos cleanup zfs_share_004_pos_head() { atf_set "descr" "Verify that a file system and its snapshot are shared." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_004_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_005_pos cleanup zfs_share_005_pos_head() { atf_set "descr" "Verify that NFS share options are propagated correctly." atf_set "require.progs" zfs share svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_005_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_006_pos cleanup zfs_share_006_pos_head() { atf_set "descr" "Verify that a dataset could not be shared,but its sub-filesystems could be shared." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_006_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_007_neg cleanup zfs_share_007_neg_head() { atf_set "descr" "Verify that invalid share parameters and options are caught." atf_set "require.progs" zfs share svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_007_neg.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_008_neg cleanup zfs_share_008_neg_head() { atf_set "descr" "Verify that sharing a dataset other than filesystem fails." atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_008_neg.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_009_neg cleanup zfs_share_009_neg_head() { atf_set "descr" "zfs share fails with shared filesystem" atf_set "require.progs" zfs share svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_009_neg.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_009_pos cleanup zfs_share_009_pos_head() { atf_set "descr" "Verify umount/rollback/destroy fails does not unshare the sharedfile system" atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_009_pos.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_010_neg cleanup zfs_share_010_neg_head() { atf_set "descr" "zfs share fails with bad parameters" atf_set "require.progs" zfs svcs } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_share_010_neg.ksh || atf_fail "Testcase failed" } zfs_share_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)/zfs_share.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_share_001_pos atf_add_test_case zfs_share_002_pos atf_add_test_case zfs_share_003_pos atf_add_test_case zfs_share_004_pos atf_add_test_case zfs_share_005_pos atf_add_test_case zfs_share_006_pos atf_add_test_case zfs_share_007_neg atf_add_test_case zfs_share_008_neg atf_add_test_case zfs_share_009_neg atf_add_test_case zfs_share_009_pos atf_add_test_case zfs_share_010_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/zfs_snapshot_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/zfs_snapshot_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_snapshot/zfs_snapshot_test.sh (revision 323033) @@ -1,212 +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 zfs_snapshot_001_neg cleanup zfs_snapshot_001_neg_head() { atf_set "descr" "Badly-formed 'zfs snapshot' with inapplicable scenariosshould return an error." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_001_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_002_neg cleanup zfs_snapshot_002_neg_head() { atf_set "descr" "'zfs snapshot -r' fails with invalid arguments or scenarios." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_002_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_003_neg cleanup zfs_snapshot_003_neg_head() { atf_set "descr" "'zfs snapshot' fails with bad options, or too many arguments." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_003_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_004_neg cleanup zfs_snapshot_004_neg_head() { atf_set "descr" "Verify recursive snapshotting could not break ZFS." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_004_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_005_neg cleanup zfs_snapshot_005_neg_head() { atf_set "descr" "Verify long name filesystem with snapshot should not break ZFS." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_005_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_006_pos cleanup zfs_snapshot_006_pos_head() { atf_set "descr" "User property could be set upon snapshot via 'zfs snapshot -o'." atf_set "require.progs" zfs zpool } 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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_006_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_007_neg cleanup zfs_snapshot_007_neg_head() { atf_set "descr" "'zfs snapshot -o' cannot set properties other than user property." atf_set "require.progs" zfs } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_snapshot_007_neg.ksh || atf_fail "Testcase failed" } zfs_snapshot_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)/zfs_snapshot.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_snapshot_001_neg atf_add_test_case zfs_snapshot_002_neg atf_add_test_case zfs_snapshot_003_neg atf_add_test_case zfs_snapshot_004_neg atf_add_test_case zfs_snapshot_005_neg atf_add_test_case zfs_snapshot_006_pos atf_add_test_case zfs_snapshot_007_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/zfs_unmount_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/zfs_unmount_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unmount/zfs_unmount_test.sh (revision 323033) @@ -1,317 +1,298 @@ # 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_unmount_001_pos cleanup zfs_unmount_001_pos_head() { atf_set "descr" "Verify the u[n]mount [-f] sub-command." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_001_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_002_pos cleanup zfs_unmount_002_pos_head() { atf_set "descr" "Verify that '$ZFS $unmountcmd [-f] 'whose name is not in 'zfs list' will fail with return code 1." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_002_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_003_pos cleanup zfs_unmount_003_pos_head() { atf_set "descr" "Verify that '$ZFS $unmountcmd [-f] 'whose mountpoint property is 'legacy' or 'none' \will fail with return code 1." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_003_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_004_pos cleanup zfs_unmount_004_pos_head() { atf_set "descr" "Verify that '$ZFS $unmountcmd [-f] 'with an unmounted filesystem will fail with return code 1." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_004_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_005_pos cleanup zfs_unmount_005_pos_head() { atf_set "descr" "Verify that '$ZFS $unmountcmd 'with a filesystem which mountpoint is currently in use \will fail with return code 1, and forcefully will succeeds as root." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_005_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_006_pos cleanup zfs_unmount_006_pos_head() { atf_set "descr" "Re-creating zfs files, 'zfs unmount' still succeed." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_006_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_007_neg cleanup zfs_unmount_007_neg_head() { atf_set "descr" "Badly-formed 'zfs $unmountcmd' with inapplicable scenariosshould return an error." atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_007_neg.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_008_neg cleanup zfs_unmount_008_neg_head() { atf_set "descr" "zfs unmount fails with bad parameters or scenarios" atf_set "require.progs" zfs } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unmount_008_neg.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_009_pos cleanup zfs_unmount_009_pos_head() { atf_set "descr" "zfs fource unmount and destroy in snapshot directory will not cause error." atf_set "require.progs" zfs zpool } zfs_unmount_009_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.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)/zfs_unmount_009_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_all_001_pos cleanup zfs_unmount_all_001_pos_head() { atf_set "descr" "Verify that 'zfs $unmountall' succeeds as root,and all available ZFS filesystems are unmounted." atf_set "require.progs" zfs } zfs_unmount_all_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.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)/zfs_unmount_all_001_pos.ksh || atf_fail "Testcase failed" } zfs_unmount_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)/zfs_unmount.kshlib . $(atf_get_srcdir)/zfs_unmount.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_unmount_001_pos atf_add_test_case zfs_unmount_002_pos atf_add_test_case zfs_unmount_003_pos atf_add_test_case zfs_unmount_004_pos atf_add_test_case zfs_unmount_005_pos atf_add_test_case zfs_unmount_006_pos atf_add_test_case zfs_unmount_007_neg atf_add_test_case zfs_unmount_008_neg atf_add_test_case zfs_unmount_009_pos atf_add_test_case zfs_unmount_all_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/zfs_unshare_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/zfs_unshare_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_unshare/zfs_unshare_test.sh (revision 323033) @@ -1,160 +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 zfs_unshare_001_pos cleanup zfs_unshare_001_pos_head() { atf_set "descr" "Verify that 'zfs unshare [-a] ' succeeds as root." atf_set "require.progs" zfs unshare svcs } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unshare_001_pos.ksh || atf_fail "Testcase failed" } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unshare_002_pos cleanup zfs_unshare_002_pos_head() { atf_set "descr" "Verify that 'zfs unshare [-a]' is aware of legacy share." atf_set "require.progs" zfs unshare share svcs } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unshare_002_pos.ksh || atf_fail "Testcase failed" } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unshare_003_pos cleanup zfs_unshare_003_pos_head() { atf_set "descr" "Verify that a file system and its dependant are unshared." atf_set "require.progs" zfs unshare svcs } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unshare_003_pos.ksh || atf_fail "Testcase failed" } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unshare_004_neg cleanup zfs_unshare_004_neg_head() { atf_set "descr" "Verify that '$ZFS unshare' issue error message with badly formed parameter." atf_set "require.progs" zfs svcs } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unshare_004_neg.ksh || atf_fail "Testcase failed" } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unshare_005_neg cleanup zfs_unshare_005_neg_head() { atf_set "descr" "Verify that unsharing a dataset other than filesystem fails." atf_set "require.progs" zfs svcs } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unshare_005_neg.ksh || atf_fail "Testcase failed" } zfs_unshare_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)/zfs_unshare.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_unshare_001_pos atf_add_test_case zfs_unshare_002_pos atf_add_test_case zfs_unshare_003_pos atf_add_test_case zfs_unshare_004_neg atf_add_test_case zfs_unshare_005_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_upgrade/zfs_upgrade_test.sh (revision 323033) @@ -1,229 +1,215 @@ # 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_upgrade_001_pos cleanup zfs_upgrade_001_pos_head() { atf_set "descr" "Executing 'zfs upgrade' command succeeds." atf_set "require.progs" zfs nawk } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_001_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_002_pos cleanup zfs_upgrade_002_pos_head() { atf_set "descr" "Executing 'zfs upgrade -v' command succeeds." atf_set "require.progs" zfs nawk } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_002_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_003_pos cleanup zfs_upgrade_003_pos_head() { atf_set "descr" "Executing 'zfs upgrade [-V version] filesystem' command succeeds." atf_set "require.progs" zfs } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_003_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_004_pos cleanup zfs_upgrade_004_pos_head() { atf_set "descr" "Executing 'zfs upgrade -r [-V version] filesystem' command succeeds." atf_set "require.progs" zfs } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_004_pos.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_005_pos cleanup zfs_upgrade_005_pos_head() { atf_set "descr" "Executing 'zfs upgrade [-V version] -a' command succeeds." atf_set "require.progs" zfs } zfs_upgrade_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib [[ -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)/zfs_upgrade_005_pos.ksh || atf_fail "Testcase failed" } zfs_upgrade_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_006_neg cleanup zfs_upgrade_006_neg_head() { atf_set "descr" "Badly-formed 'zfs upgrade' should return an error." atf_set "require.progs" zfs } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_006_neg.ksh || atf_fail "Testcase failed" } zfs_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_007_neg cleanup zfs_upgrade_007_neg_head() { atf_set "descr" "Set invalid value or non-digit version should fail as expected." atf_set "require.progs" zfs } zfs_upgrade_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_upgrade_007_neg.ksh || atf_fail "Testcase failed" } zfs_upgrade_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)/zfs_upgrade.cfg . $(atf_get_srcdir)/zfs_upgrade.kshlib ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_upgrade_001_pos atf_add_test_case zfs_upgrade_002_pos atf_add_test_case zfs_upgrade_003_pos atf_add_test_case zfs_upgrade_004_pos atf_add_test_case zfs_upgrade_005_pos atf_add_test_case zfs_upgrade_006_neg atf_add_test_case zfs_upgrade_007_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool/zpool_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool/zpool_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool/zpool_test.sh (revision 323033) @@ -1,108 +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 zpool_001_neg cleanup zpool_001_neg_head() { atf_set "descr" "Execute zpool sub-command without proper parameters." atf_set "require.progs" zpool } zpool_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)/zpool.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_001_neg.ksh || atf_fail "Testcase failed" } zpool_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)/zpool.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_002_pos cleanup zpool_002_pos_head() { atf_set "descr" "With ZFS_ABORT set, all zpool commands can abort and generate a core file." atf_set "require.progs" zpool coreadm } zpool_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.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_002_pos.ksh || atf_fail "Testcase failed" } zpool_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.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_003_pos cleanup zpool_003_pos_head() { atf_set "descr" "Debugging features of zpool should succeed." atf_set "require.progs" zpool } zpool_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.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_003_pos.ksh || atf_fail "Testcase failed" } zpool_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.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_001_neg atf_add_test_case zpool_002_pos atf_add_test_case zpool_003_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_test.sh (revision 323033) @@ -1,301 +1,283 @@ # 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" 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" 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" 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" 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" 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" disks_are_physical atf_set "require.progs" zfs 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" 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" 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" 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_attach/zpool_attach_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/zpool_attach_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_attach/zpool_attach_test.sh (revision 323033) @@ -1,57 +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 zpool_attach_001_neg cleanup zpool_attach_001_neg_head() { atf_set "descr" "Executing 'zpool attach' with bad options fails" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_attach_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)/zpool_attach.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_attach_001_neg.ksh || atf_fail "Testcase failed" } zpool_attach_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)/zpool_attach.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_attach_001_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_clear/zpool_clear_test.sh (revision 323033) @@ -1,138 +1,130 @@ # 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_clear_001_pos cleanup zpool_clear_001_pos_head() { atf_set "descr" "Verify 'zpool clear' can clear errors of a storage pool." atf_set "require.progs" zpool zfs atf_set "timeout" 2100 } zpool_clear_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_clear.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_clear_001_pos.ksh || atf_fail "Testcase failed" } zpool_clear_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_clear.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_clear_002_neg cleanup zpool_clear_002_neg_head() { atf_set "descr" "Execute 'zpool clear' using invalid parameters." atf_set "require.progs" zpool atf_set "timeout" 2100 } zpool_clear_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)/zpool_clear.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_clear_002_neg.ksh || atf_fail "Testcase failed" } zpool_clear_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)/zpool_clear.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_clear_003_neg cleanup zpool_clear_003_neg_head() { atf_set "descr" "Verify 'zpool clear' cannot clear error for available spare devices." atf_set "require.progs" zpool atf_set "timeout" 2100 } zpool_clear_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)/zpool_clear.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_clear_003_neg.ksh || atf_fail "Testcase failed" } zpool_clear_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)/zpool_clear.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_clear_004_pos cleanup zpool_clear_004_pos_head() { atf_set "descr" "Verify 'zpool clear' can work on spare vdevs" atf_set "require.progs" zpool atf_set "timeout" 2100 } zpool_clear_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_clear.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_clear_004_pos.ksh || atf_fail "Testcase failed" } zpool_clear_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_clear.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_clear_001_pos atf_add_test_case zpool_clear_002_neg atf_add_test_case zpool_clear_003_neg atf_add_test_case zpool_clear_004_pos } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh (revision 323033) @@ -1,723 +1,677 @@ # 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" disks_are_physical atf_set "require.progs" 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" disks_are_physical atf_set "require.progs" 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" 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" disks_are_physical atf_set "require.progs" zfs 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" disks_are_physical atf_set "require.progs" 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" disks_are_physical atf_set "require.progs" 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" 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" 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" 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" disks_are_physical atf_set "require.progs" zfs 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" 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" 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" 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" disks_are_physical atf_set "require.progs" zfs 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" 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" 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" 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" 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" 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" 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" 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" 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" 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_destroy/zpool_destroy_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/zpool_destroy_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_destroy/zpool_destroy_test.sh (revision 323033) @@ -1,134 +1,126 @@ # 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_destroy_001_pos cleanup zpool_destroy_001_pos_head() { atf_set "descr" "'zpool destroy ' can destroy a specified pool." atf_set "require.config" disks_are_physical atf_set "require.progs" zfs zpool } zpool_destroy_001_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_destroy.cfg ksh93 $(atf_get_srcdir)/zpool_destroy_001_pos.ksh || atf_fail "Testcase failed" } zpool_destroy_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_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_destroy_002_pos cleanup zpool_destroy_002_pos_head() { atf_set "descr" "'zpool destroy -f ' can forcely destroy the specified pool" atf_set "require.progs" zfs zpool } zpool_destroy_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_destroy.cfg ksh93 $(atf_get_srcdir)/zpool_destroy_002_pos.ksh || atf_fail "Testcase failed" } zpool_destroy_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_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_destroy_003_neg cleanup zpool_destroy_003_neg_head() { atf_set "descr" "'zpool destroy' should return an error with badly-formed parameters." atf_set "require.progs" zpool } zpool_destroy_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)/zpool_destroy.cfg ksh93 $(atf_get_srcdir)/zpool_destroy_003_neg.ksh || atf_fail "Testcase failed" } zpool_destroy_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)/zpool_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_destroy_004_pos cleanup zpool_destroy_004_pos_head() { atf_set "descr" "'zpool destroy -f' should work on active pools." atf_set "require.progs" zfs zpool atf_set "require.config" at_least_2_disks atf_set "timeout" 2000 } zpool_destroy_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_destroy.cfg ksh93 $(atf_get_srcdir)/zpool_destroy_004_pos.ksh || atf_fail "Testcase failed" } zpool_destroy_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_destroy.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_destroy_001_pos atf_add_test_case zpool_destroy_002_pos atf_add_test_case zpool_destroy_003_neg atf_add_test_case zpool_destroy_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/zpool_detach_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/zpool_detach_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_detach/zpool_detach_test.sh (revision 323033) @@ -1,57 +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 zpool_detach_001_neg cleanup zpool_detach_001_neg_head() { atf_set "descr" "Executing 'zpool detach' with bad options fails" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_detach_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)/zpool_detach.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_detach_001_neg.ksh || atf_fail "Testcase failed" } zpool_detach_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)/zpool_detach.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_detach_001_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_export/zpool_export_test.sh (revision 323033) @@ -1,134 +1,126 @@ # 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_export_001_pos cleanup zpool_export_001_pos_head() { atf_set "descr" "Verify a pool can be exported." atf_set "require.progs" zfs zpool } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_export_001_pos.ksh || atf_fail "Testcase failed" } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_export_002_pos cleanup zpool_export_002_pos_head() { atf_set "descr" "Verify a busy ZPOOL cannot be exported." atf_set "require.progs" zfs zpool } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_export_002_pos.ksh || atf_fail "Testcase failed" } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_export_003_neg cleanup zpool_export_003_neg_head() { atf_set "descr" "'zpool export' should return an error with badly-formed parameters." atf_set "require.progs" zfs zpool } zpool_export_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)/zpool_export.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_export_003_neg.ksh || atf_fail "Testcase failed" } zpool_export_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)/zpool_export.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_export_004_pos cleanup zpool_export_004_pos_head() { atf_set "descr" "Verify zpool export succeed or fail with spare." atf_set "require.progs" zpool } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_export_004_pos.ksh || atf_fail "Testcase failed" } zpool_export_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_export.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_export_001_pos atf_add_test_case zpool_export_002_pos atf_add_test_case zpool_export_003_neg atf_add_test_case zpool_export_004_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh (revision 323033) @@ -1,136 +1,128 @@ # 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_get_001_pos cleanup zpool_get_001_pos_head() { atf_set "descr" "Zpool get usage message is displayed when called with no arguments." atf_set "require.progs" zpool } zpool_get_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_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_get_001_pos.ksh || atf_fail "Testcase failed" } zpool_get_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_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_get_002_pos cleanup zpool_get_002_pos_head() { atf_set "descr" "Zpool get all works as expected" atf_set "require.progs" zpool } zpool_get_002_pos_body() { atf_expect_fail 'BUG26173: zpool man page and STF tests were never updated for removal of "used" property' - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_get_002_pos.ksh || atf_fail "Testcase failed" } zpool_get_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_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_get_003_pos cleanup zpool_get_003_pos_head() { atf_set "descr" "Zpool get returns values for all known properties" atf_set "require.progs" zpool } zpool_get_003_pos_body() { atf_expect_fail 'BUG26173: zpool man page and STF tests were never updated for removal of "used" property' - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_get_003_pos.ksh || atf_fail "Testcase failed" } zpool_get_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_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_get_004_neg cleanup zpool_get_004_neg_head() { atf_set "descr" "Malformed zpool get commands are rejected" atf_set "require.progs" zpool } zpool_get_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)/zpool_get.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_get_004_neg.ksh || atf_fail "Testcase failed" } zpool_get_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)/zpool_get.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_get_001_pos atf_add_test_case zpool_get_002_pos atf_add_test_case zpool_get_003_pos atf_add_test_case zpool_get_004_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_history/zpool_history_test.sh (revision 323033) @@ -1,82 +1,78 @@ # 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_history_001_neg cleanup zpool_history_001_neg_head() { atf_set "descr" "Verify 'zpool history' can deal with non-existent pools andgarbage to the command." atf_set "require.progs" zfs zpool } zpool_history_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)/zpool_history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_history_001_neg.ksh || atf_fail "Testcase failed" } zpool_history_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)/zpool_history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_history_002_pos cleanup zpool_history_002_pos_head() { atf_set "descr" "Verify zpool history can handle options [-il] correctly." atf_set "require.progs" zfs zpool } zpool_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)/zpool_history.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_history_002_pos.ksh || atf_fail "Testcase failed" } zpool_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)/zpool_history.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_history_001_neg atf_add_test_case zpool_history_002_pos } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_test.sh (revision 323033) @@ -1,594 +1,554 @@ # 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" at_least_2_disks atf_set "require.progs" zfs zpool sum 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" zfs zpool 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" zfs zpool 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" at_least_2_disks atf_set "require.progs" zfs zpool 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" 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" at_least_2_disks atf_set "require.progs" zfs zpool sum 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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" at_least_2_disks atf_set "require.progs" 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.progs" 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" 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" at_least_2_disks atf_set "require.progs" zfs zpool sum 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" 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_offline/zpool_offline_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/zpool_offline_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_offline/zpool_offline_test.sh (revision 323033) @@ -1,84 +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 zpool_offline_001_pos cleanup zpool_offline_001_pos_head() { atf_set "descr" "Executing 'zpool offline' with correct options succeeds" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_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)/zpool_offline.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_offline_001_pos.ksh || atf_fail "Testcase failed" } zpool_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)/zpool_offline.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_offline_002_neg cleanup zpool_offline_002_neg_head() { atf_set "descr" "Executing 'zpool offline' with bad options fails" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_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)/zpool_offline.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_offline_002_neg.ksh || atf_fail "Testcase failed" } zpool_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)/zpool_offline.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_offline_001_pos atf_add_test_case zpool_offline_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_online/zpool_online_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_online/zpool_online_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_online/zpool_online_test.sh (revision 323033) @@ -1,84 +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 zpool_online_001_pos cleanup zpool_online_001_pos_head() { atf_set "descr" "Executing 'zpool online' with correct options succeeds" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_online_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_online.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_online_001_pos.ksh || atf_fail "Testcase failed" } zpool_online_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_online.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_online_002_neg cleanup zpool_online_002_neg_head() { atf_set "descr" "Executing 'zpool online' with bad options fails" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_online_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)/zpool_online.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_online_002_neg.ksh || atf_fail "Testcase failed" } zpool_online_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)/zpool_online.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_online_001_pos atf_add_test_case zpool_online_002_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/zpool_remove_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/zpool_remove_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_remove/zpool_remove_test.sh (revision 323033) @@ -1,111 +1,105 @@ # 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_remove_001_neg cleanup zpool_remove_001_neg_head() { atf_set "descr" "Check zpool remove can not removeactive device from pool" atf_set "require.config" disks_are_physical atf_set "require.progs" zpool } zpool_remove_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)/zpool_remove.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_remove_001_neg.ksh || atf_fail "Testcase failed" } zpool_remove_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)/zpool_remove.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_remove_002_pos cleanup zpool_remove_002_pos_head() { atf_set "descr" "zpool remove can only remove inactive hotspare device from pool" atf_set "require.config" disks_are_physical atf_set "require.progs" zpool } zpool_remove_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_remove.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_remove_002_pos.ksh || atf_fail "Testcase failed" } zpool_remove_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_remove.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_remove_003_pos cleanup zpool_remove_003_pos_head() { atf_set "descr" "zpool remove can remove hotspare device which state go though active to inactive in pool" atf_set "require.config" disks_are_physical atf_set "require.progs" zpool } zpool_remove_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_remove.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_remove_003_pos.ksh || atf_fail "Testcase failed" } zpool_remove_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_remove.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_remove_001_neg atf_add_test_case zpool_remove_002_pos atf_add_test_case zpool_remove_003_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/zpool_replace_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/zpool_replace_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_replace/zpool_replace_test.sh (revision 323033) @@ -1,57 +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 zpool_replace_001_neg cleanup zpool_replace_001_neg_head() { atf_set "descr" "Executing 'zpool replace' with bad options fails" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_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)/zpool_replace.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_replace_001_neg.ksh || atf_fail "Testcase failed" } zpool_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)/zpool_replace.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_replace_001_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/zpool_scrub_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/zpool_scrub_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_scrub/zpool_scrub_test.sh (revision 323033) @@ -1,165 +1,155 @@ # 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_scrub_001_neg cleanup zpool_scrub_001_neg_head() { atf_set "descr" "Execute 'zpool scrub' using invalid parameters." atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_scrub_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)/zpool_scrub.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_scrub_001_neg.ksh || atf_fail "Testcase failed" } zpool_scrub_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)/zpool_scrub.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_scrub_002_pos cleanup zpool_scrub_002_pos_head() { atf_set "descr" "Verify scrub -s works correctly." atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_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)/zpool_scrub.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_scrub_002_pos.ksh || atf_fail "Testcase failed" } zpool_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)/zpool_scrub.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_scrub_003_pos cleanup zpool_scrub_003_pos_head() { atf_set "descr" "scrub command terminates the existing scrub process and starts a new scrub." atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_scrub_003_pos.ksh || atf_fail "Testcase failed" } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_scrub_004_pos cleanup zpool_scrub_004_pos_head() { atf_set "descr" "Resilver prevent scrub from starting until the resilver completes" atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_scrub_004_pos.ksh || atf_fail "Testcase failed" } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_scrub_005_pos cleanup zpool_scrub_005_pos_head() { atf_set "descr" "When scrubbing, detach device should not break system." atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_scrub_005_pos.ksh || atf_fail "Testcase failed" } zpool_scrub_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_scrub.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_scrub_001_neg atf_add_test_case zpool_scrub_002_pos atf_add_test_case zpool_scrub_003_pos atf_add_test_case zpool_scrub_004_pos atf_add_test_case zpool_scrub_005_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_set/zpool_set_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_set/zpool_set_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_set/zpool_set_test.sh (revision 323033) @@ -1,78 +1,75 @@ # 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_set_001_pos zpool_set_001_pos_head() { atf_set "descr" "zpool set usage message is displayed when called with no arguments" atf_set "require.progs" zpool } zpool_set_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)/zpool_set_001_pos.ksh || atf_fail "Testcase failed" } atf_test_case zpool_set_002_neg zpool_set_002_neg_head() { atf_set "descr" "Malformed zpool set commands are rejected" atf_set "require.progs" zpool zfs } zpool_set_002_neg_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)/zpool_set_002_neg.ksh || atf_fail "Testcase failed" } atf_test_case zpool_set_003_neg zpool_set_003_neg_head() { atf_set "descr" "zpool set cannot set a readonly property" atf_set "require.progs" zpool } zpool_set_003_neg_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)/zpool_set_003_neg.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case zpool_set_001_pos atf_add_test_case zpool_set_002_neg atf_add_test_case zpool_set_003_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_status/zpool_status_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_status/zpool_status_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_status/zpool_status_test.sh (revision 323033) @@ -1,82 +1,78 @@ # 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_status_001_pos cleanup zpool_status_001_pos_head() { atf_set "descr" "Executing 'zpool status' with bad options fails" atf_set "require.progs" zpool } zpool_status_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_status.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_status_001_pos.ksh || atf_fail "Testcase failed" } zpool_status_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_status.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_status_002_pos cleanup zpool_status_002_pos_head() { atf_set "descr" "Executing 'zpool status' with correct options succeeds" atf_set "require.progs" zpool } zpool_status_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_status.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_status_002_pos.ksh || atf_fail "Testcase failed" } zpool_status_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_status.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_status_001_pos atf_add_test_case zpool_status_002_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_upgrade/zpool_upgrade_test.sh (revision 323033) @@ -1,305 +1,291 @@ # 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" 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" 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" 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" 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" 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" 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" 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" 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" 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/cli_user/misc/misc_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/misc/misc_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/misc/misc_test.sh (revision 323033) @@ -1,1188 +1,1106 @@ # 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 zdb_001_neg cleanup zdb_001_neg_head() { atf_set "descr" "zdb can't run as a user on datasets, but can run without arguments" atf_set "require.progs" zfs fgrep zpool zdb atf_set "require.user" root } zdb_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zdb_001_neg.ksh" || atf_fail "Testcase failed" } zdb_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_001_neg cleanup zfs_001_neg_head() { atf_set "descr" "zfs shows a usage message when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_001_neg.ksh" || atf_fail "Testcase failed" } zfs_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_allow_001_neg cleanup zfs_allow_001_neg_head() { atf_set "descr" "zfs allow returns an error when run as a user" atf_set "require.progs" zfs fgrep logname zpool atf_set "require.user" root } zfs_allow_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_allow_001_neg.ksh" || atf_fail "Testcase failed" } zfs_allow_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_clone_001_neg cleanup zfs_clone_001_neg_head() { atf_set "descr" "zfs clone returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_clone_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_clone_001_neg.ksh" || atf_fail "Testcase failed" } zfs_clone_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_create_001_neg cleanup zfs_create_001_neg_head() { atf_set "descr" "Verify zfs create without parameters fails." atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_create_001_neg.ksh" || atf_fail "Testcase failed" } zfs_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_destroy_001_neg cleanup zfs_destroy_001_neg_head() { atf_set "descr" "zfs destroy [-f|-r] [fs|snap]" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_destroy_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_destroy_001_neg.ksh" || atf_fail "Testcase failed" } zfs_destroy_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_get_001_neg cleanup zfs_get_001_neg_head() { atf_set "descr" "zfs get works when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_get_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_get_001_neg.ksh" || atf_fail "Testcase failed" } zfs_get_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_inherit_001_neg cleanup zfs_inherit_001_neg_head() { atf_set "descr" "zfs inherit returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_inherit_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_inherit_001_neg.ksh" || atf_fail "Testcase failed" } zfs_inherit_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_mount_001_neg cleanup zfs_mount_001_neg_head() { atf_set "descr" "zfs mount returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_mount_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_mount_001_neg.ksh" || atf_fail "Testcase failed" } zfs_mount_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_promote_001_neg cleanup zfs_promote_001_neg_head() { atf_set "descr" "zfs promote returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_promote_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_promote_001_neg.ksh" || atf_fail "Testcase failed" } zfs_promote_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_receive_001_neg cleanup zfs_receive_001_neg_head() { atf_set "descr" "zfs receive returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_receive_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_receive_001_neg.ksh" || atf_fail "Testcase failed" } zfs_receive_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rename_001_neg cleanup zfs_rename_001_neg_head() { atf_set "descr" "zfs rename returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_rename_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_rename_001_neg.ksh" || atf_fail "Testcase failed" } zfs_rename_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_rollback_001_neg cleanup zfs_rollback_001_neg_head() { atf_set "descr" "zfs rollback returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_rollback_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_rollback_001_neg.ksh" || atf_fail "Testcase failed" } zfs_rollback_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_send_001_neg cleanup zfs_send_001_neg_head() { atf_set "descr" "zfs send returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_send_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_send_001_neg.ksh" || atf_fail "Testcase failed" } zfs_send_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_set_001_neg cleanup zfs_set_001_neg_head() { atf_set "descr" "zfs set returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_set_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_set_001_neg.ksh" || atf_fail "Testcase failed" } zfs_set_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_share_001_neg cleanup zfs_share_001_neg_head() { atf_set "descr" "zfs share returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_share_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_share_001_neg.ksh" || atf_fail "Testcase failed" } zfs_share_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_snapshot_001_neg cleanup zfs_snapshot_001_neg_head() { atf_set "descr" "zfs snapshot returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_snapshot_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_snapshot_001_neg.ksh" || atf_fail "Testcase failed" } zfs_snapshot_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unallow_001_neg cleanup zfs_unallow_001_neg_head() { atf_set "descr" "zfs unallow returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_unallow_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_unallow_001_neg.ksh" || atf_fail "Testcase failed" } zfs_unallow_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unmount_001_neg cleanup zfs_unmount_001_neg_head() { atf_set "descr" "zfs u[n]mount [-f] [mountpoint|fs|snap]" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_unmount_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_unmount_001_neg.ksh" || atf_fail "Testcase failed" } zfs_unmount_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unshare_001_neg cleanup zfs_unshare_001_neg_head() { atf_set "descr" "zfs unshare returns an error when run as a user" atf_set "require.progs" zfs fgrep share zpool atf_set "require.user" root } zfs_unshare_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_unshare_001_neg.ksh" || atf_fail "Testcase failed" } zfs_unshare_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_upgrade_001_neg cleanup zfs_upgrade_001_neg_head() { atf_set "descr" "zfs upgrade returns an error when run as a user" atf_set "require.progs" zfs fgrep zpool atf_set "require.user" root } zfs_upgrade_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_upgrade_001_neg.ksh" || atf_fail "Testcase failed" } zfs_upgrade_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_001_neg cleanup zpool_001_neg_head() { atf_set "descr" "zpool shows a usage message when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_001_neg.ksh" || atf_fail "Testcase failed" } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_001_neg cleanup zpool_add_001_neg_head() { atf_set "descr" "zpool add [-fn] pool_name vdev" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_add_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_add_001_neg.ksh" || atf_fail "Testcase failed" } zpool_add_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_add_002_pos cleanup zpool_add_001_neg_head() { atf_set "descr" "zpool add [-f] -n succeeds for unpriveleged users" atf_set "require.progs" zfs zpool atf_set "require.user" root } 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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_attach_001_neg cleanup zpool_attach_001_neg_head() { atf_set "descr" "zpool attach returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_attach_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_attach_001_neg.ksh" || atf_fail "Testcase failed" } zpool_attach_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_clear_001_neg cleanup zpool_clear_001_neg_head() { atf_set "descr" "zpool clear returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_clear_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_clear_001_neg.ksh" || atf_fail "Testcase failed" } zpool_clear_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_create_001_neg cleanup zpool_create_001_neg_head() { atf_set "descr" "zpool create [-f] fails for unpriveleged users" atf_set "require.progs" zfs zpool atf_set "require.user" root } zpool_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)/misc.cfg # No setup is required for this test. su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_create_001_neg.ksh" || atf_fail "Testcase failed" } zpool_create_001_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_test_case zpool_create_002_pos cleanup zpool_create_002_pos_head() { atf_set "descr" "zpool create [-f] -n succeeds for unpriveleged users" atf_set "require.progs" zfs zpool atf_set "require.user" root } 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 # No setup is required for this test. su -m `atf_config_get unprivileged_user` -c "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 ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_destroy_001_neg cleanup zpool_destroy_001_neg_head() { atf_set "descr" "zpool destroy [-f] [pool_name ...]" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_destroy_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_destroy_001_neg.ksh" || atf_fail "Testcase failed" } zpool_destroy_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_detach_001_neg cleanup zpool_detach_001_neg_head() { atf_set "descr" "zpool detach returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_detach_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_detach_001_neg.ksh" || atf_fail "Testcase failed" } zpool_detach_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_export_001_neg cleanup zpool_export_001_neg_head() { atf_set "descr" "zpool export returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_export_001_neg.ksh" || atf_fail "Testcase failed" } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_get_001_neg cleanup zpool_get_001_neg_head() { atf_set "descr" "zpool get works when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_get_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_get_001_neg.ksh" || atf_fail "Testcase failed" } zpool_get_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_history_001_neg cleanup zpool_history_001_neg_head() { atf_set "descr" "zpool history returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_history_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_history_001_neg.ksh" || atf_fail "Testcase failed" } zpool_history_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_001_neg cleanup zpool_import_001_neg_head() { atf_set "descr" "zpool import returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_import_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_import_001_neg.ksh" || atf_fail "Testcase failed" } zpool_import_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_import_002_neg cleanup zpool_import_002_neg_head() { atf_set "descr" "Executing 'zpool import' by regular user fails" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_import_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_import_002_neg.ksh" || atf_fail "Testcase failed" } zpool_import_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_offline_001_neg cleanup zpool_offline_001_neg_head() { atf_set "descr" "zpool offline returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_offline_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_offline_001_neg.ksh" || atf_fail "Testcase failed" } zpool_offline_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_online_001_neg cleanup zpool_online_001_neg_head() { atf_set "descr" "zpool online returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_online_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_online_001_neg.ksh" || atf_fail "Testcase failed" } zpool_online_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_remove_001_neg cleanup zpool_remove_001_neg_head() { atf_set "descr" "zpool remove returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_remove_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_remove_001_neg.ksh" || atf_fail "Testcase failed" } zpool_remove_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_replace_001_neg cleanup zpool_replace_001_neg_head() { atf_set "descr" "zpool replace returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_replace_001_neg.ksh" || atf_fail "Testcase failed" } zpool_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_scrub_001_neg cleanup zpool_scrub_001_neg_head() { atf_set "descr" "zpool scrub returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_scrub_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_scrub_001_neg.ksh" || atf_fail "Testcase failed" } zpool_scrub_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_set_001_neg cleanup zpool_set_001_neg_head() { atf_set "descr" "zpool set returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_set_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_set_001_neg.ksh" || atf_fail "Testcase failed" } zpool_set_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_status_001_neg cleanup zpool_status_001_neg_head() { atf_set "descr" "zpool status works when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_status_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_status_001_neg.ksh" || atf_fail "Testcase failed" } zpool_status_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_upgrade_001_neg cleanup zpool_upgrade_001_neg_head() { atf_set "descr" "zpool upgrade returns an error when run as a user" atf_set "require.progs" zfs zpool fgrep atf_set "require.user" root } zpool_upgrade_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)/misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_upgrade_001_neg.ksh" || atf_fail "Testcase failed" } zpool_upgrade_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)/misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zdb_001_neg atf_add_test_case zfs_001_neg atf_add_test_case zfs_allow_001_neg atf_add_test_case zfs_clone_001_neg atf_add_test_case zfs_create_001_neg atf_add_test_case zfs_destroy_001_neg atf_add_test_case zfs_get_001_neg atf_add_test_case zfs_inherit_001_neg atf_add_test_case zfs_mount_001_neg atf_add_test_case zfs_promote_001_neg atf_add_test_case zfs_receive_001_neg atf_add_test_case zfs_rename_001_neg atf_add_test_case zfs_rollback_001_neg atf_add_test_case zfs_send_001_neg atf_add_test_case zfs_set_001_neg atf_add_test_case zfs_share_001_neg atf_add_test_case zfs_snapshot_001_neg atf_add_test_case zfs_unallow_001_neg atf_add_test_case zfs_unmount_001_neg atf_add_test_case zfs_unshare_001_neg atf_add_test_case zfs_upgrade_001_neg atf_add_test_case zpool_001_neg atf_add_test_case zpool_add_001_neg atf_add_test_case zpool_add_002_pos atf_add_test_case zpool_attach_001_neg atf_add_test_case zpool_clear_001_neg atf_add_test_case zpool_create_001_neg atf_add_test_case zpool_create_002_pos atf_add_test_case zpool_destroy_001_neg atf_add_test_case zpool_detach_001_neg atf_add_test_case zpool_export_001_neg atf_add_test_case zpool_get_001_neg atf_add_test_case zpool_history_001_neg atf_add_test_case zpool_import_001_neg atf_add_test_case zpool_import_002_neg atf_add_test_case zpool_offline_001_neg atf_add_test_case zpool_online_001_neg atf_add_test_case zpool_remove_001_neg atf_add_test_case zpool_replace_001_neg atf_add_test_case zpool_scrub_001_neg atf_add_test_case zpool_set_001_neg atf_add_test_case zpool_status_001_neg atf_add_test_case zpool_upgrade_001_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zfs_list/zfs_list_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zfs_list/zfs_list_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zfs_list/zfs_list_test.sh (revision 323033) @@ -1,264 +1,248 @@ # 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_list_001_pos cleanup zfs_list_001_pos_head() { atf_set "descr" "Verify 'zfs list [-rH] [-o property[,prop]*] [fs|clct|vol]'." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_001_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_002_pos cleanup zfs_list_002_pos_head() { atf_set "descr" "The sort functionality in 'zfs list' works as expected." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_002_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_003_pos cleanup zfs_list_003_pos_head() { atf_set "descr" "Verify 'zfs list -r' could display any children recursively." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_003_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_004_neg cleanup zfs_list_004_neg_head() { atf_set "descr" "Verify 'zfs list [-r]' should fail while the givendataset/path does not exist or not belong to zfs." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_004_neg.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_005_pos cleanup zfs_list_005_pos_head() { atf_set "descr" "Verify 'zfs list' evaluate multiple '-s' optionsfrom left to right in decreasing order of importance." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_005_pos_body() { - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") atf_skip "Despite running as an unpriveleged user, this test attempts to set ZFS properties. It should probably be moved to cli_root" . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_005_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_006_pos cleanup zfs_list_006_pos_head() { atf_set "descr" "Verify 'zfs list' exclude list of snapshot." atf_set "require.progs" zfs zpool atf_set "require.user" root } zfs_list_006_pos_body() { - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") atf_skip "Despite running as an unpriveleged user, this test attempts to set ZFS properties. It should probably be moved to cli_root" . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_006_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_007_pos cleanup zfs_list_007_pos_head() { atf_set "descr" "'zfs list -d ' should get expected output." atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_007_pos.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_list_008_neg cleanup zfs_list_008_neg_head() { atf_set "descr" "A negative depth or a non numeric depth should fail in 'zfs list -d '" atf_set "require.progs" zfs atf_set "require.user" root } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zfs_list_008_neg.ksh" || atf_fail "Testcase failed" } zfs_list_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)/zfs_list.kshlib . $(atf_get_srcdir)/zfs_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zfs_list_001_pos atf_add_test_case zfs_list_002_pos atf_add_test_case zfs_list_003_pos atf_add_test_case zfs_list_004_neg atf_add_test_case zfs_list_005_pos atf_add_test_case zfs_list_006_pos atf_add_test_case zfs_list_007_pos atf_add_test_case zfs_list_008_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/zpool_iostat_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/zpool_iostat_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_iostat/zpool_iostat_test.sh (revision 323033) @@ -1,111 +1,105 @@ # 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_iostat_001_neg cleanup zpool_iostat_001_neg_head() { atf_set "descr" "zpool iostat [pool_name ...] [interval]" atf_set "require.progs" zpool atf_set "require.user" root } zpool_iostat_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)/zpool_iostat.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_iostat_001_neg.ksh" || atf_fail "Testcase failed" } zpool_iostat_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)/zpool_iostat.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_iostat_002_pos cleanup zpool_iostat_002_pos_head() { atf_set "descr" "zpool iostat [pool_name ...] [interval] [count]" atf_set "require.progs" zpool atf_set "require.user" root } zpool_iostat_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_iostat.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_iostat_002_pos.ksh" || atf_fail "Testcase failed" } zpool_iostat_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_iostat.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_iostat_003_neg cleanup zpool_iostat_003_neg_head() { atf_set "descr" "Executing 'zpool iostat' with bad options fails" atf_set "require.progs" zpool atf_set "require.user" root } zpool_iostat_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)/zpool_iostat.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_iostat_003_neg.ksh" || atf_fail "Testcase failed" } zpool_iostat_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)/zpool_iostat.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_iostat_001_neg atf_add_test_case zpool_iostat_002_pos atf_add_test_case zpool_iostat_003_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh (revision 323033) @@ -1,86 +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 zpool_list_001_pos cleanup zpool_list_001_pos_head() { atf_set "descr" "zpool list [-H] [-o filed[,filed]*] [ ...]" atf_set "require.progs" zpool atf_set "require.user" root } zpool_list_001_pos_body() { - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") atf_expect_fail 'BUG26173: zpool man page and STF tests were never updated for removal of "used" property' . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_list_001_pos.ksh" || atf_fail "Testcase failed" } zpool_list_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_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zpool_list_002_neg cleanup zpool_list_002_neg_head() { atf_set "descr" "Executing 'zpool list' with bad options fails" atf_set "require.progs" zpool atf_set "require.user" root } zpool_list_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)/zpool_list.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" su -m `atf_config_get unprivileged_user` -c "ksh93 $(atf_get_srcdir)/zpool_list_002_neg.ksh" || atf_fail "Testcase failed" } zpool_list_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)/zpool_list.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_list_001_pos atf_add_test_case zpool_list_002_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/compression/compression_test.sh (revision 323033) @@ -1,111 +1,105 @@ # 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.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.progs" zfs } 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/ctime/ctime_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_allow/zfs_allow_test.sh (revision 323033) @@ -1,366 +1,342 @@ # 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.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/delegate/zfs_unallow/zfs_unallow_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_unallow/zfs_unallow_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/delegate/zfs_unallow/zfs_unallow_test.sh (revision 323033) @@ -1,254 +1,238 @@ # 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_unallow_001_pos cleanup zfs_unallow_001_pos_head() { atf_set "descr" "Verify '-l' only removed the local permissions." atf_set "require.progs" zfs svcs } zfs_unallow_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_unallow_001_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_002_pos cleanup zfs_unallow_002_pos_head() { atf_set "descr" "Verify '-d' only removed the descendent permissions." atf_set "require.progs" zfs svcs } zfs_unallow_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_unallow_002_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_003_pos cleanup zfs_unallow_003_pos_head() { atf_set "descr" "Verify options '-r' and '-l'+'-d' will unallow permission tothis dataset and the descendent datasets." atf_set "require.progs" zfs svcs } zfs_unallow_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_unallow_003_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_004_pos cleanup zfs_unallow_004_pos_head() { atf_set "descr" "Verify '-s' will remove permissions from the named set." atf_set "require.progs" zfs svcs } zfs_unallow_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_unallow_004_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_005_pos cleanup zfs_unallow_005_pos_head() { atf_set "descr" "Verify option '-c' will remove the created permission set." atf_set "require.progs" zfs svcs runwattr } zfs_unallow_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_unallow_005_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_006_pos cleanup zfs_unallow_006_pos_head() { atf_set "descr" "Verify option '-u', '-g' and '-e' only removed the specified typepermissions set." atf_set "require.progs" zfs svcs } zfs_unallow_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_unallow_006_pos.ksh || atf_fail "Testcase failed" } zfs_unallow_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_unallow_007_neg cleanup zfs_unallow_007_neg_head() { atf_set "descr" "zfs unallow won't remove those permissions which inherited fromits parent dataset." atf_set "require.progs" zfs svcs } zfs_unallow_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)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unallow_007_neg.ksh || atf_fail "Testcase failed" } zfs_unallow_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)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zfs_unallow_008_neg cleanup zfs_unallow_008_neg_head() { atf_set "descr" "zfs unallow can handle invalid arguments." atf_set "require.progs" zfs svcs runwattr } zfs_unallow_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)/../delegate_common.kshlib . $(atf_get_srcdir)/../delegate.cfg ksh93 $(atf_get_srcdir)/../setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zfs_unallow_008_neg.ksh || atf_fail "Testcase failed" } zfs_unallow_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)/../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_unallow_001_pos atf_add_test_case zfs_unallow_002_pos atf_add_test_case zfs_unallow_003_pos atf_add_test_case zfs_unallow_004_pos atf_add_test_case zfs_unallow_005_pos atf_add_test_case zfs_unallow_006_pos atf_add_test_case zfs_unallow_007_neg atf_add_test_case zfs_unallow_008_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/devices/devices_test.sh (revision 323033) @@ -1,115 +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 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.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.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." } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/exec/exec_test.sh (revision 323033) @@ -1,81 +1,77 @@ # 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_pool/grow_pool_test.sh (revision 323033) @@ -1,57 +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 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/grow_replicas/grow_replicas_test.sh (revision 323033) @@ -1,57 +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 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/history/history_test.sh (revision 323033) @@ -1,309 +1,290 @@ # 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.progs" 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.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.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.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.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.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.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.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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotplug/hotplug_test.sh (revision 323033) @@ -1,349 +1,327 @@ # 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/hotspare/hotspare_test.sh (revision 323033) @@ -1,846 +1,790 @@ # 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 "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.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" 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" 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.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.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" 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.progs" 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.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.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.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.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.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.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.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.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.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.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.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.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.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.progs" 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.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.progs" 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.progs" 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" 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/inheritance/inheritance_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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 "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/interop/interop_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/interop/interop_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/interop/interop_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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 interop_001_pos cleanup interop_001_pos_head() { atf_set "descr" "Create a SVM device and add this to an existing ZFS pool" atf_set "require.progs" metadb zfs metaclear metastat metainit zpool } interop_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)/interop.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/interop_001_pos.ksh || atf_fail "Testcase failed" } interop_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)/interop.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case interop_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/inuse/inuse_test.sh (revision 323033) @@ -1,210 +1,201 @@ # 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.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.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.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.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 "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.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.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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/iscsi/iscsi_test.sh (revision 323033) @@ -1,198 +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 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.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.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.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.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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/large_files/large_files_test.sh (revision 323033) @@ -1,55 +1,53 @@ # 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." } 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/largest_pool/largest_pool_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/largest_pool/largest_pool_test.sh (revision 323033) @@ -1,57 +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 largest_pool_001_pos cleanup largest_pool_001_pos_head() { atf_set "descr" "The largest pool can be created and a dataset in thatpool can be created and mounted." atf_set "require.progs" zfs zpool isainfo atf_set "timeout" 1800 } largest_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)/largest_pool.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/largest_pool_001_pos.ksh || atf_fail "Testcase failed" } largest_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)/largest_pool.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case largest_pool_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/link_count/link_count_test.sh (revision 323033) @@ -1,55 +1,53 @@ # 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mdb/mdb_test.sh (revision 323033) @@ -1,57 +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 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/migration/migration_test.sh (revision 323033) @@ -1,366 +1,342 @@ # 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.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.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.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.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.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.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.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.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.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.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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_read/mmap_read_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mmap/mmap_write/mmap_write_test.sh (revision 323033) @@ -1,55 +1,53 @@ # 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." } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mount/mount_test.sh (revision 323033) @@ -1,86 +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 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/mv_files/mv_files_test.sh (revision 323033) @@ -1,88 +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 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/nestedfs/nestedfs_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/no_space/no_space_test.sh (revision 323033) @@ -1,57 +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 enospc_001_pos cleanup enospc_001_pos_head() { atf_set "descr" "ENOSPC is returned when file system is full." 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/online_offline/online_offline_test.sh (revision 323033) @@ -1,84 +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 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/pool_names/pool_names_test.sh (revision 323033) @@ -1,67 +1,65 @@ # 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/poolversion/poolversion_test.sh (revision 323033) @@ -1,80 +1,76 @@ # 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/privilege/privilege_test.sh (revision 323033) @@ -1,82 +1,78 @@ # 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/quota/quota_test.sh (revision 323033) @@ -1,198 +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 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.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.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.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.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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/redundancy/redundancy_test.sh (revision 323033) @@ -1,143 +1,135 @@ # 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 "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 "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 "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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/refquota/refquota_test.sh (revision 323033) @@ -1,186 +1,174 @@ # 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/refreserv/refreserv_test.sh (revision 323033) @@ -1,162 +1,152 @@ # 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.progs" zfs } 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.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.progs" zfs } 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.progs" zfs } 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.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/remote/cross_endian/cross_endian_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/cross_endian/cross_endian_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/cross_endian/cross_endian_test.sh (revision 323033) @@ -1,86 +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 cross_endian_001_pos cleanup cross_endian_001_pos_head() { atf_set "descr" "Verify any storage pools can be moved between any architecturesystems." atf_set "require.progs" zpool rsh zfs rcp } cross_endian_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)/cross_endian_common.kshlib . $(atf_get_srcdir)/cross_endian.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cross_endian_001_pos.ksh || atf_fail "Testcase failed" } cross_endian_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)/cross_endian_common.kshlib . $(atf_get_srcdir)/cross_endian.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case cross_endian_002_pos cleanup cross_endian_002_pos_head() { atf_set "descr" "Verify any storage pools can be moved between any architecturesystems." atf_set "require.progs" zfs rcp rsh zpool } cross_endian_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)/cross_endian_common.kshlib . $(atf_get_srcdir)/cross_endian.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/cross_endian_002_pos.ksh || atf_fail "Testcase failed" } cross_endian_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)/cross_endian_common.kshlib . $(atf_get_srcdir)/cross_endian.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case cross_endian_001_pos atf_add_test_case cross_endian_002_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/rebooting/rebooting_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/rebooting/rebooting_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/rebooting/rebooting_test.sh (revision 323033) @@ -1,57 +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 rebooting_001_pos cleanup rebooting_001_pos_head() { atf_set "descr" "Verify a system can be rebooted normally after mkdir/rm operations." atf_set "require.progs" rcp rsh atf_set "timeout" 2400 } rebooting_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)/rebooting.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rebooting_001_pos.ksh || atf_fail "Testcase failed" } rebooting_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)/rebooting.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case rebooting_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/sharing/sharing_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/sharing/sharing_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/remote/sharing/sharing_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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 sharing_001_pos cleanup sharing_001_pos_head() { atf_set "descr" "Verify .zfs support for NFS version 3 & 4, but not for version 2." atf_set "require.progs" rcp rsh } sharing_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)/sharing.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/sharing_001_pos.ksh || atf_fail "Testcase failed" } sharing_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)/sharing.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case sharing_001_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/rename_dirs/rename_dirs_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/rename_dirs/rename_dirs_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/rename_dirs/rename_dirs_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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 rename_dirs_001_pos cleanup rename_dirs_001_pos_head() { atf_set "descr" "ZFS can handle race directory rename operation." atf_set "timeout" 1200 } rename_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)/rename_dirs.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rename_dirs_001_pos.ksh || atf_fail "Testcase failed" } rename_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)/rename_dirs.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case rename_dirs_001_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/replacement/replacement_test.sh (revision 323033) @@ -1,104 +1,98 @@ # 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" 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/reservation/reservation_test.sh (revision 323033) @@ -1,540 +1,504 @@ # 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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/rootpool/rootpool_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/rootpool/rootpool_test.sh (revision 323033) @@ -1,201 +1,187 @@ # 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 rootpool_001_pos cleanup rootpool_001_pos_head() { atf_set "descr" "rootpool's bootfs property must be equal to " atf_set "require.config" is_zfs_root } rootpool_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)/rootpool_001_pos.ksh || atf_fail "Testcase failed" } rootpool_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 rootpool_002_neg cleanup rootpool_002_neg_head() { atf_set "descr" "zpool/zfs destory should return error" atf_set "require.config" is_zfs_root atf_set "require.progs" zfs zpool } rootpool_002_neg_body() { atf_expect_fail "Destroying the root pool will panic FreeBSD BUG25145" atf_fail "Prematurely fail the test so we don't cause a panic" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/rootpool_002_neg.ksh || atf_fail "Testcase failed" } rootpool_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_test_case rootpool_003_neg cleanup rootpool_003_neg_head() { atf_set "descr" "system related filesytems can not be renamed or destroyed" atf_set "require.config" is_zfs_root atf_set "require.progs" zfs } rootpool_003_neg_body() { atf_expect_fail "Destroying the root pool will panic FreeBSD BUG25145" atf_fail "Prematurely fail the test so we don't cause a panic" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/rootpool_003_neg.ksh || atf_fail "Testcase failed" } rootpool_003_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_test_case rootpool_004_pos cleanup rootpool_004_pos_head() { atf_set "descr" "rootfs's canmount property must be noauto" atf_set "require.config" is_zfs_root } rootpool_004_pos_body() { atf_skip "The expected behavior of this test does not match the behavior of Illumos. Illumos and FreeBSD behave identically in this regard, so the test is probably wrong" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/rootpool_004_pos.ksh || atf_fail "Testcase failed" } rootpool_004_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 rootpool_005_pos cleanup rootpool_005_pos_head() { atf_set "descr" "rootpool/ROOT's mountpoint must be legacy" atf_set "require.config" is_zfs_root } rootpool_005_pos_body() { atf_skip "FreeBSD does not place any special requirements on /ROOT" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/rootpool_005_pos.ksh || atf_fail "Testcase failed" } rootpool_005_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 rootpool_006_pos cleanup rootpool_006_pos_head() { atf_set "descr" "zfs rootfs's mountpoint must be mounted and must be /" atf_set "require.config" is_zfs_root } rootpool_006_pos_body() { atf_skip "The expected behavior of this test does not match the behavior of Illumos. Illumos and FreeBSD behave identically in this regard, so the test is probably wrong" - export TESTCASE_ID=$(echo $(atf_get ident) | cksum -o 2 | cut -f 1 -d " ") . $(atf_get_srcdir)/../../include/default.cfg ksh93 $(atf_get_srcdir)/rootpool_006_pos.ksh || atf_fail "Testcase failed" } rootpool_006_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 rootpool_007_neg cleanup rootpool_007_neg_head() { atf_set "descr" "the zfs rootfs's compression property can not set to gzip and gzip[1-9]" atf_set "require.config" is_zfs_root atf_set "require.progs" zfs } rootpool_007_neg_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)/rootpool_007_neg.ksh || atf_fail "Testcase failed" } rootpool_007_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 rootpool_001_pos atf_add_test_case rootpool_002_neg atf_add_test_case rootpool_003_neg atf_add_test_case rootpool_004_pos atf_add_test_case rootpool_005_pos atf_add_test_case rootpool_006_pos atf_add_test_case rootpool_007_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/rsend/rsend_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/rsend/rsend_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/rsend/rsend_test.sh (revision 323033) @@ -1,420 +1,394 @@ # 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 rsend_001_pos cleanup rsend_001_pos_head() { atf_set "descr" "zfs send -R send replication stream up to the named snap." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_001_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_002_pos cleanup rsend_002_pos_head() { atf_set "descr" "zfs send -I sends all incrementals from fs@init to fs@final." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_002_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_003_pos cleanup rsend_003_pos_head() { atf_set "descr" "zfs send -I send all incrementals from dataset@init to clone@snap" atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_003_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_004_pos cleanup rsend_004_pos_head() { atf_set "descr" "zfs send -R -i send incremental from fs@init to fs@final." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_004_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_005_pos cleanup rsend_005_pos_head() { atf_set "descr" "zfs send -R -I send all the incremental between @init with @final" atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_005_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_006_pos cleanup rsend_006_pos_head() { atf_set "descr" "Rename snapshot name will not change the dependent order." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_006_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_007_pos cleanup rsend_007_pos_head() { atf_set "descr" "Rename parent filesystem name will not change the dependent order." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_007_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_008_pos cleanup rsend_008_pos_head() { atf_set "descr" "Changes made by 'zfs promote' can be properly received." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_008_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_009_pos cleanup rsend_009_pos_head() { atf_set "descr" "Verify zfs receive can handle out of space correctly." atf_set "require.config" at_least_2_disks atf_set "require.progs" zpool zfs atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_009_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_010_pos cleanup rsend_010_pos_head() { atf_set "descr" "ZFS can handle stream with multiple identical (same GUID) snapshots" atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_010_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_011_pos cleanup rsend_011_pos_head() { atf_set "descr" "Verify changes made by 'zfs inherit' can be properly received." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_011_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_012_pos cleanup rsend_012_pos_head() { atf_set "descr" "Verify zfs send -R will backup all the filesystem propertiescorrectly." atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_012_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case rsend_013_pos cleanup rsend_013_pos_head() { atf_set "descr" "zfs receive -dF will destroy all the dataset that not existon the sender side" atf_set "require.config" at_least_2_disks atf_set "require.progs" zfs zpool atf_set "timeout" 2700 } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/rsend_013_pos.ksh || atf_fail "Testcase failed" } rsend_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)/rsend.kshlib . $(atf_get_srcdir)/rsend.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case rsend_001_pos atf_add_test_case rsend_002_pos atf_add_test_case rsend_003_pos atf_add_test_case rsend_004_pos atf_add_test_case rsend_005_pos atf_add_test_case rsend_006_pos atf_add_test_case rsend_007_pos atf_add_test_case rsend_008_pos atf_add_test_case rsend_009_pos atf_add_test_case rsend_010_pos atf_add_test_case rsend_011_pos atf_add_test_case rsend_012_pos atf_add_test_case rsend_013_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/sas_phy_thrash/sas_phy_thrash_test.sh (revision 323033) @@ -1,57 +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 sas_phy_thrash_001_pos cleanup sas_phy_thrash_001_pos_head() { atf_set "descr" "" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/scrub_mirror/scrub_mirror_test.sh (revision 323033) @@ -1,146 +1,138 @@ # 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" 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" 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/slog/slog_test.sh (revision 323033) @@ -1,437 +1,409 @@ # 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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.progs" 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" 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" 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/snapshot/snapshot_test.sh (revision 323033) @@ -1,657 +1,609 @@ # 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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.progs" zfs } 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.progs" zfs } 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.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.progs" zfs } 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.progs" zfs 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/snapused/snapused_test.sh (revision 323033) @@ -1,170 +1,160 @@ # 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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.progs" zfs } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/sparse/sparse_test.sh (revision 323033) @@ -1,57 +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 sparse_001_pos cleanup sparse_001_pos_head() { atf_set "descr" "Ensure random blocks are read back correctly" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/threadsappend/threadsappend_test.sh (revision 323033) @@ -1,56 +1,54 @@ # 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" } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/truncate/truncate_test.sh (revision 323033) @@ -1,83 +1,79 @@ # 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.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 "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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity_test.sh (revision 323033) @@ -1,115 +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 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 "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 "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/userquota/userquota_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/userquota/userquota_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/userquota/userquota_test.sh (revision 323033) @@ -1,478 +1,446 @@ # 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 groupspace_001_pos cleanup groupspace_001_pos_head() { atf_set "descr" "Check the zfs groupspace with all possible parameters" atf_set "require.progs" zfs runwattr } groupspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/groupspace_001_pos.ksh || atf_fail "Testcase failed" } groupspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case groupspace_002_pos cleanup groupspace_002_pos_head() { atf_set "descr" "Check the zfs groupspace used and quota" atf_set "require.progs" zfs runwattr } groupspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/groupspace_002_pos.ksh || atf_fail "Testcase failed" } groupspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_001_pos cleanup userquota_001_pos_head() { atf_set "descr" "If write operation overwrite {user|group}quota size, it will fail" atf_set "require.progs" zfs runwattr } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_001_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_002_pos cleanup userquota_002_pos_head() { atf_set "descr" "the userquota and groupquota can be set during zpool,zfs creation" atf_set "require.progs" zpool zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_002_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_003_pos cleanup userquota_003_pos_head() { atf_set "descr" "Check the basic function of set/get userquota and groupquota on fs" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_003_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_004_pos cleanup userquota_004_pos_head() { atf_set "descr" "Check the basic function of {user|group} used" atf_set "require.progs" runwattr } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_004_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_005_neg cleanup userquota_005_neg_head() { atf_set "descr" "Check the invalid parameter of zfs set user|group quota" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_005_neg.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_006_pos cleanup userquota_006_pos_head() { atf_set "descr" "Check the invalid parameter of zfs get user|group quota" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_006_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_007_pos cleanup userquota_007_pos_head() { atf_set "descr" "Check set user|group quota to larger than the quota size of a fs" atf_set "require.progs" zfs runwattr } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_007_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_008_pos cleanup userquota_008_pos_head() { atf_set "descr" "Check zfs get all will not print out user|group quota" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_008_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_009_pos cleanup userquota_009_pos_head() { atf_set "descr" "Check the snapshot's user|group quota" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_009_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_010_pos cleanup userquota_010_pos_head() { atf_set "descr" "overwrite any of the {user|group}quota size, it will fail" atf_set "require.progs" zfs runwattr } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_010_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_011_pos cleanup userquota_011_pos_head() { atf_set "descr" "the userquota and groupquota can't change during zfs actions" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_011_pos.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userquota_012_neg cleanup userquota_012_neg_head() { atf_set "descr" "Check set userquota and groupquota on snapshot" atf_set "require.progs" zfs } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userquota_012_neg.ksh || atf_fail "Testcase failed" } userquota_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userspace_001_pos cleanup userspace_001_pos_head() { atf_set "descr" "Check the zfs userspace with all possible parameters" atf_set "require.progs" zfs runwattr } userspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userspace_001_pos.ksh || atf_fail "Testcase failed" } userspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case userspace_002_pos cleanup userspace_002_pos_head() { atf_set "descr" "Check the zfs userspace used and quota" atf_set "require.progs" zfs runwattr } userspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/userspace_002_pos.ksh || atf_fail "Testcase failed" } userspace_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)/userquota_common.kshlib . $(atf_get_srcdir)/userquota.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case groupspace_001_pos atf_add_test_case groupspace_002_pos atf_add_test_case userquota_001_pos atf_add_test_case userquota_002_pos atf_add_test_case userquota_003_pos atf_add_test_case userquota_004_pos atf_add_test_case userquota_005_neg atf_add_test_case userquota_006_pos atf_add_test_case userquota_007_pos atf_add_test_case userquota_008_pos atf_add_test_case userquota_009_pos atf_add_test_case userquota_010_pos atf_add_test_case userquota_011_pos atf_add_test_case userquota_012_neg atf_add_test_case userspace_001_pos atf_add_test_case userspace_002_pos } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/utils_test/utils_test_test.sh (revision 323033) @@ -1,284 +1,268 @@ # 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.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.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.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.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.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.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" 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/write_dirs/write_dirs_test.sh (revision 323033) @@ -1,86 +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 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" 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" 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/xattr/xattr_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/xattr/xattr_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/xattr/xattr_test.sh (revision 323033) @@ -1,394 +1,368 @@ # 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 xattr_001_pos cleanup xattr_001_pos_head() { atf_set "descr" "Create/read/write/append of xattrs works" atf_set "require.progs" svcadm svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_001_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_002_neg cleanup xattr_002_neg_head() { atf_set "descr" "A read of a non-existent xattr fails" atf_set "require.progs" svcadm svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_002_neg.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_003_neg cleanup xattr_003_neg_head() { atf_set "descr" "read/write xattr on a file with no permissions fails" atf_set "require.progs" svcs svcadm runat runwattr } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_003_neg.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_004_pos cleanup xattr_004_pos_head() { atf_set "descr" "Files from ufs,tmpfs with xattrs copied to zfs retain xattr info." atf_set "require.progs" zfs svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_004_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_005_pos cleanup xattr_005_pos_head() { atf_set "descr" "read/write/create/delete xattr on a clone filesystem" atf_set "require.progs" zfs svcadm svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_005_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_006_pos cleanup xattr_006_pos_head() { atf_set "descr" "read xattr on a snapshot" atf_set "require.progs" zfs svcadm svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_006_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_007_neg cleanup xattr_007_neg_head() { atf_set "descr" "create/write xattr on a snapshot fails" atf_set "require.progs" zfs svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_007_neg.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_008_pos cleanup xattr_008_pos_head() { atf_set "descr" "special . and .. dirs work as expected for xattrs" atf_set "require.progs" svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_008_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_009_neg cleanup xattr_009_neg_head() { atf_set "descr" "links between xattr and normal file namespace fail" atf_set "require.progs" svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_009_neg.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_010_neg cleanup xattr_010_neg_head() { atf_set "descr" "mkdir, mknod fail" atf_set "require.progs" svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_010_neg.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_011_pos cleanup xattr_011_pos_head() { atf_set "descr" "Basic applications work with xattrs: cpio cp find mv pax tar" atf_set "require.progs" pax svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_011_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_012_pos cleanup xattr_012_pos_head() { atf_set "descr" "xattr file sizes count towards normal disk usage" atf_set "require.progs" svcadm zfs runat zpool svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_012_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case xattr_013_pos cleanup xattr_013_pos_head() { atf_set "descr" "The noxattr mount option functions as expected" atf_set "require.progs" zfs svcadm runat svcs } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/xattr_013_pos.ksh || atf_fail "Testcase failed" } xattr_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)/xattr_common.kshlib . $(atf_get_srcdir)/xattr.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case xattr_001_pos atf_add_test_case xattr_002_neg atf_add_test_case xattr_003_neg atf_add_test_case xattr_004_pos atf_add_test_case xattr_005_pos atf_add_test_case xattr_006_pos atf_add_test_case xattr_007_neg atf_add_test_case xattr_008_pos atf_add_test_case xattr_009_neg atf_add_test_case xattr_010_neg atf_add_test_case xattr_011_pos atf_add_test_case xattr_012_pos atf_add_test_case xattr_013_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh (revision 323033) @@ -1,591 +1,557 @@ # 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" 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" at_least_2_disks atf_set "require.progs" 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" at_least_3_disks atf_set "require.progs" 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.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.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" 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" 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.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.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" 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" 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" 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" 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" 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" 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" 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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zil/zil_test.sh (revision 323033) @@ -1,87 +1,85 @@ # 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.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.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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zinject/zinject_test.sh (revision 323033) @@ -1,150 +1,142 @@ # 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" 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" 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" 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" 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zones/zones_test.sh (revision 323033) @@ -1,175 +1,165 @@ # 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.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.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.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.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.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_ENOSPC/zvol_ENOSPC_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_ENOSPC/zvol_ENOSPC_test.sh (revision 323033) @@ -1,55 +1,53 @@ # 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_ENOSPC_001_pos cleanup zvol_ENOSPC_001_pos_head() { atf_set "descr" "A zvol volume will return ENOSPC when the underlying poolruns out of space." } zvol_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)/zvol_ENOSPC.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_ENOSPC_001_pos.ksh || atf_fail "Testcase failed" } zvol_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)/zvol_ENOSPC.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zvol_ENOSPC_001_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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_cli/zvol_cli_test.sh (revision 323033) @@ -1,109 +1,103 @@ # 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.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.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.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/zvol_misc/zvol_misc_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_misc/zvol_misc_test.sh (revision 323033) @@ -1,276 +1,258 @@ # 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_misc_001_neg cleanup zvol_misc_001_neg_head() { atf_set "descr" "Verify that ZFS volume cannot act as dump device until dumpswap supported." atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_001_neg.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_002_pos cleanup zvol_misc_002_pos_head() { atf_set "descr" "Verify that ZFS volume snapshot could be fscked" atf_set "require.config" disks_are_physical atf_set "require.progs" zfs } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_002_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_003_neg cleanup zvol_misc_003_neg_head() { atf_set "descr" "Verify create storage pool or newfs over dump volume is denied." atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm zpool } zvol_misc_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_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_003_neg.ksh || atf_fail "Testcase failed" } zvol_misc_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_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_004_pos cleanup zvol_misc_004_pos_head() { atf_set "descr" "Verify permit to create snapshot over dumpswap." atf_set "require.config" disks_are_physical atf_set "require.progs" zfs swap } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_004_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_005_neg cleanup zvol_misc_005_neg_head() { atf_set "descr" "Verify a device cannot be dump and swap at the same time." atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm swap } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_005_neg.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_006_pos cleanup zvol_misc_006_pos_head() { atf_set "descr" "zfs volume as dumpdevice should have 128k volblocksize" atf_set "require.config" disks_are_physical atf_set "require.progs" dumpadm zfs } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_006_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_007_pos cleanup zvol_misc_007_pos_head() { atf_set "descr" "zfs volume device nodes are modified appropriately" atf_set "require.config" disks_are_physical atf_set "require.progs" zfs atf_set "timeout" 1200 } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_007_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_008_pos cleanup zvol_misc_008_pos_head() { atf_set "descr" "zfs volume device nodes are modified appropriately" atf_set "require.config" disks_are_physical atf_set "require.progs" zfs atf_set "timeout" 1200 } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_008_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_misc_009_pos cleanup zvol_misc_009_pos_head() { atf_set "descr" "zfs volume device nodes are modified appropriately" atf_set "require.config" disks_are_physical atf_set "require.progs" zfs atf_set "timeout" 1200 } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_misc_009_pos.ksh || atf_fail "Testcase failed" } zvol_misc_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)/zvol_misc.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zvol_misc_001_neg atf_add_test_case zvol_misc_002_pos atf_add_test_case zvol_misc_003_neg atf_add_test_case zvol_misc_004_pos atf_add_test_case zvol_misc_005_neg atf_add_test_case zvol_misc_006_pos atf_add_test_case zvol_misc_007_pos atf_add_test_case zvol_misc_008_pos atf_add_test_case zvol_misc_009_pos } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_test.sh (revision 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol/zvol_swap/zvol_swap_test.sh (revision 323033) @@ -1,186 +1,174 @@ # 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_swap_001_pos cleanup zvol_swap_001_pos_head() { atf_set "descr" "Verify that a zvol can be used as a swap device" atf_set "require.progs" swap swapadd } zvol_swap_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_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_001_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_swap_002_pos cleanup zvol_swap_002_pos_head() { atf_set "descr" "Using a zvol as swap space, fill with files until ENOSPC returned." atf_set "require.progs" swap swapadd } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_002_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_swap_003_pos cleanup zvol_swap_003_pos_head() { atf_set "descr" "Verify that a zvol device can be used as a swap devicethrough /etc/vfstab configuration." atf_set "require.progs" swapadd swap } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_003_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_swap_004_pos cleanup zvol_swap_004_pos_head() { atf_set "descr" "The minimum volume size should be a multiple of 2 pagesize bytes." atf_set "require.progs" zfs swap pagesize swapadd } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_004_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_swap_005_pos cleanup zvol_swap_005_pos_head() { atf_set "descr" "swaplow + swaplen must be less than or equal to the volume size." atf_set "require.progs" swap pagesize swapadd } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_005_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_test_case zvol_swap_006_pos cleanup zvol_swap_006_pos_head() { atf_set "descr" "Verify volume can be add as several segments, but overlappingare not allowed." atf_set "require.progs" swap pagesize swapadd } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zvol_swap_006_pos.ksh || atf_fail "Testcase failed" } zvol_swap_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)/zvol_swap.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zvol_swap_001_pos atf_add_test_case zvol_swap_002_pos atf_add_test_case zvol_swap_003_pos atf_add_test_case zvol_swap_004_pos atf_add_test_case zvol_swap_005_pos atf_add_test_case zvol_swap_006_pos } 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 323032) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_test.sh (revision 323033) @@ -1,57 +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 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.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 }