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/cache/cache_006_pos.ksh
          +++ new/usr/src/test/zfs-tests/tests/functional/cache/cache_006_pos.ksh
↓ open down ↓ 18 lines elided ↑ open up ↑
  19   19  #
  20   20  # CDDL HEADER END
  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  
  28   28  #
  29      -# Copyright (c) 2013 by Delphix. All rights reserved.
       29 +# Copyright (c) 2013, 2016 by Delphix. All rights reserved.
  30   30  #
  31   31  
  32   32  . $STF_SUITE/tests/functional/cache/cache.cfg
  33   33  . $STF_SUITE/tests/functional/cache/cache.kshlib
  34   34  
  35   35  #
  36   36  # DESCRIPTION:
  37   37  #       Exporting and importing pool with cache devices passes.
  38   38  #
  39   39  # STRATEGY:
↓ open down ↓ 6 lines elided ↑ open up ↑
  46   46  #
  47   47  
  48   48  verify_runnable "global"
  49   49  verify_disk_count "$LDEV2"
  50   50  
  51   51  log_assert "Exporting and importing pool with cache devices passes."
  52   52  log_onexit cleanup
  53   53  
  54   54  for type in "" "mirror" "raidz" "raidz2"
  55   55  do
  56      -        log_must $ZPOOL create $TESTPOOL $type $VDEV \
       56 +        log_must zpool create $TESTPOOL $type $VDEV \
  57   57                  cache $LDEV $LDEV2
  58   58          ldev=$(random_get $LDEV $LDEV2)
  59   59          log_must verify_cache_device \
  60   60                  $TESTPOOL $ldev 'ONLINE'
  61   61  
  62   62          #
  63   63          # Nomal export/import operating
  64   64          #
  65      -        log_must $ZPOOL export $TESTPOOL
  66      -        log_must $ZPOOL import -d $VDIR $TESTPOOL
       65 +        log_must zpool export $TESTPOOL
       66 +        log_must zpool import -d $VDIR $TESTPOOL
  67   67          log_must display_status $TESTPOOL
  68   68          ldev=$(random_get $LDEV $LDEV2)
  69   69          log_must verify_cache_device \
  70   70                  $TESTPOOL $ldev 'ONLINE'
  71   71  
  72   72          #
  73   73          # Destroy the pool and import again
  74   74          #
  75      -        log_must $ZPOOL destroy $TESTPOOL
  76      -        log_must $ZPOOL import -Df -d $VDIR $TESTPOOL
       75 +        log_must zpool destroy $TESTPOOL
       76 +        log_must zpool import -Df -d $VDIR $TESTPOOL
  77   77          log_must display_status $TESTPOOL
  78   78          ldev=$(random_get $LDEV $LDEV2)
  79   79          log_must verify_cache_device \
  80   80                  $TESTPOOL $ldev 'ONLINE'
  81   81  
  82      -        log_must $ZPOOL destroy -f $TESTPOOL
       82 +        log_must zpool destroy -f $TESTPOOL
  83   83  done
  84   84  
  85   85  log_pass "Exporting and importing pool with cache devices passes."
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX