aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorLOLi <[email protected]>2017-09-25 19:32:34 +0200
committerBrian Behlendorf <[email protected]>2017-09-25 10:32:34 -0700
commit3fd3e56cfd543d7d7a1bf502bfc0db6e24139668 (patch)
tree1ccc22b4c0eccb6e3f38fa973b89dc8d6a4bfaa4 /scripts
parentb33d668ddb005b1072c26d36e1abff53aa39ca98 (diff)
Fix some ZFS Test Suite issues
* Add 'zfs bookmark' coverage (zfs_bookmark_cliargs) * Add OpenZFS 8166 coverage (zpool_scrub_offline_device) * Fix "busy" zfs_mount_remount failures * Fix bootfs_003_pos, bootfs_004_neg, zdb_005_pos local cleanup * Update usage of $KEEP variable, add get_all_pools() function * Enable history_008_pos and rsend_019_pos (non-32bit builders) * Enable zfs_copies_005_neg, update local cleanup * Fix zfs_send_007_pos (large_dnode + OpenZFS 8199) * Fix rollback_003_pos (use dataset name, not mountpoint, to unmount) * Update default_raidz_setup() to work properly with more than 3 disks * Use $TEST_BASE_DIR instead of hardcoded (/var)/tmp for file VDEVs * Update usage of /dev/random to /dev/urandom Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: loli10K <[email protected]> Issue #6086 Closes #5658 Closes #6143 Closes #6421 Closes #6627 Closes #6632
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/zfs-tests.sh18
1 files changed, 16 insertions, 2 deletions
diff --git a/scripts/zfs-tests.sh b/scripts/zfs-tests.sh
index 3345fb5a5..9b8d166bf 100755
--- a/scripts/zfs-tests.sh
+++ b/scripts/zfs-tests.sh
@@ -438,15 +438,28 @@ fi
#
# By default preserve any existing pools
+# NOTE: Since 'zpool list' outputs a newline-delimited list convert $KEEP from
+# space-delimited to newline-delimited.
#
if [ -z "${KEEP}" ]; then
- KEEP=$(sudo "$ZPOOL" list -H -o name)
+ KEEP="$(sudo "$ZPOOL" list -H -o name)"
if [ -z "${KEEP}" ]; then
KEEP="rpool"
fi
+else
+ KEEP="$(echo -e "${KEEP//[[:blank:]]/\n}")"
fi
-__ZFS_POOL_EXCLUDE="$(echo $KEEP | sed ':a;N;s/\n/ /g;ba')"
+#
+# NOTE: The following environment variables are undocumented
+# and should be used for testing purposes only:
+#
+# __ZFS_POOL_EXCLUDE - don't iterate over the pools it lists
+# __ZFS_POOL_RESTRICT - iterate only over the pools it lists
+#
+# See libzfs/libzfs_config.c for more information.
+#
+__ZFS_POOL_EXCLUDE="$(echo "$KEEP" | sed ':a;N;s/\n/ /g;ba')"
. "$STF_SUITE/include/default.cfg"
@@ -524,6 +537,7 @@ export STF_TOOLS
export STF_SUITE
export STF_PATH
export DISKS
+export FILEDIR
export KEEP
export __ZFS_POOL_EXCLUDE
export TESTFAIL_CALLBACKS