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/vdev_zaps/vdev_zaps.kshlib
          +++ new/usr/src/test/zfs-tests/tests/functional/vdev_zaps/vdev_zaps.kshlib
↓ open down ↓ 6 lines elided ↑ open up ↑
   7    7  # 1.0 of the CDDL.
   8    8  #
   9    9  # A full copy of the text of the CDDL should have accompanied this
  10   10  # source.  A copy of the CDDL is also available via the Internet at
  11   11  # http://www.illumos.org/license/CDDL.
  12   12  #
  13   13  # CDDL HEADER END
  14   14  #
  15   15  
  16   16  #
  17      -# Copyright (c) 2015 by Delphix. All rights reserved.
       17 +# Copyright (c) 2015, 2016 by Delphix. All rights reserved.
  18   18  #
  19   19  
  20   20  function get_conf_section # regex conf
  21   21  {
  22   22          typeset dsk_line next_vd_line conf section
  23   23          typeset regex="$1"
  24   24          typeset conf="$2"
  25   25  
  26   26          dsk_line=$(grep -n "$regex" "$conf" | awk -F: '{print $1}')
  27   27          if [[ -z "$dsk_line" ]]; then
↓ open down ↓ 69 lines elided ↑ open up ↑
  97   97  #
  98   98  # Code common to setup/teardown for each test.
  99   99  #
 100  100  
 101  101  function cleanup
 102  102  {
 103  103          if datasetexists $TESTPOOL ; then
 104  104                  log_must zpool destroy -f $TESTPOOL
 105  105          fi
 106  106          if [[ -e $conf ]]; then
 107      -                log_must $RM -f "$conf"
      107 +                log_must rm -f "$conf"
 108  108          fi
 109  109          if [[ -e $POOL2 ]]; then
 110  110                  log_must zpool destroy -f $POOL2
 111  111          fi
 112  112  }
 113  113  
 114  114  log_onexit cleanup
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX