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,10 +23,14 @@
 #
 # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
 
+#
+# Copyright (c) 2016 by Delphix. All rights reserved.
+#
+
 . $STF_SUITE/tests/functional/truncate/truncate.cfg
 . $STF_SUITE/include/libtest.shlib
 
 #
 # DESCRIPTION:

@@ -42,11 +46,11 @@
 
 verify_runnable "global"
 
 function cleanup
 {
-        [[ -e $TESTDIR ]] && log_must $RM -rf $TESTDIR/*
+        [[ -e $TESTDIR ]] && log_must rm -rf $TESTDIR/*
 }
 
 log_assert "Ensure file with random blocks is truncated properly"
 
 options=""

@@ -64,12 +68,12 @@
 
 [[ -n "$TRUNC_FILEOFFSET" ]] && options="$options -o $TRUNC_FILEOFFSET "
 
 [[ -n "$options" ]] && options_display=$options
 
-log_note "Invoking $FILE_TRUNC with: $options_display"
-log_must $FILE_TRUNC $options $TESTDIR/$TESTFILE
+log_note "Invoking file_trunc with: $options_display"
+log_must file_trunc $options $TESTDIR/$TESTFILE
 
 typeset dir=$(get_device_dir $DISKS)
 verify_filesys "$TESTPOOL" "$TESTPOOL/$TESTFS" "$dir"
 
 log_pass "Random blocks have been truncated properly."