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) 2012, 2015 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib # --- 24,34 ---- # Copyright 2007 Sun Microsystems, Inc. All rights reserved. # Use is subject to license terms. # # ! # Copyright (c) 2012, 2016 by Delphix. All rights reserved. # . $STF_SUITE/include/libtest.shlib #
*** 47,63 **** set -A pools "pool//$$" "pool%d123" "mirror" "c0t0d0s0" "pool*23*" "*po!l" \ "%s££%^" function cleanup { if poolexists $POOL; then ! log_must $ZPOOL destroy $POOL fi ! $RM /bootfs_004.$$.dat } ! $ZPOOL set 2>&1 | $GREP bootfs > /dev/null if [ $? -ne 0 ] then log_unsupported "bootfs pool property not supported on this release." fi --- 47,63 ---- set -A pools "pool//$$" "pool%d123" "mirror" "c0t0d0s0" "pool*23*" "*po!l" \ "%s££%^" function cleanup { if poolexists $POOL; then ! log_must zpool destroy $POOL fi ! rm /bootfs_004.$$.dat } ! zpool set 2>&1 | grep bootfs > /dev/null if [ $? -ne 0 ] then log_unsupported "bootfs pool property not supported on this release." fi
*** 76,95 **** done pools[${#pools[@]}]="$bigname" ! $MKFILE $MINVDEVSIZE /bootfs_004.$$.dat typeset -i i=0; while [ $i -lt "${#pools[@]}" ] do POOL=${pools[$i]}/$TESTFS ! log_mustnot $ZPOOL create $POOL /bootfs_004.$$.dat ! log_mustnot $ZFS create $POOL/$TESTFS ! log_mustnot $ZPOOL set bootfs=$POOL/$TESTFS $POOL i=$(( $i + 1 )) done log_pass "Invalid pool names are rejected by zpool set bootfs" --- 76,95 ---- done pools[${#pools[@]}]="$bigname" ! mkfile $MINVDEVSIZE /bootfs_004.$$.dat typeset -i i=0; while [ $i -lt "${#pools[@]}" ] do POOL=${pools[$i]}/$TESTFS ! log_mustnot zpool create $POOL /bootfs_004.$$.dat ! log_mustnot zfs create $POOL/$TESTFS ! log_mustnot zpool set bootfs=$POOL/$TESTFS $POOL i=$(( $i + 1 )) done log_pass "Invalid pool names are rejected by zpool set bootfs"