From 0989d798fa347b87a34607d1fd7b94a1121cf2ad Mon Sep 17 00:00:00 2001 From: Christian Schwarz Date: Mon, 24 May 2021 22:57:29 +0200 Subject: [PATCH] ZTS: remove verify_slog_support helper verify_slog_support no longer applies to ZFS since slog support is always available. Reviewed-by: Brian Behlendorf Reviewed-by: John Kennedy Signed-off-by: Christian Schwarz Closes #12092 --- tests/zfs-tests/include/libtest.shlib | 32 +++---------------- .../pool_names/pool_names_002_neg.ksh | 6 ++-- .../tests/functional/slog/cleanup.ksh | 4 --- .../zfs-tests/tests/functional/slog/setup.ksh | 4 --- 4 files changed, 7 insertions(+), 39 deletions(-) diff --git a/tests/zfs-tests/include/libtest.shlib b/tests/zfs-tests/include/libtest.shlib index 08c29c25fa..5a360bd5e7 100644 --- a/tests/zfs-tests/include/libtest.shlib +++ b/tests/zfs-tests/include/libtest.shlib @@ -1897,13 +1897,11 @@ function zfs_zones_setup #zone_name zone_root zone_ip block_device_wait # - # If current system support slog, add slog device for pool + # Add slog device for pool # - if verify_slog_support ; then - typeset sdevs="$TEST_BASE_DIR/sdev1 $TEST_BASE_DIR/sdev2" - log_must mkfile $MINVDEVSIZE $sdevs - log_must zpool add $pool_name log mirror $sdevs - fi + typeset sdevs="$TEST_BASE_DIR/sdev1 $TEST_BASE_DIR/sdev2" + log_must mkfile $MINVDEVSIZE $sdevs + log_must zpool add $pool_name log mirror $sdevs # this isn't supported just yet. # Create a filesystem. In order to add this to @@ -3067,28 +3065,6 @@ function random_get _random_get "$#" "$@" } -# -# Detect if the current system support slog -# -function verify_slog_support -{ - typeset dir=$TEST_BASE_DIR/disk.$$ - typeset pool=foo.$$ - typeset vdev=$dir/a - typeset sdev=$dir/b - - mkdir -p $dir - mkfile $MINVDEVSIZE $vdev $sdev - - typeset -i ret=0 - if ! zpool create -n $pool $vdev log $sdev > /dev/null 2>&1; then - ret=1 - fi - rm -r $dir - - return $ret -} - # # The function will generate a dataset name with specific length # $1, the length of the name diff --git a/tests/zfs-tests/tests/functional/pool_names/pool_names_002_neg.ksh b/tests/zfs-tests/tests/functional/pool_names/pool_names_002_neg.ksh index 0b40f7cd27..4b6744563d 100755 --- a/tests/zfs-tests/tests/functional/pool_names/pool_names_002_neg.ksh +++ b/tests/zfs-tests/tests/functional/pool_names/pool_names_002_neg.ksh @@ -111,9 +111,9 @@ set -A POOLNAME \ "2222222222222222222" "mirror_pool" "raidz_pool" \ "mirror-pool" "raidz-pool" "spare" "spare_pool" \ "spare-pool" "raidz1-" "raidz2:" ":aaa" "-bbb" "_ccc" ".ddd" -if verify_slog_support ; then - POOLNAME[${#POOLNAME[@]}]='log' -fi + +POOLNAME[${#POOLNAME[@]}]='log' + typeset -i i=0 while ((i < ${#POOLNAME[@]})); do log_mustnot zpool create -m $TESTDIR ${POOLNAME[$i]} $DISK diff --git a/tests/zfs-tests/tests/functional/slog/cleanup.ksh b/tests/zfs-tests/tests/functional/slog/cleanup.ksh index ac301f386f..92bc4aa59d 100755 --- a/tests/zfs-tests/tests/functional/slog/cleanup.ksh +++ b/tests/zfs-tests/tests/functional/slog/cleanup.ksh @@ -34,10 +34,6 @@ verify_runnable "global" -if ! verify_slog_support ; then - log_unsupported "This system doesn't support separate intent logs" -fi - if datasetexists $TESTPOOL ; then log_must zpool destroy -f $TESTPOOL fi diff --git a/tests/zfs-tests/tests/functional/slog/setup.ksh b/tests/zfs-tests/tests/functional/slog/setup.ksh index 8e8d214d82..4278fc6978 100755 --- a/tests/zfs-tests/tests/functional/slog/setup.ksh +++ b/tests/zfs-tests/tests/functional/slog/setup.ksh @@ -34,8 +34,4 @@ verify_runnable "global" -if ! verify_slog_support ; then - log_unsupported "This system doesn't support separate intent logs" -fi - log_pass