summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGiuseppe Di Natale <[email protected]>2017-03-01 12:58:12 -0800
committerBrian Behlendorf <[email protected]>2017-03-01 12:58:12 -0800
commitebd9aa8c17596db4990979bb2f0df3f23d438115 (patch)
treeaf052ba2e56cf91d35ce7fb04247cbeb3bd4d41d /tests
parentd25534f875ba302fab8fcce3c21d7ddd9e775fbf (diff)
Reduce size of zvol and enforce 4k blocksize in zvol tests
32-bit builders in the buildbot are having trouble completing their ENOSPC testing in less than the timeout. Reduce the zvol size and use a 4k block size to reduce read-modify-writes which are particularly expensive on 32-bit systems due to the reduced maximum ARC size. Reviewed-by: George Melikov <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Kash Pande <[email protected]> Signed-off-by: Giuseppe Di Natale <[email protected]> Closes #5845
Diffstat (limited to 'tests')
-rw-r--r--tests/zfs-tests/tests/functional/zvol/zvol.cfg3
-rwxr-xr-xtests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh2
-rw-r--r--tests/zfs-tests/tests/functional/zvol/zvol_common.shlib17
3 files changed, 15 insertions, 7 deletions
diff --git a/tests/zfs-tests/tests/functional/zvol/zvol.cfg b/tests/zfs-tests/tests/functional/zvol/zvol.cfg
index 71f3d0381..fb2a0385a 100644
--- a/tests/zfs-tests/tests/functional/zvol/zvol.cfg
+++ b/tests/zfs-tests/tests/functional/zvol/zvol.cfg
@@ -33,6 +33,7 @@ export DISK=${DISKS%% *}
export TESTVOL=testvol
export TESTFILE=testfile
export TESTSNAP=testsnap
-export VOLSIZE=1g
+export VOLSIZE=256m
+export BLOCKSIZE=4K
export DATA=0
export ENOSPC=28
diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh b/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh
index e5feb6b58..629fdfafb 100755
--- a/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh
+++ b/tests/zfs-tests/tests/functional/zvol/zvol_ENOSPC/setup.ksh
@@ -40,7 +40,7 @@ if is_mpath_device $DISK; then
delete_partitions
fi
-default_zvol_setup $DISK $VOLSIZE
+default_zvol_setup $DISK $VOLSIZE $BLOCKSIZE
$ECHO "y" | $NEWFS -v ${ZVOL_RDEVDIR}/$TESTPOOL/$TESTVOL >/dev/null 2>&1
(( $? != 0 )) && log_fail "Unable to newfs(1M) $TESTPOOL/$TESTVOL"
diff --git a/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib b/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib
index 94da0d4b4..b5d5998fc 100644
--- a/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib
+++ b/tests/zfs-tests/tests/functional/zvol/zvol_common.shlib
@@ -36,17 +36,24 @@
#
# Where disk_device: is the name of the disk to be used
# volume_size: is the size of the volume, e.g. 2G
+# block_size: is the block size of the volume
#
-function default_zvol_setup # disk_device volume_size
+function default_zvol_setup # disk_device volume_size block_size
{
- typeset disk=$1
- typeset size=$2
+ typeset disk=$1
+ typeset size=$2
+ typeset blocksize=$3
typeset savedumpdev
typeset -i output
+ typeset create_args
- create_pool $TESTPOOL "$disk"
+ create_pool $TESTPOOL "$disk"
- log_must $ZFS create -V $size $TESTPOOL/$TESTVOL
+ if [ -n "$blocksize" ]; then
+ create_args="-b $blocksize"
+ fi
+
+ log_must $ZFS create $create_args -V $size $TESTPOOL/$TESTVOL
block_device_wait
}