Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/cleanup.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/cleanup.ksh (revision 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/cleanup.ksh (revision 323247) @@ -1,40 +1,34 @@ #!/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 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)cleanup.ksh 1.3 08/05/14 SMI" # . ${STF_SUITE}/include/libtest.kshlib verify_runnable "both" -$ZPOOL upgrade -v 2>&1 | $GREP "bootfs pool property" > /dev/null -if [ $? -ne 0 ] -then - log_unsupported "Pool properties not supported on this release." -fi - default_cleanup Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh (revision 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh (revision 323247) @@ -1,41 +1,35 @@ #!/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 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)setup.ksh 1.3 08/05/14 SMI" # . ${STF_SUITE}/include/libtest.kshlib verify_runnable "both" -$ZPOOL upgrade -v 2>&1 | $GREP "bootfs pool property" > /dev/null -if [ $? -ne 0 ] -then - log_unsupported "Pool properties not supported on this release." -fi - DISK=${DISKS%% *} default_setup $DISK Index: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg (revision 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg (revision 323247) @@ -1,38 +1,68 @@ #!/bin/ksh -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 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)zpool_get.cfg 1.6 09/06/22 SMI" # -set -A properties "size" "used" "available" "capacity" "altroot" "health" \ - "guid" "version" "bootfs" "delegation" "autoreplace" \ - "cachefile" - -typeset -i i=${#properties[*]} -for prop in "failmode" "listsnapshots" "keysource" "keystatus" "autoexpand"; do - if pool_prop_exist $prop ; then - properties[$i]="$prop" - (( i = i + 1 )) - fi -done +# Set the expected properties of zpool +typeset -a properties=( + "size" + "capacity" + "altroot" + "health" + "guid" + "version" + "bootfs" + "delegation" + "autoreplace" + "cachefile" + "failmode" + "listsnapshots" + "autoexpand" + "dedupditto" + "dedupratio" + "free" + "allocated" + "readonly" + "comment" + "expandsize" + "freeing" + "fragmentation" + "leaked" + "feature@async_destroy" + "feature@empty_bpobj" + "feature@lz4_compress" + "feature@multi_vdev_crash_dump" + "feature@spacemap_histogram" + "feature@enabled_txg" + "feature@hole_birth" + "feature@extensible_dataset" + "feature@embedded_data" + "feature@bookmarks" + "feature@filesystem_limits" + "feature@large_blocks" + "feature@sha512" + "feature@skein" + # "feature@edonr" Edonr is not yet implemented on FreeBSD +) 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 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh (revision 323247) @@ -1,128 +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_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() { . $(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() { . $(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' . $(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() { . $(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' . $(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() { . $(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() { . $(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() { . $(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_user/zpool_list/zpool_list_001_pos.ksh =================================================================== --- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_001_pos.ksh (revision 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_001_pos.ksh (revision 323247) @@ -1,76 +1,76 @@ #!/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 2008 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ident "@(#)zpool_list_001_pos.ksh 1.5 08/05/14 SMI" # . $STF_SUITE/include/libtest.kshlib . $STF_SUITE/tests/cli_user/cli_user.kshlib ################################################################################ # # __stc_assertion_start # # ID: zpool_list_001_pos # # DESCRIPTION: # Verify that 'zpool list' succeeds as non-root. # # STRATEGY: # 1. Create an array of options. # 2. Execute each element of the array. # 3. Verify the command succeeds. # # TESTABILITY: explicit # # TEST_AUTOMATION_LEVEL: automated # # CODING_STATUS: COMPLETED (2005-07-04) # # __stc_assertion_end # ################################################################################ verify_runnable "both" if ! is_global_zone ; then TESTPOOL=${TESTPOOL%%/*} fi set -A args "list $TESTPOOL" "list -H $TESTPOOL" "list" "list -H" \ "list -H -o name $TESTPOOL" "list -o name $TESTPOOL" \ - "list -o name,size,used,available,capacity,health,altroot $TESTPOOL" \ - "list -H -o name,size,used,available,capacity,health,altroot $TESTPOOL" + "list -o name,size,capacity,health,altroot $TESTPOOL" \ + "list -H -o name,size,capacity,health,altroot $TESTPOOL" log_assert "zpool list [-H] [-o filed[,filed]*] [ ...]" typeset -i i=0 while [[ $i -lt ${#args[*]} ]]; do log_must run_unprivileged $ZPOOL ${args[i]} ((i = i + 1)) done log_pass "The sub-command 'list' succeeds as non-root." 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 323246) +++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh (revision 323247) @@ -1,75 +1,73 @@ # 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 atf_set "require.config" unprivileged_user } zpool_list_001_pos_body() { - 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 verify_disk_count "$DISKS" 1 ksh93 $(atf_get_srcdir)/setup.ksh || atf_fail "Setup failed" ksh93 $(atf_get_srcdir)/zpool_list_001_pos.ksh || atf_fail "Testcase failed" } zpool_list_001_pos_cleanup() { . $(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 zpool_list_002_neg_head() { atf_set "descr" "Executing 'zpool list' with bad options fails" atf_set "require.progs" zpool atf_set "require.user" unprivileged } zpool_list_002_neg_body() { . $(atf_get_srcdir)/../../../include/default.cfg . $(atf_get_srcdir)/zpool_list.cfg ksh93 $(atf_get_srcdir)/zpool_list_002_neg.ksh || atf_fail "Testcase failed" } atf_init_test_cases() { atf_add_test_case zpool_list_001_pos atf_add_test_case zpool_list_002_neg }