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>

Split Close
Expand all
Collapse all
          --- old/usr/src/test/zfs-tests/tests/functional/inheritance/inherit.kshlib
          +++ new/usr/src/test/zfs-tests/tests/functional/inheritance/inherit.kshlib
↓ open down ↓ 17 lines elided ↑ open up ↑
  18   18  #
  19   19  # CDDL HEADER END
  20   20  #
  21   21  
  22   22  #
  23   23  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  24   24  # Use is subject to license terms.
  25   25  #
  26   26  
  27   27  #
  28      -# Copyright (c) 2013 by Delphix. All rights reserved.
       28 +# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  29   29  #
  30   30  
  31   31  #
  32   32  # Simple function to get the source of the specified property.
  33   33  # If unable to get the property then exits.
  34   34  #
  35   35  function get_prop_src # property dataset
  36   36  {
  37   37          typeset prop_val
  38   38          typeset prop=$1
  39   39          typeset dataset=$2
  40   40  
  41      -        prop_val=`$ZFS get -H -o source $prop $dataset`
       41 +        prop_val=`zfs get -H -o source $prop $dataset`
  42   42  
  43   43          if [[ $? -ne 0 ]]; then
  44   44                  log_fail "Unable to determine the source of $prop " \
  45   45                          "property for dataset $dataset"
  46   46          else
  47   47                  echo $prop_val
  48   48          fi
  49   49  }
  50   50  
  51   51  #
↓ open down ↓ 45 lines elided ↑ open up ↑
  97   97  # Simple function to set a property to a
  98   98  # specified value and verify it has changed
  99   99  # correctly.
 100  100  #
 101  101  function set_n_verify_prop #property value dataset
 102  102  {
 103  103          typeset prop=$1
 104  104          typeset prop_val=$2
 105  105          typeset dataset=$3
 106  106  
 107      -        $ZFS set $prop=$prop_val $dataset
      107 +        zfs set $prop=$prop_val $dataset
 108  108          check_val=`get_prop $prop $dataset`
 109  109  
 110  110          if [[ $check_val != $prop_val ]]; then
 111  111                  log_fail "Property $prop of $dataset has value $check_val"\
 112  112                          " rather than $prop_val"
 113  113          fi
 114  114  }
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX