Print this page
7290 ZFS test suite needs to control what utilities it can run
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>

*** 24,34 **** # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ! # Copyright (c) 2013 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib . $STF_SUITE/tests/functional/reservation/reservation.shlib --- 24,34 ---- # Copyright 2009 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ! # Copyright (c) 2013, 2016 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib . $STF_SUITE/tests/functional/reservation/reservation.shlib
*** 53,63 **** function cleanup { typeset vol for vol in $regvol $sparsevol; do ! datasetexists $vol && log_must $ZFS destroy $vol done } log_onexit cleanup log_assert "Verify that the volsize changes of sparse volumes are not " \ --- 53,63 ---- function cleanup { typeset vol for vol in $regvol $sparsevol; do ! datasetexists $vol && log_must zfs destroy $vol done } log_onexit cleanup log_assert "Verify that the volsize changes of sparse volumes are not " \
*** 65,76 **** log_onexit cleanup # Create a regular and sparse volume for testing. regvol=$TESTPOOL/$TESTVOL sparsevol=$TESTPOOL/$TESTVOL2 ! log_must $ZFS create -V 64M $regvol ! log_must $ZFS create -s -V 64M $sparsevol typeset -i vsize=$(get_prop available $TESTPOOL) typeset -i iterate=10 typeset -i regreserv typeset -i sparsereserv --- 65,76 ---- log_onexit cleanup # Create a regular and sparse volume for testing. regvol=$TESTPOOL/$TESTVOL sparsevol=$TESTPOOL/$TESTVOL2 ! log_must zfs create -V 64M $regvol ! log_must zfs create -s -V 64M $sparsevol typeset -i vsize=$(get_prop available $TESTPOOL) typeset -i iterate=10 typeset -i regreserv typeset -i sparsereserv
*** 81,92 **** while ((iterate > 1)); do ((randomblknum = 1 + RANDOM % blknum)) # Make sure volsize is a multiple of volume block size ((vsize = randomblknum * volblocksize)) ! log_must $ZFS set volsize=$vsize $regvol ! log_must $ZFS set volsize=$vsize $sparsevol vsize=$(volsize_to_reservation $regvol $vsize) regreserv=$(get_prop refreservation $regvol) sparsereserv=$(get_prop reservation $sparsevol) ((sparsereserv == vsize)) && \ log_fail "volsize changes of sparse volume is reflected in " \ --- 81,92 ---- while ((iterate > 1)); do ((randomblknum = 1 + RANDOM % blknum)) # Make sure volsize is a multiple of volume block size ((vsize = randomblknum * volblocksize)) ! log_must zfs set volsize=$vsize $regvol ! log_must zfs set volsize=$vsize $sparsevol vsize=$(volsize_to_reservation $regvol $vsize) regreserv=$(get_prop refreservation $regvol) sparsereserv=$(get_prop reservation $sparsevol) ((sparsereserv == vsize)) && \ log_fail "volsize changes of sparse volume is reflected in " \