Page MenuHomeFreeBSD

D37257.id112602.diff
No OneTemporary

D37257.id112602.diff

diff --git a/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_005_pos.ksh b/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_005_pos.ksh
--- a/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_005_pos.ksh
+++ b/tests/sys/cddl/zfs/tests/cli_root/zpool_add/zpool_add_005_pos.ksh
@@ -61,9 +61,6 @@
verify_runnable "global"
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
-bug_241070_is_fixed=false
-
set_disks
function cleanup
@@ -73,12 +70,9 @@
poolexists "$TESTPOOL1" && \
destroy_pool "$TESTPOOL1"
- if $bug_241070_is_fixed; then
- log_must $DUMPON -r $dump_dev
- fi
-
- log_must $UMOUNT $TMPDIR/mounted_dir
- log_must $SWAPOFF $swap_dev
+ log_onfail $UMOUNT $TMPDIR/mounted_dir
+ log_onfail $SWAPOFF $swap_dev
+ log_onfail $DUMPON -r $dump_dev
}
log_assert "'zpool add' should fail with inapplicable scenarios."
@@ -100,9 +94,7 @@
log_must $SWAPON $swap_dev
dump_dev=${DISK4}
-if $bug_241070_is_fixed; then
- log_must $DUMPON $dump_dev
-fi
+log_must $DUMPON $dump_dev
log_mustnot $ZPOOL add -f "$TESTPOOL" ${DISK1}
@@ -110,8 +102,8 @@
log_mustnot $ZPOOL add -f "$TESTPOOL" $swap_dev
-if $bug_241070_is_fixed; then
- log_mustnot $ZPOOL add -f "$TESTPOOL" $dump_dev
-fi
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
+# When that bug is fixed, change this to log_mustnot.
+log_must $ZPOOL add -f "$TESTPOOL" $dump_dev
log_pass "'zpool add' should fail with inapplicable scenarios."
diff --git a/tests/sys/cddl/zfs/tests/hotspare/hotspare_add_003_neg.ksh b/tests/sys/cddl/zfs/tests/hotspare/hotspare_add_003_neg.ksh
--- a/tests/sys/cddl/zfs/tests/hotspare/hotspare_add_003_neg.ksh
+++ b/tests/sys/cddl/zfs/tests/hotspare/hotspare_add_003_neg.ksh
@@ -65,9 +65,6 @@
verify_runnable "global"
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
-bug_241070_is_fixed=false
-
function cleanup
{
poolexists "$TESTPOOL" && \
@@ -75,12 +72,9 @@
poolexists "$TESTPOOL1" && \
destroy_pool "$TESTPOOL1"
- if $bug_241070_is_fixed; then
- log_must $DUMPON -r $dump_dev
- fi
-
- log_must $UMOUNT $TMPDIR/mounted_dir
- log_must $SWAPOFF $swap_dev
+ log_onfail $UMOUNT $TMPDIR/mounted_dir
+ log_onfail $SWAPOFF $swap_dev
+ log_onfail $DUMPON -r $dump_dev
partition_cleanup
}
@@ -108,15 +102,12 @@
log_must $SWAPON $swap_dev
-if $bug_241070_is_fixed; then
- log_must $DUMPON $dump_dev
-fi
+log_must $DUMPON $dump_dev
# - nonexistent device,
# - part of an active pool,
# - currently mounted,
# - a swap device,
-# - a dump device,
# - identical with the basic or spares vdev within the pool,
set -A arg "$nonexist_dev" \
@@ -124,8 +115,6 @@
"${pooldevs[1]}" \
"$mounted_dev" \
"$swap_dev"
- # if $bug_241070_is_fixed
- #"$dump_dev"
typeset -i i=0
while (( i < ${#arg[*]} )); do
@@ -136,6 +125,12 @@
(( i = i + 1 ))
done
+# - a dump device,
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
+# When that bug is fixed, add $dump_dev to $arg and remove this block.
+log_must $ZPOOL add $TESTPOOL spare ${dump_dev}
+log_must $ZPOOL add -f $TESTPOOL spare ${dump_dev}
+
# - belong to a exported or potentially active ZFS pool,
log_must $ZPOOL export $TESTPOOL1
diff --git a/tests/sys/cddl/zfs/tests/hotspare/hotspare_create_001_neg.ksh b/tests/sys/cddl/zfs/tests/hotspare/hotspare_create_001_neg.ksh
--- a/tests/sys/cddl/zfs/tests/hotspare/hotspare_create_001_neg.ksh
+++ b/tests/sys/cddl/zfs/tests/hotspare/hotspare_create_001_neg.ksh
@@ -65,9 +65,6 @@
verify_runnable "global"
-# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
-bug_241070_is_fixed=false
-
function cleanup
{
for pool in $TESTPOOL $TESTPOOL1
@@ -75,12 +72,9 @@
destroy_pool $pool
done
- if $bug_241070_is_fixed; then
- log_must $DUMPON -r $dump_dev
- fi
-
- log_must $UMOUNT $TMPDIR/mounted_dir
- log_must $SWAPOFF $swap_dev
+ log_onfail $UMOUNT $TMPDIR/mounted_dir
+ log_onfail $SWAPOFF $swap_dev
+ log_onfail $DUMPON -r $dump_dev
partition_cleanup
}
@@ -104,12 +98,7 @@
log_must $SWAPON $swap_dev
-if $bug_241070_is_fixed; then
- # create/destroy a pool as a simple way to set the partitioning
- # back to something normal so we can use this $disk as a dump device
- cleanup_devices $dump_dev
- log_must $DUMPON $dump_dev
-fi
+log_must $DUMPON $dump_dev
#
# Set up the testing scenarios parameters
@@ -118,7 +107,6 @@
# - part of an active pool,
# - currently mounted,
# - a swap device,
-# - a dump device,
# - identical with the basic vdev within the pool,
set -A arg "$TESTPOOL ${pooldevs[1]} spare ${pooldevs[2]}" \
@@ -127,8 +115,6 @@
"$TESTPOOL1 ${pooldevs[1]} spare $mounted_dev" \
"$TESTPOOL1 ${pooldevs[1]} spare $swap_dev" \
"$TESTPOOL1 ${pooldevs[1]} spare ${pooldevs[1]}"
- # if $bug_241070_is_fixed
- #"$TESTPOOL1 ${pooldevs[1]} spare $dump_dev"
typeset -i i=0
while (( i < ${#arg[*]} )); do
@@ -137,6 +123,12 @@
(( i = i + 1 ))
done
+# - a dump device,
+# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241070
+# When that bug is fixed, add $dump_dev to $arg and remove this block.
+log_must $ZPOOL create "$TESTPOOL1 ${pooldevs[1]} spare $dump_dev"
+log_must $ZPOOL create -f "$TESTPOOL1 ${pooldevs[1]} spare $dump_dev"
+
# now destroy the pool to be polite
log_must $ZPOOL destroy -f $TESTPOOL

File Metadata

Mime Type
text/plain
Expires
Mon, Jan 20, 11:58 PM (15 h, 24 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15989276
Default Alt Text
D37257.id112602.diff (5 KB)

Event Timeline