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 2007 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/snapshot/snapshot.cfg --- 24,34 ---- # Copyright 2007 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/snapshot/snapshot.cfg
*** 48,65 **** function cleanup { typeset snap datasetexists $ctrvol && \ ! log_must $ZFS destroy -f $ctrvol for snap in $ctrfs@$TESTSNAP1 \ $snappool $snapvol $snapctr $snapctrvol \ $snapctrclone $snapctrfs do snapexists $snap && \ ! log_must $ZFS destroy -rf $snap done } log_assert "Verify 'destroy -r' can correctly destroy a snapshot subtree at any point." --- 48,65 ---- function cleanup { typeset snap datasetexists $ctrvol && \ ! log_must zfs destroy -f $ctrvol for snap in $ctrfs@$TESTSNAP1 \ $snappool $snapvol $snapctr $snapctrvol \ $snapctrclone $snapctrfs do snapexists $snap && \ ! log_must zfs destroy -rf $snap done } log_assert "Verify 'destroy -r' can correctly destroy a snapshot subtree at any point."
*** 75,95 **** snapctrvol=$ctr/$TESTVOL1@$TESTSNAP snapctrclone=$ctr/$TESTCLONE@$TESTSNAP snapctrfs=$SNAPCTR #preparation for testing ! log_must $ZFS snapshot $ctrfs@$TESTSNAP1 if is_global_zone; then ! log_must $ZFS create -V $VOLSIZE $ctrvol else ! log_must $ZFS create $ctrvol fi ! log_must $ZFS snapshot -r $snappool #select the $TESTCTR as destroy point, $TESTCTR is a child of $TESTPOOL ! log_must $ZFS destroy -r $snapctr for snap in $snapctr $snapctrvol $snapctrclone $snapctrfs; do snapexists $snap && \ log_fail "The snapshot $snap is not destroyed correctly." done --- 75,95 ---- snapctrvol=$ctr/$TESTVOL1@$TESTSNAP snapctrclone=$ctr/$TESTCLONE@$TESTSNAP snapctrfs=$SNAPCTR #preparation for testing ! log_must zfs snapshot $ctrfs@$TESTSNAP1 if is_global_zone; then ! log_must zfs create -V $VOLSIZE $ctrvol else ! log_must zfs create $ctrvol fi ! log_must zfs snapshot -r $snappool #select the $TESTCTR as destroy point, $TESTCTR is a child of $TESTPOOL ! log_must zfs destroy -r $snapctr for snap in $snapctr $snapctrvol $snapctrclone $snapctrfs; do snapexists $snap && \ log_fail "The snapshot $snap is not destroyed correctly." done