svn commit: r353366 - head/tests/sys/cddl/zfs/tests/cli_root/zpool_add

Alan Somers asomers at FreeBSD.org
Wed Oct 9 20:16:41 UTC 2019


Author: asomers
Date: Wed Oct  9 20:16:40 2019
New Revision: 353366
URL: https://svnweb.freebsd.org/changeset/base/353366

Log:
  ZFS: fix the zpool_add_010_pos test
  
  The test is necessarily racy, because it depends on being able to complete a
  "zpool add" before a previous resilver finishes.  But it was racier than it
  needed to be.  Move the first "zpool add" to before the resilver starts.
  
  MFC after:	2 weeks
  Sponsored by:	Axcient

Modified:
  head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh

Modified: head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh
==============================================================================
--- head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh	Wed Oct  9 20:05:14 2019	(r353365)
+++ head/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_010_pos.ksh	Wed Oct  9 20:16:40 2019	(r353366)
@@ -48,8 +48,8 @@ create_pool $TESTPOOL mirror ${DISK0} ${DISK1}
 # is complete.  We don't want that to happen during this test, so write some
 # data just to slow down resilvering.
 $TIMEOUT 60s $DD if=/dev/zero of=/$TESTPOOL/zerofile bs=128k
-log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK2}
 log_must $ZPOOL add $TESTPOOL spare ${DISK3}
+log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK2}
 log_must $ZPOOL replace $TESTPOOL ${DISK0} ${DISK3}
 log_must $ZPOOL add $TESTPOOL spare ${DISK4}
 


More information about the svn-src-head mailing list