mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-24 03:08:51 +03:00
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:
committed by
Brian Behlendorf
parent
61152d1069
commit
2476f10306
@@ -5,6 +5,7 @@ dist_pkgdata_DATA = \
|
||||
libtest.shlib \
|
||||
math.shlib \
|
||||
properties.shlib \
|
||||
tunables.cfg \
|
||||
zpool_script.shlib
|
||||
|
||||
EXTRA_DIST = default.cfg.in
|
||||
|
||||
@@ -34,6 +34,8 @@
|
||||
. ${STF_SUITE}/include/math.shlib
|
||||
. ${STF_SUITE}/include/blkdev.shlib
|
||||
|
||||
. ${STF_SUITE}/include/tunables.cfg
|
||||
|
||||
#
|
||||
# Apply constrained path when available. This is required since the
|
||||
# PATH may have been modified by sudo's secure_path behavior.
|
||||
@@ -3713,7 +3715,7 @@ function swap_cleanup
|
||||
#
|
||||
# Set a global system tunable (64-bit value)
|
||||
#
|
||||
# $1 tunable name
|
||||
# $1 tunable name (use a NAME defined in tunables.cfg)
|
||||
# $2 tunable values
|
||||
#
|
||||
function set_tunable64
|
||||
@@ -3724,7 +3726,7 @@ function set_tunable64
|
||||
#
|
||||
# Set a global system tunable (32-bit value)
|
||||
#
|
||||
# $1 tunable name
|
||||
# $1 tunable name (use a NAME defined in tunables.cfg)
|
||||
# $2 tunable values
|
||||
#
|
||||
function set_tunable32
|
||||
@@ -3734,12 +3736,23 @@ function set_tunable32
|
||||
|
||||
function set_tunable_impl
|
||||
{
|
||||
typeset tunable="$1"
|
||||
typeset name="$1"
|
||||
typeset value="$2"
|
||||
typeset mdb_cmd="$3"
|
||||
typeset module="${4:-zfs}"
|
||||
|
||||
[[ -z "$tunable" ]] && return 1
|
||||
eval "typeset tunable=\$$name"
|
||||
case "$tunable" in
|
||||
UNSUPPORTED)
|
||||
log_unsupported "Tunable '$name' is unsupported on $(uname)"
|
||||
;;
|
||||
"")
|
||||
log_fail "Tunable '$name' must be added to tunables.cfg"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
[[ -z "$value" ]] && return 1
|
||||
[[ -z "$mdb_cmd" ]] && return 1
|
||||
|
||||
@@ -3765,7 +3778,7 @@ function set_tunable_impl
|
||||
#
|
||||
# Get a global system tunable
|
||||
#
|
||||
# $1 tunable name
|
||||
# $1 tunable name (use a NAME defined in tunables.cfg)
|
||||
#
|
||||
function get_tunable
|
||||
{
|
||||
@@ -3774,10 +3787,20 @@ function get_tunable
|
||||
|
||||
function get_tunable_impl
|
||||
{
|
||||
typeset tunable="$1"
|
||||
typeset name="$1"
|
||||
typeset module="${2:-zfs}"
|
||||
|
||||
[[ -z "$tunable" ]] && return 1
|
||||
eval "typeset tunable=\$$name"
|
||||
case "$tunable" in
|
||||
UNSUPPORTED)
|
||||
log_unsupported "Tunable '$name' is unsupported on $(uname)"
|
||||
;;
|
||||
"")
|
||||
log_fail "Tunable '$name' must be added to tunables.cfg"
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$(uname)" in
|
||||
Linux)
|
||||
|
||||
@@ -0,0 +1,81 @@
|
||||
# This file exports variables for each tunable used in the test suite.
|
||||
#
|
||||
# Different platforms use different names for most tunables. To avoid littering
|
||||
# the tests with conditional logic for deciding how to set each tunable, the
|
||||
# logic is instead consolidated to this one file.
|
||||
#
|
||||
# Any use of tunables in tests must use a name defined here. New entries
|
||||
# should be added to the table as needed. Please keep the table sorted
|
||||
# alphabetically for ease of maintenance.
|
||||
#
|
||||
# Platform-specific tunables should still use a NAME from this table for
|
||||
# consistency. Enter UNSUPPORTED in the column for platforms on which the
|
||||
# tunable is not implemented.
|
||||
|
||||
UNAME=$(uname)
|
||||
|
||||
# NAME FreeBSD tunable Linux tunable
|
||||
cat <<%%%% |
|
||||
ADMIN_SNAPSHOT UNSUPPORTED zfs_admin_snapshot
|
||||
ALLOW_REDACTED_DATASET_MOUNT allow_redacted_dataset_mount zfs_allow_redacted_dataset_mount
|
||||
ARC_MAX arc.max zfs_arc_max
|
||||
ARC_MIN arc.min zfs_arc_min
|
||||
ASYNC_BLOCK_MAX_BLOCKS async_block_max_blocks zfs_async_block_max_blocks
|
||||
CHECKSUM_EVENTS_PER_SECOND checksum_events_per_second zfs_checksum_events_per_second
|
||||
COMMIT_TIMEOUT_PCT commit_timeout_pct zfs_commit_timeout_pct
|
||||
COMPRESSED_ARC_ENABLED compressed_arc_enabled zfs_compressed_arc_enabled
|
||||
CONDENSE_INDIRECT_COMMIT_ENTRY_DELAY_MS condense.indirect_commit_entry_delay_ms zfs_condense_indirect_commit_entry_delay_ms
|
||||
CONDENSE_MIN_MAPPING_BYTES condense.min_mapping_bytes zfs_condense_min_mapping_bytes
|
||||
DBUF_CACHE_MAX_BYTES dbuf_cache.max_bytes dbuf_cache_max_bytes
|
||||
DEADMAN_CHECKTIME_MS deadman_checktime_ms zfs_deadman_checktime_ms
|
||||
DEADMAN_FAILMODE deadman_failmode zfs_deadman_failmode
|
||||
DEADMAN_SYNCTIME_MS deadman_synctime_ms zfs_deadman_synctime_ms
|
||||
DEADMAN_ZIOTIME_MS deadman_ziotime_ms zfs_deadman_ziotime_ms
|
||||
DISABLE_IVSET_GUID_CHECK UNSUPPORTED zfs_disable_ivset_guid_check
|
||||
INITIALIZE_CHUNK_SIZE initialize_chunk_size zfs_initialize_chunk_size
|
||||
INITIALIZE_VALUE initialize_value zfs_initialize_value
|
||||
KEEP_LOG_SPACEMAPS_AT_EXPORT keep_log_spacemaps_at_export zfs_keep_log_spacemaps_at_export
|
||||
LIVELIST_CONDENSE_NEW_ALLOC livelist.condense.new_alloc zfs_livelist_condense_new_alloc
|
||||
LIVELIST_CONDENSE_SYNC_CANCEL livelist.condense.sync_cancel zfs_livelist_condense_sync_cancel
|
||||
LIVELIST_CONDENSE_SYNC_PAUSE livelist.condense.sync_pause zfs_livelist_condense_sync_pause
|
||||
LIVELIST_CONDENSE_ZTHR_CANCEL livelist.condense.zthr_cancel zfs_livelist_condense_zthr_cancel
|
||||
LIVELIST_CONDENSE_ZTHR_PAUSE livelist.condense.zthr_pause zfs_livelist_condense_zthr_pause
|
||||
LIVELIST_MAX_ENTRIES livelist.max_entries zfs_livelist_max_entries
|
||||
LIVELIST_MIN_PERCENT_SHARED livelist.min_percent_shared zfs_livelist_min_percent_shared
|
||||
MAX_DATASET_NESTING max_dataset_nesting zfs_max_dataset_nesting
|
||||
MAX_MISSING_TVDS max_missing_tvds zfs_max_missing_tvds
|
||||
METASLAB_DEBUG_LOAD metaslab.debug_load metaslab_debug_load
|
||||
METASLAB_FORCE_GANGING metaslab.force_ganging metaslab_force_ganging
|
||||
MULTIHOST_FAIL_INTERVALS multihost.fail_intervals zfs_multihost_fail_intervals
|
||||
MULTIHOST_HISTORY UNSUPPORTED zfs_multihost_history
|
||||
MULTIHOST_IMPORT_INTERVALS multihost.import_intervals zfs_multihost_import_intervals
|
||||
MULTIHOST_INTERVAL UNSUPPORTED zfs_multihost_interval
|
||||
OVERRIDE_ESTIMATE_RECORDSIZE send.override_estimate_recordsize zfs_override_estimate_recordsize
|
||||
REMOVAL_SUSPEND_PROGRESS removal_suspend_progress zfs_removal_suspend_progress
|
||||
REMOVE_MAX_SEGMENT remove_max_segment zfs_remove_max_segment
|
||||
RESILVER_MIN_TIME_MS resilver_min_time_ms zfs_resilver_min_time_ms
|
||||
SCAN_SUSPEND_PROGRESS scan_suspend_progress zfs_scan_suspend_progress
|
||||
SCAN_VDEV_LIMIT scan_vdev_limit zfs_scan_vdev_limit
|
||||
SEND_HOLES_WITHOUT_BIRTH_TIME send_holes_without_birth_time send_holes_without_birth_time
|
||||
SLOW_IO_EVENTS_PER_SECOND slow_io_events_per_second zfs_slow_io_events_per_second
|
||||
SPA_ASIZE_INFLATION spa.asize_inflation spa_asize_inflation
|
||||
SPA_DISCARD_MEMORY_LIMIT spa.discard_memory_limit zfs_spa_discard_memory_limit
|
||||
SPA_LOAD_VERIFY_DATA spa.load_verify_data spa_load_verify_data
|
||||
SPA_LOAD_VERIFY_METADATA spa.load_verify_metadata spa_load_verify_metadata
|
||||
TRIM_EXTENT_BYTES_MIN trim.extent_bytes_min zfs_trim_extent_bytes_min
|
||||
TRIM_METASLAB_SKIP trim.metaslab_skip zfs_trim_metaslab_skip
|
||||
TRIM_TXG_BATCH trim.txg_batch zfs_trim_txg_batch
|
||||
TXG_HISTORY UNSUPPORTED zfs_txg_history
|
||||
TXG_TIMEOUT txg_timeout zfs_txg_timeout
|
||||
UNLINK_SUSPEND_PROGRESS UNSUPPORTED zfs_unlink_suspend_progress
|
||||
VDEV_MIN_MS_COUNT vdev.min_ms_count zfs_vdev_min_ms_count
|
||||
VDEV_VALIDATE_SKIP vdev.validate_skip vdev_validate_skip
|
||||
VOL_INHIBIT_DEV UNSUPPORTED zvol_inhibit_dev
|
||||
VOL_MODE vol.mode zvol_volmode
|
||||
VOL_RECURSIVE vol.recursive UNSUPPORTED
|
||||
ZEVENT_LEN_MAX UNSUPPORTED zfs_zevent_len_max
|
||||
ZIO_SLOW_IO_MS zio.slow_io_ms zio_slow_io_ms
|
||||
%%%%
|
||||
while read name FreeBSD Linux; do
|
||||
eval "export ${name}=\$${UNAME}"
|
||||
done
|
||||
Reference in New Issue
Block a user