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 2008 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
 
 #

@@ -41,11 +41,11 @@
 #       3) Verify the output by checking for "mdb:" in the output string
 #
 
 function cleanup
 {
-        $RM -f $OUTFILE
+        rm -f $OUTFILE
 }
 
 verify_runnable "global"
 log_onexit cleanup
 

@@ -79,25 +79,25 @@
 typeset -i RET=0
 
 i=0
 while (( $i < ${#dcmds[*]} )); do
         log_note "Verifying: '${dcmds[i]}'"
-        $ECHO "${dcmds[i]}" | $MDB -k > $OUTFILE 2>&1
+        echo "${dcmds[i]}" | mdb -k > $OUTFILE 2>&1
         RET=$?
         if (( $RET != 0 )); then
                 log_fail "mdb '${dcmds[i]}' returned error $RET"
         fi
 
         #
         # mdb prefixes all errors with "mdb: " so we check the output.
         #
-        $GREP "mdb:" $OUTFILE > /dev/null 2>&1
+        grep "mdb:" $OUTFILE > /dev/null 2>&1
         RET=$?
         if (( $RET == 0 )); then
-                $ECHO "mdb '${dcmds[i]}' contained 'mdb:'"
-                # Using $TAIL limits the number of lines in the log
-                $TAIL -100 $OUTFILE
+                echo "mdb '${dcmds[i]}' contained 'mdb:'"
+                # Using tail limits the number of lines in the log
+                tail -100 $OUTFILE
                 log_fail "mdb walker or dcmd failed"
         fi
 
         ((i = i + 1))
 done