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/bootfs/bootfs_001_pos.ksh
          +++ new/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_001_pos.ksh
↓ open down ↓ 20 lines elided ↑ open up ↑
  21   21  #
  22   22  
  23   23  #
  24   24  # Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
  25   25  # Use is subject to license terms.
  26   26  #
  27   27  # Copyright 2015 Nexenta Systems, Inc.
  28   28  #
  29   29  
  30   30  #
  31      -# Copyright (c) 2012, 2015 by Delphix. All rights reserved.
       31 +# Copyright (c) 2012, 2016 by Delphix. All rights reserved.
  32   32  #
  33   33  
  34   34  . $STF_SUITE/include/libtest.shlib
  35   35  
  36   36  #
  37   37  # DESCRIPTION:
  38   38  #
  39   39  # Valid datasets and snapshots are accepted as bootfs property values
  40   40  #
  41   41  # STRATEGY:
  42   42  # 1. Create a set of datasets and snapshots in a test pool
  43   43  # 2. Try setting them as boot filesystems
  44   44  #
  45   45  
  46   46  verify_runnable "global"
  47   47  
  48   48  function cleanup {
  49   49          if poolexists $TESTPOOL ; then
  50      -                log_must $ZPOOL destroy $TESTPOOL
       50 +                log_must zpool destroy $TESTPOOL
  51   51          fi
  52   52  
  53   53          if [[ -f $VDEV ]]; then
  54      -                log_must $RM -f $VDEV
       54 +                log_must rm -f $VDEV
  55   55          fi
  56   56  }
  57   57  
  58      -$ZPOOL set 2>&1 | $GREP bootfs > /dev/null
       58 +zpool set 2>&1 | grep bootfs > /dev/null
  59   59  if [ $? -ne 0 ]
  60   60  then
  61   61          log_unsupported "bootfs pool property not supported on this release."
  62   62  fi
  63   63  
  64   64  log_assert "Valid datasets are accepted as bootfs property values"
  65   65  log_onexit cleanup
  66   66  
  67   67  typeset VDEV=/bootfs_001_pos_a.$$.dat
  68   68  
  69      -log_must $MKFILE $MINVDEVSIZE $VDEV
       69 +log_must mkfile $MINVDEVSIZE $VDEV
  70   70  create_pool "$TESTPOOL" "$VDEV"
  71      -log_must $ZFS create $TESTPOOL/$TESTFS
       71 +log_must zfs create $TESTPOOL/$TESTFS
  72   72  
  73      -log_must $ZFS snapshot $TESTPOOL/$TESTFS@snap
  74      -log_must $ZFS clone $TESTPOOL/$TESTFS@snap $TESTPOOL/clone
       73 +log_must zfs snapshot $TESTPOOL/$TESTFS@snap
       74 +log_must zfs clone $TESTPOOL/$TESTFS@snap $TESTPOOL/clone
  75   75  
  76      -log_must $ZPOOL set bootfs=$TESTPOOL/$TESTFS $TESTPOOL
  77      -log_must $ZPOOL set bootfs=$TESTPOOL/$TESTFS@snap $TESTPOOL
  78      -log_must $ZPOOL set bootfs=$TESTPOOL/clone $TESTPOOL
       76 +log_must zpool set bootfs=$TESTPOOL/$TESTFS $TESTPOOL
       77 +log_must zpool set bootfs=$TESTPOOL/$TESTFS@snap $TESTPOOL
       78 +log_must zpool set bootfs=$TESTPOOL/clone $TESTPOOL
  79   79  
  80      -log_must $ZFS promote $TESTPOOL/clone
  81      -log_must $ZPOOL set bootfs=$TESTPOOL/clone $TESTPOOL
       80 +log_must zfs promote $TESTPOOL/clone
       81 +log_must zpool set bootfs=$TESTPOOL/clone $TESTPOOL
  82   82  log_pass "Valid datasets are accepted as bootfs property values"
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX