ZTS: Catalog tunable names for tests in tunables.cfg

Update tests to use the variables for tunable names.

Reviewed-by: John Kennedy <john.kennedy@delphix.com>
Reviewed-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Reviewed-by: George Melikov <mail@gmelikov.ru>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ryan Moeller <ryan@ixsystems.com>
Closes #9831
This commit is contained in:
Ryan Moeller
2020-01-14 17:57:28 -05:00
committed by Brian Behlendorf
parent 61152d1069
commit 2476f10306
85 changed files with 434 additions and 366 deletions
@@ -49,23 +49,23 @@ function cleanup
log_must rm -f $TRIM_VDEVS
log_must set_tunable64 zfs_trim_extent_bytes_min $trim_extent_bytes_min
log_must set_tunable64 zfs_trim_txg_batch $trim_txg_batch
log_must set_tunable64 zfs_vdev_min_ms_count $vdev_min_ms_count
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN $trim_extent_bytes_min
log_must set_tunable64 TRIM_TXG_BATCH $trim_txg_batch
log_must set_tunable64 VDEV_MIN_MS_COUNT $vdev_min_ms_count
}
log_onexit cleanup
# Minimum trim size is decreased to verify all trim sizes.
typeset trim_extent_bytes_min=$(get_tunable zfs_trim_extent_bytes_min)
log_must set_tunable64 zfs_trim_extent_bytes_min 4096
typeset trim_extent_bytes_min=$(get_tunable TRIM_EXTENT_BYTES_MIN)
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN 4096
# Reduced zfs_trim_txg_batch to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable zfs_trim_txg_batch)
log_must set_tunable64 zfs_trim_txg_batch 8
# Reduced TRIM_TXG_BATCH to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable TRIM_TXG_BATCH)
log_must set_tunable64 TRIM_TXG_BATCH 8
# Increased metaslabs to better simulate larger more realistic devices.
typeset vdev_min_ms_count=$(get_tunable zfs_vdev_min_ms_count)
log_must set_tunable64 zfs_vdev_min_ms_count 32
typeset vdev_min_ms_count=$(get_tunable VDEV_MIN_MS_COUNT)
log_must set_tunable64 VDEV_MIN_MS_COUNT 32
typeset VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.75 / 1024 / 1024) ))
typeset VDEV_MIN_MB=$(( floor(4 * MINVDEVSIZE * 0.30 / 1024 / 1024) ))
@@ -47,18 +47,18 @@ function cleanup
log_must rm -f $TRIM_VDEVS
log_must set_tunable64 zfs_trim_extent_bytes_min $trim_extent_bytes_min
log_must set_tunable64 zfs_trim_txg_batch $trim_txg_batch
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN $trim_extent_bytes_min
log_must set_tunable64 TRIM_TXG_BATCH $trim_txg_batch
}
log_onexit cleanup
# Minimum trim size is decreased to verify all trim sizes.
typeset trim_extent_bytes_min=$(get_tunable zfs_trim_extent_bytes_min)
log_must set_tunable64 zfs_trim_extent_bytes_min 4096
typeset trim_extent_bytes_min=$(get_tunable TRIM_EXTENT_BYTES_MIN)
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN 4096
# Reduced zfs_trim_txg_batch to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable zfs_trim_txg_batch)
log_must set_tunable64 zfs_trim_txg_batch 8
# Reduced TRIM_TXG_BATCH to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable TRIM_TXG_BATCH)
log_must set_tunable64 TRIM_TXG_BATCH 8
for type in "" "mirror" "raidz" "raidz2" "raidz3"; do
log_must truncate -s 1G $TRIM_VDEVS
@@ -48,18 +48,18 @@ function cleanup
log_must rm -f $TRIM_VDEVS
log_must set_tunable64 zfs_trim_extent_bytes_min $trim_extent_bytes_min
log_must set_tunable64 zfs_trim_txg_batch $trim_txg_batch
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN $trim_extent_bytes_min
log_must set_tunable64 TRIM_TXG_BATCH $trim_txg_batch
}
log_onexit cleanup
# Minimum trim size is decreased to verify all trim sizes.
typeset trim_extent_bytes_min=$(get_tunable zfs_trim_extent_bytes_min)
log_must set_tunable64 zfs_trim_extent_bytes_min 4096
typeset trim_extent_bytes_min=$(get_tunable TRIM_EXTENT_BYTES_MIN)
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN 4096
# Reduced zfs_trim_txg_batch to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable zfs_trim_txg_batch)
log_must set_tunable64 zfs_trim_txg_batch 8
# Reduced TRIM_TXG_BATCH to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable TRIM_TXG_BATCH)
log_must set_tunable64 TRIM_TXG_BATCH 8
for type in "" "mirror" "raidz" "raidz2" "raidz3"; do
log_must truncate -s 1G $TRIM_VDEVS
@@ -49,23 +49,23 @@ function cleanup
log_must rm -f $TRIM_VDEVS
log_must set_tunable64 zfs_trim_extent_bytes_min $trim_extent_bytes_min
log_must set_tunable64 zfs_trim_txg_batch $trim_txg_batch
log_must set_tunable64 zfs_vdev_min_ms_count $vdev_min_ms_count
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN $trim_extent_bytes_min
log_must set_tunable64 TRIM_TXG_BATCH $trim_txg_batch
log_must set_tunable64 VDEV_MIN_MS_COUNT $vdev_min_ms_count
}
log_onexit cleanup
# Minimum trim size is decreased to verify all trim sizes.
typeset trim_extent_bytes_min=$(get_tunable zfs_trim_extent_bytes_min)
log_must set_tunable64 zfs_trim_extent_bytes_min 4096
typeset trim_extent_bytes_min=$(get_tunable TRIM_EXTENT_BYTES_MIN)
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN 4096
# Reduced zfs_trim_txg_batch to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable zfs_trim_txg_batch)
log_must set_tunable64 zfs_trim_txg_batch 8
# Reduced TRIM_TXG_BATCH to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable TRIM_TXG_BATCH)
log_must set_tunable64 TRIM_TXG_BATCH 8
# Increased metaslabs to better simulate larger more realistic devices.
typeset vdev_min_ms_count=$(get_tunable zfs_vdev_min_ms_count)
log_must set_tunable64 zfs_vdev_min_ms_count 32
typeset vdev_min_ms_count=$(get_tunable VDEV_MIN_MS_COUNT)
log_must set_tunable64 VDEV_MIN_MS_COUNT 32
typeset VDEV_MAX_MB=$(( floor(4 * MINVDEVSIZE * 0.75 / 1024 / 1024) ))
typeset VDEV_MIN_MB=$(( floor(4 * MINVDEVSIZE * 0.30 / 1024 / 1024) ))
@@ -47,18 +47,18 @@ function cleanup
log_must rm -f $TRIM_VDEVS
log_must set_tunable64 zfs_trim_extent_bytes_min $trim_extent_bytes_min
log_must set_tunable64 zfs_trim_txg_batch $trim_txg_batch
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN $trim_extent_bytes_min
log_must set_tunable64 TRIM_TXG_BATCH $trim_txg_batch
}
log_onexit cleanup
# Minimum trim size is decreased to verify all trim sizes.
typeset trim_extent_bytes_min=$(get_tunable zfs_trim_extent_bytes_min)
log_must set_tunable64 zfs_trim_extent_bytes_min 4096
typeset trim_extent_bytes_min=$(get_tunable TRIM_EXTENT_BYTES_MIN)
log_must set_tunable64 TRIM_EXTENT_BYTES_MIN 4096
# Reduced zfs_trim_txg_batch to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable zfs_trim_txg_batch)
log_must set_tunable64 zfs_trim_txg_batch 8
# Reduced TRIM_TXG_BATCH to make trimming more frequent.
typeset trim_txg_batch=$(get_tunable TRIM_TXG_BATCH)
log_must set_tunable64 TRIM_TXG_BATCH 8
for type in "" "mirror" "raidz" "raidz2" "raidz3"; do
log_must truncate -s 1G $TRIM_VDEVS