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/reservation/reservation.shlib
--- 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/reservation/reservation.shlib
*** 54,81 ****
verify_runnable "both"
function cleanup
{
! [[ -e $TESTDIR/$TESTFILE1 ]] && log_must $RM -rf $TESTDIR/$TESTFILE1
! log_must $ZFS set reservation=none $TESTPOOL/$TESTFS
}
log_onexit cleanup
log_assert "Verify can create files both inside and outside reserved areas"
space_used=`get_prop used $TESTPOOL`
! log_must $ZFS set reservation=$RESV_SIZE $TESTPOOL/$TESTFS
#
# Calculate how many writes of BLOCK_SIZE it would take to fill
# up RESV_SIZE + 20971520 (20 MB).
#
fill_size=`expr $RESV_SIZE + 20971520`
write_count=`expr $fill_size / $BLOCK_SIZE`
! log_must $FILE_WRITE -o create -f $TESTDIR/$TESTFILE1 -b $BLOCK_SIZE \
-c $write_count -d 0
log_pass "Able to create files inside and outside reserved area"
--- 54,81 ----
verify_runnable "both"
function cleanup
{
! [[ -e $TESTDIR/$TESTFILE1 ]] && log_must rm -rf $TESTDIR/$TESTFILE1
! log_must zfs set reservation=none $TESTPOOL/$TESTFS
}
log_onexit cleanup
log_assert "Verify can create files both inside and outside reserved areas"
space_used=`get_prop used $TESTPOOL`
! log_must zfs set reservation=$RESV_SIZE $TESTPOOL/$TESTFS
#
# Calculate how many writes of BLOCK_SIZE it would take to fill
# up RESV_SIZE + 20971520 (20 MB).
#
fill_size=`expr $RESV_SIZE + 20971520`
write_count=`expr $fill_size / $BLOCK_SIZE`
! log_must file_write -o create -f $TESTDIR/$TESTFILE1 -b $BLOCK_SIZE \
-c $write_count -d 0
log_pass "Able to create files inside and outside reserved area"