]> git.proxmox.com Git - mirror_zfs.git/commitdiff
Added noexit variant for Raidz setup in ZTS tests
authorBrian Atkinson <batkinson@lanl.gov>
Fri, 4 Mar 2022 01:18:07 +0000 (18:18 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 8 Mar 2022 17:20:00 +0000 (09:20 -0800)
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 <behlendorf1@llnl.gov>
Reviewed-by: Rich Ercolani <rincebrain@gmail.com>
Signed-off-by: Brian Atkinson <batkinson@lanl.gov>
Closes #13173

tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/online_offline/setup.ksh
tests/zfs-tests/tests/functional/replacement/setup.ksh

index 0ab00453912eb04faab3329db543c6c41172ce22..3c0cd04c5e0f329bc23036b69ca492a000166d5f 100644 (file)
@@ -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
 }
 
 #
index 4132392d80a9a6c7faa3235231946a50b8cd6256..b1fb6a12389760ec35b6d5fb01ad7447039ea1f5 100755 (executable)
@@ -43,5 +43,3 @@ case $index in
        default_raidz_setup $DISKS
        ;;
 esac
-
-log_pass
index 4132392d80a9a6c7faa3235231946a50b8cd6256..b1fb6a12389760ec35b6d5fb01ad7447039ea1f5 100755 (executable)
@@ -43,5 +43,3 @@ case $index in
        default_raidz_setup $DISKS
        ;;
 esac
-
-log_pass