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_004_pos.ksh
          +++ new/usr/src/test/zfs-tests/tests/functional/rsend/rsend_004_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 incremental from fs@init to fs@final.
  37   37  #
  38   38  # STRATEGY:
  39   39  #       1. Create a set of snapshots and fill with data.
↓ 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 incremental from fs@init to fs@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 backup from pool
  60   60          #
  61   61          srclist=$(getds_with_suffix $POOL2 @final)
  62   62          interlist="$srclist $(getds_with_suffix $POOL2 @snapC)"
  63   63          interlist="$interlist $(getds_with_suffix $POOL2 @snapB)"
  64   64          interlist="$interlist $(getds_with_suffix $POOL2 @snapA)"
  65   65  
  66      -        log_must eval "$ZFS send -R -i @init $POOL2@final > " \
       66 +        log_must eval "zfs send -R -i @init $POOL2@final > " \
  67   67                  "$BACKDIR/pool-init-final-iR"
  68   68          log_must destroy_tree $interlist
  69      -        log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/pool-init-final-iR"
       69 +        log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/pool-init-final-iR"
  70   70  
  71   71          # Get current datasets with suffix @final
  72   72          dstlist=$(getds_with_suffix $POOL2 @final)
  73   73          if [[ $srclist != $dstlist ]]; then
  74   74                  log_fail "Unexpected: srclist($srclist) != dstlist($dstlist)"
  75   75          fi
  76   76          log_must cmp_ds_cont $POOL $POOL2
  77   77  fi
  78   78  
  79   79  dstds=$(get_dst_ds $POOL $POOL2)
  80   80  #
  81   81  # Testing send -R -i backup from filesystem
  82   82  #
  83      -log_must eval "$ZFS send -R -i @init $dstds/$FS@final > " \
       83 +log_must eval "zfs send -R -i @init $dstds/$FS@final > " \
  84   84          "$BACKDIR/fs-init-final-iR"
  85   85  
  86   86  srclist=$(getds_with_suffix $dstds/$FS @final)
  87   87  interlist="$srclist $(getds_with_suffix $dstds/$FS @snapC)"
  88   88  interlist="$interlist $(getds_with_suffix $dstds/$FS @snapB)"
  89   89  interlist="$interlist $(getds_with_suffix $dstds/$FS @snapA)"
  90   90  log_must destroy_tree $interlist
  91   91  if is_global_zone ; then
  92      -        log_must eval "$ZFS receive -d -F $POOL2 < $BACKDIR/fs-init-final-iR"
       92 +        log_must eval "zfs receive -d -F $POOL2 < $BACKDIR/fs-init-final-iR"
  93   93  else
  94      -        $ZFS receive -F -d $dstds/$FS < $BACKDIR/fs-init-final-iR
       94 +        zfs receive -F -d $dstds/$FS < $BACKDIR/fs-init-final-iR
  95   95  fi
  96   96  
  97   97  dstlist=$(getds_with_suffix $dstds/$FS @final)
  98   98  if [[ $srclist != $dstlist ]]; then
  99   99          log_fail "Unexpected: srclist($srclist) != dstlist($dstlist)"
 100  100  fi
 101  101  log_must cmp_ds_cont $POOL $POOL2
 102  102  
 103  103  if is_global_zone ; then
 104  104          #
 105  105          # Testing send -R -i backup from volume
 106  106          #
 107  107          srclist=$(getds_with_suffix $POOL2/$FS/vol @final)
 108      -        log_must eval "$ZFS send -R -i @init $POOL2/$FS/vol@final > " \
      108 +        log_must eval "zfs send -R -i @init $POOL2/$FS/vol@final > " \
 109  109                  "$BACKDIR/vol-init-final-iR"
 110  110          log_must destroy_tree $srclist
 111      -        log_must eval "$ZFS receive -d $POOL2 < $BACKDIR/vol-init-final-iR"
      111 +        log_must eval "zfs receive -d $POOL2 < $BACKDIR/vol-init-final-iR"
 112  112  
 113  113          dstlist=$(getds_with_suffix $POOL2/$FS/vol @final)
 114  114          if [[ $srclist != $dstlist ]]; then
 115  115                  log_fail "Unexpected: srclist($srclist) != dstlist($dstlist)"
 116  116          fi
 117  117          log_must cmp_ds_cont $POOL $POOL2
 118  118  fi
 119  119  
 120  120  log_pass "zfs send -R -i send incremental from fs@init to fs@final."
    
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX