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/inuse/inuse.cfg
--- 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/inuse/inuse.cfg
*** 45,55 ****
verify_runnable "global"
function cleanup
{
! poolexists $TESTPOOL1 || $ZPOOL import $TESTPOOL1 >/dev/null 2>&1
poolexists $TESTPOOL1 && destroy_pool $TESTPOOL1
#
# Tidy up the disks we used.
--- 45,55 ----
verify_runnable "global"
function cleanup
{
! poolexists $TESTPOOL1 || zpool import $TESTPOOL1 >/dev/null 2>&1
poolexists $TESTPOOL1 && destroy_pool $TESTPOOL1
#
# Tidy up the disks we used.
*** 60,70 ****
function verify_assertion #slices
{
typeset targets=$1
for t in $targets; do
! $ECHO "y" | $NEWFS -v $t > /dev/null 2>&1
(( $? !=0 )) && \
log_fail "newfs over exported pool " \
"failes unexpected."
done
--- 60,70 ----
function verify_assertion #slices
{
typeset targets=$1
for t in $targets; do
! echo "y" | newfs -v $t > /dev/null 2>&1
(( $? !=0 )) && \
log_fail "newfs over exported pool " \
"failes unexpected."
done
*** 91,101 ****
(( i = i + 1 ))
continue
fi
create_pool $TESTPOOL1 ${vdevs[i]} $vslices spare $sslices
! log_must $ZPOOL export $TESTPOOL1
verify_assertion "$rawtargets"
cleanup_devices $vslices $sslices
(( i = i + 1 ))
done
--- 91,101 ----
(( i = i + 1 ))
continue
fi
create_pool $TESTPOOL1 ${vdevs[i]} $vslices spare $sslices
! log_must zpool export $TESTPOOL1
verify_assertion "$rawtargets"
cleanup_devices $vslices $sslices
(( i = i + 1 ))
done