aboutsummaryrefslogtreecommitdiffstats
path: root/tests/zfs-tests
diff options
context:
space:
mode:
authorBrian Atkinson <[email protected]>2022-03-03 18:18:07 -0700
committerBrian Behlendorf <[email protected]>2022-03-08 09:20:00 -0800
commit1b609d4b035930a044bf9133b4c9dcf172b3c101 (patch)
treef242004285c10868a6c27d69270128e726dfb90e /tests/zfs-tests
parent6df43169b30985ce7d9df11d25093dec26829d2c (diff)
Added noexit variant for Raidz setup in ZTS tests
The regular default_raidz_setup function in the ZFS test suite called log_pass after creating the zpool. However, with compression now being on by default 56fa4aa, there is no way to turn compression off in the setup.ksh scripts when creating a raidz VDEV. The addition of the function default_raidz_setup_noexit allows for a raidz VDEV to be created, additional zfs property settings to be applied and for the setup.ksh script itself to call log_pass. With the addition of default_raidz_setup_noexit some stray log_pass calls were removed from any setup.ksh scripts that call default_raidz_setup. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Rich Ercolani <[email protected]> Signed-off-by: Brian Atkinson <[email protected]> Closes #13173
Diffstat (limited to 'tests/zfs-tests')
-rw-r--r--tests/zfs-tests/include/libtest.shlib11
-rwxr-xr-xtests/zfs-tests/tests/functional/online_offline/setup.ksh2
-rwxr-xr-xtests/zfs-tests/tests/functional/replacement/setup.ksh2
3 files changed, 8 insertions, 7 deletions
diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib
index 0ab004539..3c0cd04c5 100644
--- a/tests/zfs-tests/include/libtest.shlib
+++ b/tests/zfs-tests/include/libtest.shlib
@@ -545,11 +545,18 @@ function destroy_mirrors
log_pass
}
+function default_raidz_setup
+{
+ default_raidz_setup_noexit "$*"
+
+ log_pass
+}
+
#
# Given a minimum of two disks, set up a storage pool and dataset for the raid-z
# $1 the list of disks
#
-function default_raidz_setup
+function default_raidz_setup_noexit
{
typeset disklist="$*"
disks=(${disklist[*]})
@@ -562,8 +569,6 @@ function default_raidz_setup
log_must zpool create -f $TESTPOOL raidz $disklist
log_must zfs create $TESTPOOL/$TESTFS
log_must zfs set mountpoint=$TESTDIR $TESTPOOL/$TESTFS
-
- log_pass
}
#
diff --git a/tests/zfs-tests/tests/functional/online_offline/setup.ksh b/tests/zfs-tests/tests/functional/online_offline/setup.ksh
index 4132392d8..b1fb6a123 100755
--- a/tests/zfs-tests/tests/functional/online_offline/setup.ksh
+++ b/tests/zfs-tests/tests/functional/online_offline/setup.ksh
@@ -43,5 +43,3 @@ case $index in
default_raidz_setup $DISKS
;;
esac
-
-log_pass
diff --git a/tests/zfs-tests/tests/functional/replacement/setup.ksh b/tests/zfs-tests/tests/functional/replacement/setup.ksh
index 4132392d8..b1fb6a123 100755
--- a/tests/zfs-tests/tests/functional/replacement/setup.ksh
+++ b/tests/zfs-tests/tests/functional/replacement/setup.ksh
@@ -43,5 +43,3 @@ case $index in
default_raidz_setup $DISKS
;;
esac
-
-log_pass