aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests/include
diff options
context:
space:
mode:
Diffstat (limited to 'tests/zfs-tests/include')
-rw-r--r--tests/zfs-tests/include/default.cfg.in7
-rw-r--r--tests/zfs-tests/include/libtest.shlib5
2 files changed, 11 insertions, 1 deletions
diff --git a/tests/zfs-tests/include/default.cfg.in b/tests/zfs-tests/include/default.cfg.in
index ef34d2b90..a3e4881df 100644
--- a/tests/zfs-tests/include/default.cfg.in
+++ b/tests/zfs-tests/include/default.cfg.in
@@ -26,6 +26,7 @@
#
# Copyright (c) 2016 by Delphix. All rights reserved.
+# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
#
. $STF_SUITE/include/commands.cfg
@@ -129,6 +130,12 @@ export TESTDIR0=${TEST_BASE_DIR%%/}/testdir0$$
export TESTDIR1=${TEST_BASE_DIR%%/}/testdir1$$
export TESTDIR2=${TEST_BASE_DIR%%/}/testdir2$$
+# some temp files
+export TEMPFILE=${TEST_BASE_DIR%%/}/tempfile$$
+export TEMPFILE0=${TEST_BASE_DIR%%/}/tempfile0$$
+export TEMPFILE1=${TEST_BASE_DIR%%/}/tempfile1$$
+export TEMPFILE2=${TEST_BASE_DIR%%/}/tempfile2$$
+
export ZFSROOT=
export TESTSNAP=testsnap$$
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index da80407a9..4493d97cd 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -25,6 +25,7 @@
# Use is subject to license terms.
# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
# Copyright 2016 Nexenta Systems, Inc.
+# Copyright (c) 2017 Lawrence Livermore National Security, LLC.
#
. ${STF_TOOLS}/include/logapi.shlib
@@ -1041,6 +1042,8 @@ function get_prop # property dataset
# Simple function to get the specified property of pool. If unable to
# get the property then exits.
#
+# Note property is in 'parsable' format (-p)
+#
function get_pool_prop # property pool
{
typeset prop_val
@@ -1048,7 +1051,7 @@ function get_pool_prop # property pool
typeset pool=$2
if poolexists $pool ; then
- prop_val=$($ZPOOL get $prop $pool 2>/dev/null | $TAIL -1 | \
+ prop_val=$($ZPOOL get -pH $prop $pool 2>/dev/null | $TAIL -1 | \
$AWK '{print $3}')
if [[ $? -ne 0 ]]; then
log_note "Unable to get $prop property for pool " \