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>
@@ -23,11 +23,11 @@
# Copyright 2009 Sun Microsystems, Inc. All rights reserved.
# Use is subject to license terms.
#
#
-# Copyright (c) 2013 by Delphix. All rights reserved.
+# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
#
. $STF_SUITE/include/libtest.shlib
. $STF_SUITE/tests/functional/userquota/userquota.cfg
@@ -35,19 +35,19 @@
# reset the userquota and groupquota and delete temporary files
#
function cleanup_quota
{
if datasetexists $QFS; then
- log_must $ZFS set userquota@$QUSER1=none $QFS
- log_must $ZFS set userquota@$QUSER2=none $QFS
- log_must $ZFS set groupquota@$QGROUP=none $QFS
+ log_must zfs set userquota@$QUSER1=none $QFS
+ log_must zfs set userquota@$QUSER2=none $QFS
+ log_must zfs set groupquota@$QGROUP=none $QFS
recovery_writable $QFS
fi
- [[ -f $QFILE ]] && log_must $RM -f $QFILE
- [[ -f $OFILE ]] && log_must $RM -f $OFILE
- $SYNC
+ [[ -f $QFILE ]] && log_must rm -f $QFILE
+ [[ -f $OFILE ]] && log_must rm -f $OFILE
+ sync
return 0
}
#
@@ -69,21 +69,21 @@
#
function mkmount_writable
{
typeset fs=$1
typeset mntp=$(get_prop mountpoint $fs)
- log_must $CHMOD 0777 $mntp
+ log_must chmod 0777 $mntp
}
#
# recovery the directory permission for $QFS
#
function recovery_writable
{
typeset fs=$1
typeset mntp=$(get_prop mountpoint $fs)
- log_must $CHMOD 0755 $mntp
+ log_must chmod 0755 $mntp
}
#
# check the quota value of a specific FS
#
@@ -106,15 +106,15 @@
{
typeset prop_val
typeset prop=$1
typeset dataset=$2
- prop_val=$($ZFS get -H -o value $prop $dataset 2>/dev/null)
+ prop_val=$(zfs get -H -o value $prop $dataset 2>/dev/null)
if [[ $? -ne 0 ]]; then
log_note "Unable to get $prop property for dataset " \
"$dataset"
return 1
fi
- $ECHO $prop_val
+ echo $prop_val
return 0
}