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/rsend/rsend_005_pos.ksh
          +++ new/usr/src/test/zfs-tests/tests/functional/rsend/rsend_005_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 2008 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/rsend/rsend.kshlib
  33   33  
  34   34  #
  35   35  # DESCRIPTION:
  36   36  #       zfs send -R -I send all the incremental between fs@init with fs@final
  37   37  #
  38   38  # STRATEGY:
  39   39  #       1. Setup test model
↓ open down ↓ 4 lines elided ↑ open up ↑
  44   44  #
  45   45  
  46   46  verify_runnable "both"
  47   47  
  48   48  log_assert "zfs send -R -I send all the incremental between @init with @final"
  49   49  log_onexit cleanup_pool $POOL2
  50   50  
  51   51  #
  52   52  # Duplicate POOL2 for testing
  53   53  #
  54      -log_must eval "$ZFS send -R $POOL@final > $BACKDIR/pool-final-R"
  55      -log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-final-R"
       54 +log_must eval "zfs send -R $POOL@final > $BACKDIR/pool-final-R"
       55 +log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/pool-final-R"
  56   56  
  57   57  if is_global_zone ; then
  58   58          #
  59   59          # Testing send -R -I from pool
  60   60          #
  61      -        log_must eval "$ZFS send -R -I @init $POOL2@final > " \
       61 +        log_must eval "zfs send -R -I @init $POOL2@final > " \
  62   62                  "$BACKDIR/pool-init-final-IR"
  63   63          list=$(getds_with_suffix $POOL2 @snapA)
  64   64          list="$list $(getds_with_suffix $POOL2 @snapB)"
  65   65          list="$list $(getds_with_suffix $POOL2 @snapC)"
  66   66          list="$list $(getds_with_suffix $POOL2 @final)"
  67   67          log_must destroy_tree $list
  68      -        log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-init-final-IR"
       68 +        log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/pool-init-final-IR"
  69   69          log_must cmp_ds_cont $POOL $POOL2
  70   70  fi
  71   71  
  72   72  dstds=$(get_dst_ds $POOL $POOL2)
  73   73  #
  74   74  # Testing send -R -I from filesystem
  75   75  #
  76      -log_must eval "$ZFS send -R -I @init $dstds/$FS@final > " \
       76 +log_must eval "zfs send -R -I @init $dstds/$FS@final > " \
  77   77          "$BACKDIR/fs-init-final-IR"
  78   78  list=$(getds_with_suffix $dstds/$FS @snapA)
  79   79  list="$list $(getds_with_suffix $dstds/$FS @snapB)"
  80   80  list="$list $(getds_with_suffix $dstds/$FS @snapC)"
  81   81  list="$list $(getds_with_suffix $dstds/$FS @final)"
  82   82  log_must destroy_tree $list
  83   83  if is_global_zone ; then
  84      -        log_must eval "$ZFS receive -d -F $dstds < $BACKDIR/fs-init-final-IR"
       84 +        log_must eval "zfs receive -d -F $dstds < $BACKDIR/fs-init-final-IR"
  85   85  else
  86      -        $ZFS receive -d -F $dstds < $BACKDIR/fs-init-final-IR
       86 +        zfs receive -d -F $dstds < $BACKDIR/fs-init-final-IR
  87   87  fi
  88   88  log_must cmp_ds_subs $POOL $dstds
  89   89  log_must cmp_ds_cont $POOL $dstds
  90   90  
  91   91  if is_global_zone ; then
  92   92          #
  93   93          # Testing send -I -R for volume
  94   94          #
  95   95          vol=$POOL2/$FS/vol
  96      -        log_must eval "$ZFS send -R -I @init $vol@final > " \
       96 +        log_must eval "zfs send -R -I @init $vol@final > " \
  97   97                  "$BACKDIR/vol-init-final-IR"
  98   98          log_must destroy_tree $vol@snapB $vol@snapC $vol@final
  99      -        log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/vol-init-final-IR"
       99 +        log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/vol-init-final-IR"
 100  100          log_must cmp_ds_subs $POOL $POOL2
 101  101          log_must cmp_ds_cont $POOL $POOL2
 102  102  fi
 103  103  
 104  104  log_pass "zfs send -R -I send all the incremental between @init with @final"
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX