Print this page
NEX-3974 Remove timing issues so the robot can run consistently
Reviewed by: Steve Peng <steve.peng@nexenta.com>
Reviewed by: Josef Sipek <josef.sipek@nexenta.com>
Reviewed by: Alek Pinchuk <alek.pinchuk@nexenta.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh
          +++ new/usr/src/test/zfs-tests/tests/functional/bootfs/bootfs_006_pos.ksh
↓ open down ↓ 19 lines elided ↑ open up ↑
  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   29  # Copyright (c) 2012, 2016 by Delphix. All rights reserved.
       30 +# Copyright 2015 Nexenta Systems, Inc.  All rights reserved.
  30   31  #
  31   32  
  32   33  . $STF_SUITE/include/libtest.shlib
  33   34  
  34   35  #
  35   36  # DESCRIPTION:
  36   37  #
  37   38  # Pools of correct vdev types accept boot property
  38   39  #
  39   40  # STRATEGY:
↓ open down ↓ 20 lines elided ↑ open up ↑
  60   61          log_must zfs create $POOL/$TESTFS
  61   62  
  62   63          log_must zpool set bootfs=$POOL/$TESTFS $POOL
  63   64          VAL=$(zpool get bootfs $POOL | tail -1 | awk '{print $3}' )
  64   65          if [ $VAL != "$POOL/$TESTFS" ]
  65   66          then
  66   67                  log_must zpool status -v $POOL
  67   68                  log_fail \
  68   69                      "set/get failed on $POOL - expected $VAL == $POOL/$TESTFS"
  69   70          fi
  70      -        log_must zpool destroy $POOL
       71 +        log_must destroy_pool_no_force $POOL
  71   72  }
  72   73  
  73   74  function verify_no_bootfs { # $POOL
  74   75          POOL=$1
  75   76          log_must zfs create $POOL/$TESTFS
  76   77          log_mustnot zpool set bootfs=$POOL/$TESTFS $POOL
  77   78          VAL=$(zpool get bootfs $POOL | tail -1 | awk '{print $3}' )
  78   79          if [ $VAL == "$POOL/$TESTFS" ]
  79   80          then
  80   81                  log_must zpool status -v $POOL
  81   82                  log_fail "set/get unexpectedly failed $VAL != $POOL/$TESTFS"
  82   83          fi
  83      -        log_must zpool destroy $POOL
       84 +        log_must destroy_pool_no_force $POOL
  84   85  }
  85   86  
  86   87  function cleanup {
  87   88          if poolexists $TESTPOOL
  88   89          then
  89      -                log_must zpool destroy $TESTPOOL
       90 +                log_must destroy_pool_no_force $TESTPOOL
  90   91          fi
  91   92          log_must rm $VDEV1 $VDEV2 $VDEV3 $VDEV4
  92   93  }
  93   94  
  94   95  log_assert "Pools of correct vdev types accept boot property"
  95   96  
  96   97  
  97   98  
  98   99  log_onexit cleanup
  99  100  log_must mkfile $MINVDEVSIZE $VDEV1 $VDEV2 $VDEV3 $VDEV4
↓ open down ↓ 47 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX