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 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/tests/functional/migration/migration.cfg
 
 #

@@ -41,11 +41,11 @@
 #
 # Where:
 #       srcdir: is the directory where the testfile is
 #       cmd:    is the command to be executed.
 #               E.g.
-#               $TAR cf $TESTDIR/tar$$.tar
+#               tar cf $TESTDIR/tar$$.tar
 #
 function prepare #srcdir cmd
 {
         typeset srcdir=$1
         typeset cmd=$2

@@ -80,11 +80,11 @@
 #       destdir: is the directory where the command is to be executed on
 #       oldsuma: is the first part of the values returned by sum
 #       oldsumb: is the second part of the values returned by sum
 #       cmd: is the command to be executed;
 #               E.g.
-#               "$TAR xf $TESTDIR/tar$$.tar"
+#               "tar xf $TESTDIR/tar$$.tar"
 #
 function migrate #destdir oldsuma oldsumb cmd
 {
         typeset destdir=$1
         typeset oldsuma=$2

@@ -97,21 +97,21 @@
         (( $? != 0 )) && return 1
 
         $cmd
         (( $? != 0 )) && return 1
 
-        sumy=`$SUM ./$BNAME`
-        suma=`$ECHO $sumy | $AWK '{print $1}'`
-        sumb=`$ECHO $sumy | $AWK '{print $2}'`
+        sumy=`sum ./$BNAME`
+        suma=`echo $sumy | awk '{print $1}'`
+        sumb=`echo $sumy | awk '{print $2}'`
 
         if (( $oldsuma != $suma )); then
-                log_note "$SUM values are not the same"
+                log_note "sum values are not the same"
                 retval=1
         fi
 
         if (( $oldsumb != $sumb )); then
-                log_note "$SUM values are not the same"
+                log_note "sum values are not the same"
                 retval=1
         fi
 
         cd $cwd
         (( $? != 0 )) && return 1

@@ -128,24 +128,24 @@
 
         cwd=$PWD
         cd $destdir
         (( $? != 0 )) && return 1
 
-        $CPIO -iv < $archive
+        cpio -iv < $archive
         (( $? != 0 )) && return 1
 
-        sumy=`$SUM ./$BNAME`
-        suma=`$ECHO $sumy | $AWK '{print $1}'`
-        sumb=`$ECHO $sumy | $AWK '{print $2}'`
+        sumy=`sum ./$BNAME`
+        suma=`echo $sumy | awk '{print $1}'`
+        sumb=`echo $sumy | awk '{print $2}'`
 
         if (( $oldsuma != $suma )); then
-                log_note "$SUM values are not the same"
+                log_note "sum values are not the same"
                 retval=1
         fi
 
         if (( $oldsumb != $sumb )); then
-                log_note "$SUM values are not the same"
+                log_note "sum values are not the same"
                 retval=1
         fi
 
         cd $cwd
         (( $? != 0 )) && return 1