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 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_create/zfs_create_test.sh (revision 323249) @@ -1,396 +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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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' + atf_expect_fail 'kern/221987 - ZFS does not validate the sharenfs parameter' . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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" . $(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() { . $(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_get/zfs_get_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_get/zfs_get_test.sh (revision 323249) @@ -1,312 +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() { . $(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() { . $(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() { . $(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() { . $(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" + atf_expect_fail "kern/221985 - zfs mount -o remount is broken" . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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_mount/zfs_mount_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_mount/zfs_mount_test.sh (revision 323249) @@ -1,354 +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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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" . $(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() { . $(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" . $(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() { . $(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" + atf_expect_fail "kern/221985 - zfs mount -o remount is broken" . $(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() { . $(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" . $(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() { . $(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() { . $(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() { . $(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" . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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/zpool_create/zpool_create_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_create/zpool_create_test.sh (revision 323249) @@ -1,677 +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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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" . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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' + atf_expect_fail 'kern/221987 - ZFS does not validate the sharenfs parameter' . $(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() { . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_create.kshlib . $(atf_get_srcdir)/zpool_create.cfg ksh93 $(atf_get_srcdir)/cleanup.ksh || atf_fail "Cleanup failed" } atf_init_test_cases() { atf_add_test_case zpool_create_001_pos atf_add_test_case zpool_create_002_pos atf_add_test_case zpool_create_003_pos atf_add_test_case zpool_create_004_pos atf_add_test_case zpool_create_005_pos atf_add_test_case zpool_create_006_pos atf_add_test_case zpool_create_007_neg atf_add_test_case zpool_create_008_pos atf_add_test_case zpool_create_009_neg atf_add_test_case zpool_create_010_neg atf_add_test_case zpool_create_011_neg atf_add_test_case zpool_create_012_neg atf_add_test_case zpool_create_013_neg atf_add_test_case zpool_create_014_neg atf_add_test_case zpool_create_015_neg atf_add_test_case zpool_create_016_pos atf_add_test_case zpool_create_017_neg atf_add_test_case zpool_create_018_pos atf_add_test_case zpool_create_019_pos atf_add_test_case zpool_create_020_pos atf_add_test_case zpool_create_021_pos atf_add_test_case zpool_create_022_pos atf_add_test_case zpool_create_023_neg } Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_missing_004_pos.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_missing_004_pos.ksh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_import/zpool_import_missing_004_pos.ksh (revision 323249) @@ -1,100 +1,99 @@ #!/usr/local/bin/ksh93 -p # # 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 2013 Spectra Logic Corp. All rights reserved. # Use is subject to license terms. # # . $STF_SUITE/include/libtest.kshlib ################################################################################ # # __stc_assertion_start # # ID: zpool_import_missing_004_pos # # DESCRIPTION: # Once a pool has been exported and one or more devices are missing # "zpool import" with no pool argument should exit with error code 0. -# This is a regression test for Spectra Logic BUG27046. # # STRATEGY: # 1. Create test pool upon device files using the various combinations. # - Striped pool # - Mirror # - Raidz # 2. Export the test pool. # 3. Remove one or more devices # 4. Verify 'zpool import' will handle missing devices successfully. # # TESTABILITY: explicit # # TEST_AUTOMATION_LEVEL: automated # # CODING_STATUS: COMPLETED (2013-07-02) # # __stc_assertion_end # ################################################################################ verify_runnable "global" set -A vdevs "mirror" "raidz" "" function cleanup { destroy_pool $TESTPOOL1 log_must $RM -rf $DEVICE_DIR/* } function recreate_files { cleanup typeset -i i=0 for (( ; $i < $GROUP_NUM; i += 1 )); do log_must create_vdevs ${DEVICE_DIR}/${DEVICE_FILE}$i done log_must $SYNC } log_onexit cleanup log_assert "Verify that zpool import succeeds when devices are missing" typeset rootvdev typeset option log_must $MKDIR -p $DEVICE_DIR for rootvdev in "${vdevs[@]}"; do recreate_files poolexists $TESTPOOL1 || \ create_pool $TESTPOOL1 "${rootvdev}" $DEVICE_FILES # Remove all devices but the last, one at a time for device in ${DEVICE_FILES% *} ; do poolexists $TESTPOOL1 && log_must $ZPOOL export $TESTPOOL1 log_must $RM -f $device log_must $ZPOOL import -d $DEVICE_DIR done done log_pass "zpool import succeeded when devices were missing" Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/setup.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/setup.ksh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/setup.ksh (revision 323249) @@ -1,47 +1,47 @@ #!/usr/local/bin/ksh93 -p # # 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 2011 Spectra Logic. All rights reserved. # Use is subject to license terms. # # ident "@(#)setup.ksh 1.0 10/20/11 SL" # . ${STF_SUITE}/include/libtest.kshlib # For this test, we create an MD instead of using the defined DISKS. -# BUG25451 reproduces much more quickly on an MD +# Data corrupts much more quickly on an MD. # Make it small enough that we can tar up the entire pool for post-mortem # analysis log_must $MDCONFIG -a -t swap -s 1g -u $TESTCASE_ID log_must create_pool $TESTPOOL $TESTDEV $RM -rf $TESTDIR $MKDIR -p $TESTDIR log_must $ZFS create $TESTPOOL/$TESTFS log_must $ZFS set mountpoint=$TESTDIR $TESTPOOL/$TESTFS log_pass 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 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/txg_integrity/txg_integrity_test.sh (revision 323249) @@ -1,111 +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 "descr" "Ensure that non-aligned writes to the same blocks that cross transaction groups do not corrupt the file." atf_set "timeout" 1800 } txg_integrity_001_pos_body() { export PATH=$(atf_get_srcdir):$PATH . $(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() { . $(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 . $(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() { . $(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/zfsd/zfsd_test.sh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zfsd/zfsd_test.sh (revision 323249) @@ -1,558 +1,558 @@ # 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.progs" zfs zpool zfsd atf_set "timeout" 300 } zfsd_fault_001_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 2 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() { . $(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.progs" zpool zfsd atf_set "timeout" 300 } zfsd_degrade_001_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 2 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() { . $(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.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" + atf_expect_fail "https://www.illumos.org/issues/8614 Checksum errors on a mirrored child of a raidz are incorrectly accounted" . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 5 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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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.progs" zpool zfsd zinject atf_set "timeout" 3600 } zfsd_hotspare_003_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_hotspare_004_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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() { . $(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() { . $(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() { . $(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() { . $(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.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_hotspare_007_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_001_neg_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_002_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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.progs" zpool camcontrol zfsd atf_set "timeout" 3600 } zfsd_autoreplace_003_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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.progs" zpool camcontrol zfsd zfs } zfsd_replace_001_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 2 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() { . $(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.progs" zpool camcontrol zfsd zfs } zfsd_replace_002_pos_body() { atf_expect_fail "ZFS hangs when an array becomes critical" . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 2 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() { . $(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.progs" zpool camcontrol zfsd zfs } zfsd_replace_003_pos_body() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/zfsd.cfg verify_disk_count "$DISKS" 3 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() { . $(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() { . $(atf_get_srcdir)/../../include/default.cfg . $(atf_get_srcdir)/../hotspare/hotspare.kshlib . $(atf_get_srcdir)/../hotspare/hotspare.cfg verify_disk_count "$DISKS" 5 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() { . $(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/zvol_thrash/zvol_thrash_001_pos.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_001_pos.ksh (revision 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_001_pos.ksh (revision 323249) @@ -1,179 +1,176 @@ #!/usr/local/bin/ksh93 # # Copyright (c) 2010 Spectra Logic Corporation # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions, and the following disclaimer, # without modification. # 2. Redistributions in binary form must reproduce at minimum a disclaimer # substantially similar to the "NO WARRANTY" disclaimer below # ("Disclaimer") and any redistribution must be conditioned upon # including a substantially similar Disclaimer requirement for further # binary redistribution. # # NO WARRANTY # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT # HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS # OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) # HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, # STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING # IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE # POSSIBILITY OF SUCH DAMAGES. # # $FreeBSD$ # . $STF_SUITE/include/libtest.kshlib . $STF_SUITE/include/libsas.kshlib typeset -i NUM_FAILURES=0 export NUM_FAILURES # Cleanup function. Kill each of the children, they will re-enable the PHY # they're working on. function docleanup { for CPID in $CHILDREN do echo "Killing $CPID" kill $CPID done for CPID in $CHILDREN do wait $CPID done } # If we get killed, try to re-enable the PHY we were toggling. function diskcleanup { log_note "Got a signal, sending linkreset to $EXPANDER phy $PHY" camcontrol smppc $EXPANDER -o linkreset -p $PHY exit 0 } # Wait for the timeout, and then kill the child processes. function disktimeout { log_note "disktimeout process waiting $1 seconds" sleep $1 docleanup } function mk_vols { ADISKS=($DISKS) #Create an array for convenience N_DISKS=${#ADISKS[@]} if test $N_DISKS -ge 8 then #Limit number of mirrors to 4. Using more causes a panic in #make_dev_credv that has nothing to do with ZFS or ZVols. #That will be addressed by a separate test N_MIRRORS=4 else N_MIRRORS=$(($N_DISKS / 2 )) fi setup_mirrors $N_MIRRORS $DISKS for pool in `all_pools`; do # Create 4 ZVols per pool. Write a geom label to each, just so # that we have another geom class between zvol and the vdev # taster. That thwarts detection of zvols based on a geom # producer's class name, as was attempted by change 538882 for ((j=0; $j<4; j=$j+1)); do $ZFS create -V 10G $pool/testvol.$j glabel label testlabel$j /dev/zvol/$pool/testvol.$j done done } export CHILDREN="" export FAILFILES="" export POOLS="" log_onexit docleanup typeset i=0 typeset -i num_disks_used=0 -log_assert "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" +log_assert "Cause frequent device removal and arrival in the prescence of zvols. ZFS should not misbehave while tasting them for VDev GUIDs." mk_vols for p in `all_pools` do disk=`get_disklist $p | cut -d " " -f 1` #Take the first disk in the pool # See if this disk is attached to a parent that supports SMP # XXX this only works with the current scheme where SMP commands get # sent to a device or its parent, if the device doesn't support SMP camcontrol smprg $disk > /dev/null 2>&1 if [ $? != 0 ]; then continue fi # Find the expander and PHY that this disk is attached to, if any. # We will exit from here if there is a failure. find_verify_sas_disk $disk typeset -i x=0 log_note "thrashing phy on $disk on $EXPANDER phy $PHY" export FAILFILE=$TMPDIR/${EXPANDER}.${PHY}.failed trap diskcleanup INT TERM && rm -f $FAILFILE && while `true`; do ((x=x+1)) camcontrol smppc $EXPANDER -v -o disable -p $PHY if [ $? != 0 ]; then log_note "Failed to disable $EXPANDER phy $PHY" echo "Expander $EXPANDER phy $PHY failed" >> $FAILFILE break fi $SLEEP 10 camcontrol smppc $EXPANDER -v -o linkreset -p $PHY if [ $? != 0 ]; then log_note "Failed to reset $EXPANDER phy $PHY" echo "Expander $EXPANDER phy $PHY failed" >> $FAILFILE break fi $SLEEP 10 done & CHILDREN="$CHILDREN $!" FAILFILES="$FAILFILES $FAILFILE" ((num_disks_used++)) done typeset -i sleep_time=$SAS_DEFAULT_TIME if [ $num_disks_used -gt 0 ]; then log_note "Tests queued on $num_disks_used disks" log_note "Waiting $sleep_time seconds for potential driver failure" disktimeout $sleep_time & wait for i in $FAILFILES; do typeset FILEBASE=${i%%.failed} FILEBASE=${FILEBASE##$TMPDIR/} if [ -f $i ]; then log_note "Test of $FILEBASE failed" ((NUM_FAILURES=NUM_FAILURES+1)) rm -f $i else log_note "Test of $FILEBASE passed" fi done if [ $NUM_FAILURES -gt 0 ]; then log_fail "Saw $NUM_FAILURES failures" else log_note "Number of failures: $NUM_FAILURES" log_pass fi else log_unsupported "No tests queued, no SMP-capable devices found" fi 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 323248) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/zvol_thrash/zvol_thrash_test.sh (revision 323249) @@ -1,55 +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 "descr" "Cause frequent device removal and arrival in the prescence of zvols. ZFS should not misbehave while tasting them for VDev GUIDs." atf_set "require.progs" zfs zpool camcontrol atf_set "timeout" 900 } zvol_thrash_001_pos_body() { . $(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() { . $(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 }