Skip to content

Commit

Permalink
Reduce size of zvol and enforce 4k blocksize in zvol tests
Browse files Browse the repository at this point in the history
32 bit builders in the buildbot are having trouble completing
their ENOSPC testing. Reduce the zvol size and ensure we use
4k blocksizes to ensure the test doesn't time out.

Signed-off-by: Giuseppe Di Natale <[email protected]>
  • Loading branch information
dinatale2 committed Feb 28, 2017
1 parent 912e2ba commit 9891acc
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
3 changes: 2 additions & 1 deletion tests/zfs-tests/tests/functional/zvol/zvol.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
17 changes: 12 additions & 5 deletions tests/zfs-tests/tests/functional/zvol/zvol_common.shlib
Original file line number Diff line number Diff line change
Expand Up @@ -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 create_args
typeset savedumpdev
typeset -i output

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
}

Expand Down

0 comments on commit 9891acc

Please sign in to comment.