svn commit: r323247 - in projects/zfsd/head/tests/sys/cddl/zfs/tests: cli_root/zpool_get cli_user/zpool_list

Alan Somers asomers at FreeBSD.org
Wed Sep 6 22:48:44 UTC 2017


Author: asomers
Date: Wed Sep  6 22:48:42 2017
New Revision: 323247
URL: https://svnweb.freebsd.org/changeset/base/323247

Log:
  Diff reduction versus Illumos' ZFS test suite
  
  Two of the zpool_get and one of the zpool_list tests have long been failing
  because they expected an outdated list of pool properties.  Illumos has
  fixed this in their version of the test suite (though not in their zpool(8)
  man page).
  
  tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg
  tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_001_pos.ksh
  	Update the list of pool properties
  
  tests/sys/cddl/zfs/tests/cli_root/zpool_get/cleanup.ksh
  tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh
  	Remove checks for the current kernel's level of ZFS support.
  	They're not necessary since the test suite now resides in the same
  	codebase as the kernel.
  
  tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh
  tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh
  	Remove atf_expect_fail statements
  
  Obtained from:	Illumos
  Sponsored by:	Spectra Logic Corp

Modified:
  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/setup.ksh
  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_test.sh
  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_test.sh

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/cleanup.ksh	Wed Sep  6 22:48:42 2017	(r323247)
@@ -31,10 +31,4 @@
 
 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

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/setup.ksh	Wed Sep  6 22:48:42 2017	(r323247)
@@ -30,12 +30,6 @@
 . ${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

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get.cfg	Wed Sep  6 22:48:42 2017	(r323247)
@@ -25,14 +25,44 @@
 # 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 at async_destroy"
+    "feature at empty_bpobj"
+    "feature at lz4_compress"
+    "feature at multi_vdev_crash_dump"
+    "feature at spacemap_histogram"
+    "feature at enabled_txg"
+    "feature at hole_birth"
+    "feature at extensible_dataset"
+    "feature at embedded_data"
+    "feature at bookmarks"
+    "feature at filesystem_limits"
+    "feature at large_blocks"
+    "feature at sha512"
+    "feature at skein"
+    # "feature at edonr" Edonr is not yet implemented on FreeBSD
+)

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zpool_get/zpool_get_test.sh	Wed Sep  6 22:48:42 2017	(r323247)
@@ -55,7 +55,6 @@ zpool_get_002_pos_head()
 }
 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
 
@@ -79,7 +78,6 @@ zpool_get_003_pos_head()
 }
 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
 

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_001_pos.ksh	Wed Sep  6 22:48:42 2017	(r323247)
@@ -61,8 +61,8 @@ 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]*] [<pool_name> ...]"
 

Modified: 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	Wed Sep  6 21:38:07 2017	(r323246)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_user/zpool_list/zpool_list_test.sh	Wed Sep  6 22:48:42 2017	(r323247)
@@ -34,8 +34,6 @@ zpool_list_001_pos_head()
 }
 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
 


More information about the svn-src-projects mailing list