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/snapused/snapused.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/include/libtest.shlib
. $STF_SUITE/tests/functional/snapused/snapused.kshlib
*** 47,80 ****
verify_runnable "both"
function cleanup
{
! log_must $ZFS destroy -rR $USEDTEST
}
log_assert "Verify usedbychildren is correct."
log_onexit cleanup
! log_must $ZFS create $USEDTEST
check_usedbychildren $USEDTEST
typeset -i i=0
typeset -i r_size=0
mntpnt=$(get_prop mountpoint $USEDTEST)
while ((i < 5)); do
((r_size=(i+1)*16))
! log_must $ZFS create $USEDTEST/fs$i
! log_must $ZFS set reservation="$r_size"M $USEDTEST/fs$i
! log_must $MKFILE 48M $mntpnt/fs$i/file$i
if is_global_zone; then
! log_must $ZFS create -V 32M $USEDTEST/vol$i
fi
! log_must $ZFS snapshot -r $USEDTEST@snap$i
check_usedbychildren $USEDTEST
((i = i + 1))
done
--- 47,80 ----
verify_runnable "both"
function cleanup
{
! log_must zfs destroy -rR $USEDTEST
}
log_assert "Verify usedbychildren is correct."
log_onexit cleanup
! log_must zfs create $USEDTEST
check_usedbychildren $USEDTEST
typeset -i i=0
typeset -i r_size=0
mntpnt=$(get_prop mountpoint $USEDTEST)
while ((i < 5)); do
((r_size=(i+1)*16))
! log_must zfs create $USEDTEST/fs$i
! log_must zfs set reservation="$r_size"M $USEDTEST/fs$i
! log_must mkfile 48M $mntpnt/fs$i/file$i
if is_global_zone; then
! log_must zfs create -V 32M $USEDTEST/vol$i
fi
! log_must zfs snapshot -r $USEDTEST@snap$i
check_usedbychildren $USEDTEST
((i = i + 1))
done