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,11 +24,11 @@
 # Copyright 2007 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
 
 #

@@ -45,11 +45,11 @@
 
 verify_runnable "both"
 
 function cleanup
 {
-        $RM -f $TESTDIR/*
+        rm -f $TESTDIR/*
 }
 
 function create_free_testing #<file size> <file>
 {
         typeset -i fsz=$1

@@ -61,14 +61,14 @@
         for start in 0 `expr $RANDOM % $fsz`
         do
                 (( dist = fsz - start ))
                 for len in `expr $RANDOM % $dist` $dist \
                         `expr $start + $dist`; do
-                        log_must $RANDFREE_FILE -l fsz -s $start \
+                        log_must randfree_file -l fsz -s $start \
                                 -n $len $file
                         [[ -e $file ]] && \
-                                log_must $RM -f $file
+                                log_must rm -f $file
                 done
         done
 }
 
 

@@ -86,21 +86,21 @@
 
 for propname in "compression" "compress"
 do
         for value in $(get_compress_opts zfs_compress)
         do
-                log_must $ZFS set compression=$value $fs
+                log_must zfs set compression=$value $fs
                 real_val=$(get_prop $propname $fs)
                 if [[ $value == "gzip-6" ]]; then
                         value="gzip"
                 fi
                 [[ $real_val != $value ]] && \
                         log_fail "Set property $propname=$value failed."
 
                 (( blksize = 512 ))
                 while (( blksize <= 131072 )); do
-                        log_must $ZFS set recordsize=$blksize $fs
+                        log_must zfs set recordsize=$blksize $fs
 
                         # doing single block testing
                         (( fsize = $RANDOM ))
                         if (( fsize > blksize )); then
                                 (( fsize = fsize % blksize ))