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/tests/functional/rsend/rsend.kshlib # --- 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/tests/functional/rsend/rsend.kshlib #
*** 44,54 **** verify_runnable "both" function cleanup { export __ZFS_POOL_RESTRICT="$POOL $POOL2" ! log_must $ZFS unmount -a unset __ZFS_POOL_RESTRICT log_must cleanup_pool $POOL log_must cleanup_pool $POOL2 log_must setup_test_model $POOL --- 44,54 ---- verify_runnable "both" function cleanup { export __ZFS_POOL_RESTRICT="$POOL $POOL2" ! log_must zfs unmount -a unset __ZFS_POOL_RESTRICT log_must cleanup_pool $POOL log_must cleanup_pool $POOL2 log_must setup_test_model $POOL
*** 60,99 **** # # Setting all the $FS properties as local value, # for prop in $(fs_inherit_prop); do value=$(get_prop $prop $POOL/$FS) ! log_must $ZFS set $prop=$value $POOL/$FS done # # Inherit propertes in sub-datasets # for ds in "$POOL/$FS/fs1" "$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do for prop in $(fs_inherit_prop) ; do ! $ZFS inherit $prop $ds if (($? !=0 )); then ! log_fail "$ZFS inherit $prop $ds" fi done done if is_global_zone ; then for prop in $(vol_inherit_prop) ; do ! $ZFS inherit $prop $POOL/$FS/vol if (($? !=0 )); then ! log_fail "$ZFS inherit $prop $POOL/$FS/vol" fi done fi # # Verify datasets can be backup and restore correctly # Unmount $POOL/$FS to avoid two fs mount in the same mountpoint # ! log_must eval "$ZFS send -R $POOL@final > $BACKDIR/pool-R" ! log_must $ZFS unmount -f $POOL/$FS ! log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-R" dstds=$(get_dst_ds $POOL $POOL2) # # Define all the POOL/POOL2 datasets pair # --- 60,99 ---- # # Setting all the $FS properties as local value, # for prop in $(fs_inherit_prop); do value=$(get_prop $prop $POOL/$FS) ! log_must zfs set $prop=$value $POOL/$FS done # # Inherit propertes in sub-datasets # for ds in "$POOL/$FS/fs1" "$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do for prop in $(fs_inherit_prop) ; do ! zfs inherit $prop $ds if (($? !=0 )); then ! log_fail "zfs inherit $prop $ds" fi done done if is_global_zone ; then for prop in $(vol_inherit_prop) ; do ! zfs inherit $prop $POOL/$FS/vol if (($? !=0 )); then ! log_fail "zfs inherit $prop $POOL/$FS/vol" fi done fi # # Verify datasets can be backup and restore correctly # Unmount $POOL/$FS to avoid two fs mount in the same mountpoint # ! log_must eval "zfs send -R $POOL@final > $BACKDIR/pool-R" ! log_must zfs unmount -f $POOL/$FS ! log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/pool-R" dstds=$(get_dst_ds $POOL $POOL2) # # Define all the POOL/POOL2 datasets pair #