]> granicus.if.org Git - zfs/commitdiff
Fix ZTS grow_pool/setup
authorBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 15 Aug 2017 23:40:04 +0000 (16:40 -0700)
committerTony Hutter <hutter2@llnl.gov>
Mon, 21 Aug 2017 23:41:22 +0000 (16:41 -0700)
The addition of the large_dnode_008_pos test case, which runs
right before this one, exposed some racy behavior in grow_pool
setup.sh on the Ubuntu kmemleak builder.  Before creating
partitions on a device destroying any existing ones.

  ERROR: set_partition 1  100mb loop0 exited 1

Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Giuseppe Di Natale <dinatale2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #6499
Closes #6516

tests/zfs-tests/tests/functional/grow_pool/setup.ksh

index 4c1257915d7fb84b60295079f0bb67edc6c4f386..2c0a029bd82013cfabca0a05b33f130d9452c025 100755 (executable)
@@ -40,12 +40,15 @@ fi
 
 if [[ -n $DISK ]]; then
        log_note "No spare disks available. Using slices on $DISK"
+       log_must zero_partitions $DISK
        for i in $SLICE0 $SLICE1 ; do
                log_must set_partition $i "$cyl" $SIZE $DISK
                cyl=$(get_endslice $DISK $i)
        done
        tmp=$DISK"s"$SLICE0
 else
+       log_must zero_partitions $DISK0
+       log_must zero_partitions $DISK1
        log_must set_partition $SLICE "" $SIZE $DISK0
        log_must set_partition $SLICE "" $SIZE $DISK1
        tmp=$DISK0$SLICE_PREFIX$SLICE