svn commit: r292347 - projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set
Alan Somers
asomers at FreeBSD.org
Wed Dec 16 18:43:53 UTC 2015
Author: asomers
Date: Wed Dec 16 18:43:52 2015
New Revision: 292347
URL: https://svnweb.freebsd.org/changeset/base/292347
Log:
Fix zfs_set_001_neg by reinstating property name zero length check.
That particular test uses set_n_check_prop with zero length property names
and values for testing.
Submitted by: Will
Sponsored by: Spectra Logic Corp
Modified:
projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_common.kshlib
Modified: projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_common.kshlib
==============================================================================
--- projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_common.kshlib Wed Dec 16 18:29:54 2015 (r292346)
+++ projects/zfsd/head/tests/sys/cddl/zfs/tests/cli_root/zfs_set/zfs_set_common.kshlib Wed Dec 16 18:43:52 2015 (r292347)
@@ -51,14 +51,16 @@ function set_n_check_prop
typeset prop=$2
typeset dataset=$3
typeset expect_result=${4:-true}
+ typeset old_value=""
+ typeset cur_value=""
- typeset old_value=$(get_prop $prop $dataset)
+ [ -n "$prop" ] && old_value=$(get_prop $prop $dataset)
if [ "$expect_result" = "true" ]; then
log_must $ZFS set $prop=$expect_value $dataset
else
log_mustnot $ZFS set $prop=$expect_value $dataset
fi
- typeset cur_value=$(get_prop $prop $dataset)
+ [ -n "$prop" ] && cur_value=$(get_prop $prop $dataset)
err="ERROR: Dataset '$dataset': '$prop' value '$cur_value'"
if [ "$expect_result" = "true" ]; then
More information about the svn-src-projects
mailing list