diff options
author | Kody Kantor <kody@kkantor.com> | 2019-04-09 21:45:06 +0000 |
---|---|---|
committer | Dan McDonald <danmcd@joyent.com> | 2019-05-20 16:43:37 -0400 |
commit | c09fb523874c2de6a430f3a5c6b9dfafc4d87329 (patch) | |
tree | cd23c9ae8d43d8f7c2a43076913d4202410416f6 | |
parent | 3c562093c61e10c25f10f97c2985f09afd11223f (diff) | |
download | illumos-joyent-c09fb523874c2de6a430f3a5c6b9dfafc4d87329.tar.gz |
10608 zfs tests could be more reliable
Reviewed by: John Kennedy <john.kennedy@delphix.com>
Reviewed by: Jerry Jelinek <jerry.jelinek@joyent.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Approved by: Dan McDonald <danmcd@joyent.com>
25 files changed, 159 insertions, 40 deletions
diff --git a/usr/src/test/zfs-tests/include/default.cfg b/usr/src/test/zfs-tests/include/default.cfg index d36b0f3b84..cf61660b76 100644 --- a/usr/src/test/zfs-tests/include/default.cfg +++ b/usr/src/test/zfs-tests/include/default.cfg @@ -26,6 +26,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -52,7 +53,7 @@ export NO_POOLS="no pools available" # pattern to ignore from 'zfs list'. export NO_DATASETS="no datasets available" -export TEST_BASE_DIR="/" +export TEST_BASE_DIR="/var/tmp" # Default to compression ON export COMPRESSION_PROP=on diff --git a/usr/src/test/zfs-tests/runfiles/delphix.run b/usr/src/test/zfs-tests/runfiles/delphix.run index 2c5e4529b1..2cd454d08e 100644 --- a/usr/src/test/zfs-tests/runfiles/delphix.run +++ b/usr/src/test/zfs-tests/runfiles/delphix.run @@ -12,7 +12,7 @@ # # Copyright (c) 2012, 2018 by Delphix. All rights reserved. # Copyright 2016, OmniTI Computer Consulting, Inc. All rights reserved. -# Copyright 2018 Joyent, Inc. +# Copyright 2019 Joyent, Inc. # [DEFAULT] @@ -69,8 +69,6 @@ tests = ['atime_001_pos', 'atime_002_neg'] tests = ['bootfs_001_pos', 'bootfs_002_neg', 'bootfs_003_pos', 'bootfs_004_neg', 'bootfs_005_neg', 'bootfs_006_pos', 'bootfs_007_pos', 'bootfs_008_pos'] -pre = -post = [/opt/zfs-tests/tests/functional/cache] tests = ['cache_001_pos', 'cache_002_pos', 'cache_003_pos', 'cache_004_neg', diff --git a/usr/src/test/zfs-tests/runfiles/omnios.run b/usr/src/test/zfs-tests/runfiles/omnios.run index c2443141da..5f77cec090 100644 --- a/usr/src/test/zfs-tests/runfiles/omnios.run +++ b/usr/src/test/zfs-tests/runfiles/omnios.run @@ -70,8 +70,6 @@ tests = ['atime_001_pos', 'atime_002_neg'] tests = ['bootfs_001_pos', 'bootfs_002_neg', 'bootfs_003_pos', 'bootfs_004_neg', 'bootfs_005_neg', 'bootfs_006_pos', 'bootfs_007_pos', 'bootfs_008_pos'] -pre = -post = [/opt/zfs-tests/tests/functional/cache] tests = ['cache_001_pos', 'cache_002_pos', 'cache_003_pos', 'cache_004_neg', diff --git a/usr/src/test/zfs-tests/runfiles/openindiana.run b/usr/src/test/zfs-tests/runfiles/openindiana.run index 31ab3b20d6..357d83bcd3 100644 --- a/usr/src/test/zfs-tests/runfiles/openindiana.run +++ b/usr/src/test/zfs-tests/runfiles/openindiana.run @@ -70,8 +70,6 @@ tests = ['atime_001_pos', 'atime_002_neg'] tests = ['bootfs_001_pos', 'bootfs_002_neg', 'bootfs_003_pos', 'bootfs_004_neg', 'bootfs_005_neg', 'bootfs_006_pos', 'bootfs_007_pos', 'bootfs_008_pos'] -pre = -post = [/opt/zfs-tests/tests/functional/cache] tests = ['cache_001_pos', 'cache_002_pos', 'cache_003_pos', 'cache_004_neg', diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh index e647fe4fba..002d9125e1 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh @@ -29,6 +29,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # # @@ -68,7 +69,7 @@ fi log_assert "Valid datasets are accepted as bootfs property values" log_onexit cleanup -typeset VDEV=/bootfs_001_pos_a.$$.dat +typeset VDEV=$TESTDIR/bootfs_001_pos_a.$$.dat log_must mkfile $MINVDEVSIZE $VDEV create_pool "$TESTPOOL" "$VDEV" diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_002_neg.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_002_neg.ksh index e5316052e2..56efad8e14 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_002_neg.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_002_neg.ksh @@ -29,6 +29,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # # @@ -44,7 +45,7 @@ # # STRATEGY: # -# 1. Create a zvol +# 1. Create a zvol # 2. Verify that we can't set the bootfs to that dataset # @@ -74,7 +75,7 @@ fi log_assert "Invalid datasets are rejected as boot property values" log_onexit cleanup -typeset VDEV=/bootfs_002_neg_a.$$.dat +typeset VDEV=$TESTDIR/bootfs_002_neg_a.$$.dat log_must mkfile 400m $VDEV create_pool "$TESTPOOL" "$VDEV" diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_003_pos.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_003_pos.ksh index 2aa37d6a5a..f9f5f8edb6 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_003_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_003_pos.ksh @@ -27,6 +27,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -50,7 +51,7 @@ function cleanup { if poolexists $POOL ; then log_must zpool destroy $POOL fi - rm /bootfs_003.$$.dat + log_must rm -f $VDEV } @@ -63,14 +64,15 @@ fi log_onexit cleanup log_assert "Valid pool names are accepted by zpool set bootfs" -mkfile $MINVDEVSIZE /bootfs_003.$$.dat +typeset VDEV=$TESTDIR/bootfs_003.$$.dat +mkfile $MINVDEVSIZE $VDEV typeset -i i=0; while [ $i -lt "${#pools[@]}" ] do POOL=${pools[$i]} - log_must zpool create $POOL /bootfs_003.$$.dat + log_must zpool create $POOL $VDEV log_must zfs create $POOL/$TESTFS log_must zpool set bootfs=$POOL/$TESTFS $POOL diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_004_neg.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_004_neg.ksh index a55249f9e0..c4d8d6bef9 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_004_neg.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_004_neg.ksh @@ -27,6 +27,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -51,7 +52,7 @@ function cleanup { if poolexists $POOL; then log_must zpool destroy $POOL fi - rm /bootfs_004.$$.dat + log_must rm -f $VDEV } @@ -77,8 +78,8 @@ done pools[${#pools[@]}]="$bigname" - -mkfile $MINVDEVSIZE /bootfs_004.$$.dat +typeset VDEV=$TESTDIR/bootfs_004.$$.dat +mkfile $MINVDEVSIZE $VDEV typeset -i i=0; diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh index cefcb3f30f..1c3c86a2ae 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh @@ -27,6 +27,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -50,10 +51,10 @@ then log_unsupported "bootfs pool property not supported on this release." fi -VDEV1=/bootfs_006_pos_a.$$.dat -VDEV2=/bootfs_006_pos_b.$$.dat -VDEV3=/bootfs_006_pos_c.$$.dat -VDEV4=/bootfs_006_pos_d.$$.dat +VDEV1=$TESTDIR/bootfs_006_pos_a.$$.dat +VDEV2=$TESTDIR/bootfs_006_pos_b.$$.dat +VDEV3=$TESTDIR/bootfs_006_pos_c.$$.dat +VDEV4=$TESTDIR/bootfs_006_pos_d.$$.dat function verify_bootfs { # $POOL POOL=$1 diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_008_pos.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_008_pos.ksh index 1f8d96e9ea..550e532dbf 100644 --- a/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_008_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_008_pos.ksh @@ -27,6 +27,7 @@ # # Copyright (c) 2012, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -59,7 +60,7 @@ function cleanup { typeset assert_msg="setting bootfs on a dataset which has gzip \ compression enabled will not fail" -typeset VDEV=/bootfs_008_pos_a.$$.dat +typeset VDEV=$TESTDIR/bootfs_008_pos_a.$$.dat typeset COMP_FS=$TESTPOOL/COMP_FS log_onexit cleanup diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/cleanup.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/cleanup.ksh new file mode 100644 index 0000000000..2ed812b764 --- /dev/null +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/cleanup.ksh @@ -0,0 +1,32 @@ +#!/usr/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 2019 Joyent, Inc. +# + +. $STF_SUITE/include/libtest.shlib + +verify_runnable "global" + +log_must rmdir "$TESTDIR" +log_pass diff --git a/usr/src/test/zfs-tests/tests/functional/bootfs/setup.ksh b/usr/src/test/zfs-tests/tests/functional/bootfs/setup.ksh new file mode 100644 index 0000000000..4b97659854 --- /dev/null +++ b/usr/src/test/zfs-tests/tests/functional/bootfs/setup.ksh @@ -0,0 +1,35 @@ +#!/usr/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 2019 Joyent, Inc. +# + +. $STF_SUITE/include/libtest.shlib + +verify_runnable "global" + +if [[ ! -d $TESTDIR ]]; then + log_must mkdir "$TESTDIR" +fi + +log_pass diff --git a/usr/src/test/zfs-tests/tests/functional/cache/cache.cfg b/usr/src/test/zfs-tests/tests/functional/cache/cache.cfg index db00d94dff..b284bd4b23 100644 --- a/usr/src/test/zfs-tests/tests/functional/cache/cache.cfg +++ b/usr/src/test/zfs-tests/tests/functional/cache/cache.cfg @@ -61,8 +61,8 @@ set_disks export SIZE=$MINVDEVSIZE -export VDIR=/disk.cache -export VDIR2=/disk2.cache +export VDIR=$TESTDIR/disk.cache +export VDIR2=$TESTDIR/disk2.cache export VDEV="$VDIR/a $VDIR/b $VDIR/c" export LDEV="$DISK0" diff --git a/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_002_pos.ksh b/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_002_pos.ksh index 56faf12ad1..b93316efbb 100644 --- a/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_002_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_002_pos.ksh @@ -45,7 +45,7 @@ verify_runnable "global" -log_assert "The primary side of a zpool mirror may be completely wiped" \ +log_assert "The secondary side of a zpool mirror may be completely wiped" \ "without affecting the content of the pool" overwrite_verify_mirror $SIDE_SECONDARY /dev/zero diff --git a/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_004_pos.ksh b/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_004_pos.ksh index d73c79edf6..5aa2c0a8b1 100644 --- a/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_004_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/clean_mirror/clean_mirror_004_pos.ksh @@ -45,7 +45,7 @@ verify_runnable "global" -log_assert "The primary side of a zpool mirror may be completely mangled" \ +log_assert "The secondary side of a zpool mirror may be completely mangled" \ "without affecting the content of the pool" overwrite_verify_mirror $SIDE_SECONDARY /dev/urandom diff --git a/usr/src/test/zfs-tests/tests/functional/clean_mirror/default.cfg b/usr/src/test/zfs-tests/tests/functional/clean_mirror/default.cfg index 37e1b248de..d9ed809a21 100644 --- a/usr/src/test/zfs-tests/tests/functional/clean_mirror/default.cfg +++ b/usr/src/test/zfs-tests/tests/functional/clean_mirror/default.cfg @@ -26,9 +26,9 @@ # # Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # -typeset -i NUMBER_OF_DISKS=0 for i in $DISKS; do [[ -n $MIRROR_PRIMARY ]] && MIRROR_SECONDARY=$i [[ -z $MIRROR_PRIMARY ]] && MIRROR_PRIMARY=$i @@ -49,7 +49,7 @@ export MIRROR_PRIMARY MIRROR_SECONDARY SINGLE_DISK SIDE_PRIMARY SIDE_SECONDARY export FILE_COUNT=30 export FILE_SIZE=$(( 1024 * 1024 )) -export MIRROR_MEGS=70 +export MIRROR_MEGS=100 export MIRROR_SIZE=${MIRROR_MEGS}m # default mirror size export DD_BLOCK=$(( 64 * 1024 )) export DD_COUNT=$(( MIRROR_MEGS * 1024 * 1024 / DD_BLOCK )) diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs/setup.ksh b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs/setup.ksh index d515cfe861..f9d2636243 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs/setup.ksh +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs/setup.ksh @@ -23,10 +23,12 @@ # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib DISK=${DISKS%% *} +log_must coreadm -e process default_setup $DISK diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh index 8c541f0485..9abc573986 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_share/zfs_share_005_pos.ksh @@ -27,6 +27,7 @@ # # Copyright (c) 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -62,6 +63,11 @@ log_onexit cleanup cleanup +# /var/nfs is the default nfs log directory in illumos. +if [[ ! -d /var/nfs ]]; then + log_must mkdir /var/nfs +fi + typeset -i i=0 while (( i < ${#shareopts[*]} )) do diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib index b74811b7f7..3f445e1d0d 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zfs_upgrade/zfs_upgrade.kshlib @@ -26,6 +26,7 @@ # # Copyright (c) 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib @@ -150,12 +151,12 @@ function default_check_zfs_upgrade #rootfs if (( df_ret != 0 )); then if (( spa_version != 0 )) && (( vp < spa_version )); then - log_mustnot eval 'zfs upgrade $opt -a > /dev/null 2>&1' - log_must eval 'zpool upgrade $pool > /dev/null 2>&1' + log_mustnot zfs upgrade $opt -a + log_must zpool upgrade $pool vp=$(get_pool_prop version $pool) fi - log_must eval 'zfs upgrade $opt -a > /dev/null 2>&1' + log_must zfs upgrade $opt -a for fs in $(zfs list -rH -t filesystem -o name $rootfs) ; do log_must check_fs_version $fs $newv diff --git a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool/setup.ksh b/usr/src/test/zfs-tests/tests/functional/cli_root/zpool/setup.ksh index d515cfe861..f9d2636243 100644 --- a/usr/src/test/zfs-tests/tests/functional/cli_root/zpool/setup.ksh +++ b/usr/src/test/zfs-tests/tests/functional/cli_root/zpool/setup.ksh @@ -23,10 +23,12 @@ # # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib DISK=${DISKS%% *} +log_must coreadm -e process default_setup $DISK diff --git a/usr/src/test/zfs-tests/tests/functional/poolversion/cleanup.ksh b/usr/src/test/zfs-tests/tests/functional/poolversion/cleanup.ksh index 6a1b132117..9228779c6a 100644 --- a/usr/src/test/zfs-tests/tests/functional/poolversion/cleanup.ksh +++ b/usr/src/test/zfs-tests/tests/functional/poolversion/cleanup.ksh @@ -27,16 +27,19 @@ # # Copyright (c) 2013, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/poolversion/poolversion.cfg verify_runnable "global" log_must zpool destroy $TESTPOOL log_must zpool destroy $TESTPOOL2 -log_must rm /tmp/zpool_version_1.dat -log_must rm /tmp/zpool2_version_1.dat +log_must rm $VERS_FILE_1 +log_must rm $VERS_FILE_2 +log_must rmdir $TESTDIR default_cleanup diff --git a/usr/src/test/zfs-tests/tests/functional/poolversion/poolversion.cfg b/usr/src/test/zfs-tests/tests/functional/poolversion/poolversion.cfg new file mode 100644 index 0000000000..7951ea2ce3 --- /dev/null +++ b/usr/src/test/zfs-tests/tests/functional/poolversion/poolversion.cfg @@ -0,0 +1,28 @@ +#!/usr/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 2019 Joyent, Inc. +# + +VERS_FILE_1=$TESTDIR/zpool_version_1.dat +VERS_FILE_2=$TESTDIR/zpool2_version_1.dat diff --git a/usr/src/test/zfs-tests/tests/functional/poolversion/setup.ksh b/usr/src/test/zfs-tests/tests/functional/poolversion/setup.ksh index 1335e2ad4b..3a9c5e5112 100644 --- a/usr/src/test/zfs-tests/tests/functional/poolversion/setup.ksh +++ b/usr/src/test/zfs-tests/tests/functional/poolversion/setup.ksh @@ -27,19 +27,25 @@ # # Copyright (c) 2013, 2016 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # . $STF_SUITE/include/libtest.shlib +. $STF_SUITE/tests/functional/poolversion/poolversion.cfg verify_runnable "global" +if [[ ! -d $TESTDIR ]]; then + log_must mkdir $TESTDIR +fi + # create a version 1 pool -log_must mkfile $MINVDEVSIZE /tmp/zpool_version_1.dat -log_must zpool create -o version=1 $TESTPOOL /tmp/zpool_version_1.dat +log_must mkfile $MINVDEVSIZE $VERS_FILE_1 +log_must zpool create -o version=1 $TESTPOOL $VERS_FILE_1 # create another version 1 pool -log_must mkfile $MINVDEVSIZE /tmp/zpool2_version_1.dat -log_must zpool create -o version=1 $TESTPOOL2 /tmp/zpool2_version_1.dat +log_must mkfile $MINVDEVSIZE $VERS_FILE_2 +log_must zpool create -o version=1 $TESTPOOL2 $VERS_FILE_2 log_pass diff --git a/usr/src/test/zfs-tests/tests/functional/reservation/reservation.cfg b/usr/src/test/zfs-tests/tests/functional/reservation/reservation.cfg index c12ad072cd..0a68585604 100644 --- a/usr/src/test/zfs-tests/tests/functional/reservation/reservation.cfg +++ b/usr/src/test/zfs-tests/tests/functional/reservation/reservation.cfg @@ -26,10 +26,11 @@ # # Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # -export RESV_DELTA=5242880 -export RESV_TOLERANCE=5242880 # Acceptable limit (5MB) for diff in space stats +export RESV_DELTA=10485760 # Amount of space (10MB) to leave unreserved +export RESV_TOLERANCE=10485760 # Margin of error (10MB) for reservations export RESV_SIZE=52428800 # Default reservation size (50MB) export RESV_FREE_SPACE=52428800 # Amount of space (50MB) to leave free in a pool export RESV_NUM_FS=10 # Number of filesystems to create diff --git a/usr/src/test/zfs-tests/tests/functional/scrub_mirror/default.cfg b/usr/src/test/zfs-tests/tests/functional/scrub_mirror/default.cfg index 37e1b248de..274b5821b7 100644 --- a/usr/src/test/zfs-tests/tests/functional/scrub_mirror/default.cfg +++ b/usr/src/test/zfs-tests/tests/functional/scrub_mirror/default.cfg @@ -26,6 +26,7 @@ # # Copyright (c) 2013 by Delphix. All rights reserved. +# Copyright 2019 Joyent, Inc. # typeset -i NUMBER_OF_DISKS=0 @@ -49,7 +50,7 @@ export MIRROR_PRIMARY MIRROR_SECONDARY SINGLE_DISK SIDE_PRIMARY SIDE_SECONDARY export FILE_COUNT=30 export FILE_SIZE=$(( 1024 * 1024 )) -export MIRROR_MEGS=70 +export MIRROR_MEGS=100 export MIRROR_SIZE=${MIRROR_MEGS}m # default mirror size export DD_BLOCK=$(( 64 * 1024 )) export DD_COUNT=$(( MIRROR_MEGS * 1024 * 1024 / DD_BLOCK )) |