diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run index 5e0dd0832e..10c1200a4a 100644 --- a/tests/runfiles/linux.run +++ b/tests/runfiles/linux.run @@ -363,12 +363,12 @@ tests = ['zpool_import_001_pos', 'zpool_import_002_pos', 'zpool_import_rename_001_pos', 'zpool_import_all_001_pos', 'zpool_import_encrypted', 'zpool_import_encrypted_load', 'zpool_import_errata3', - 'import_cache_device_added', - 'import_cache_device_removed', - 'import_cache_device_replaced', - 'import_cache_mirror_attached', - 'import_cache_mirror_detached', - 'import_cache_shared_device', + 'import_cachefile_device_added', + 'import_cachefile_device_removed', + 'import_cachefile_device_replaced', + 'import_cachefile_mirror_attached', + 'import_cachefile_mirror_detached', + 'import_cachefile_shared_device', 'import_devices_missing', 'import_paths_changed', 'import_rewind_config_changed', diff --git a/tests/test-runner/bin/zts-report.py b/tests/test-runner/bin/zts-report.py index acb20048e6..6c0a2262d2 100755 --- a/tests/test-runner/bin/zts-report.py +++ b/tests/test-runner/bin/zts-report.py @@ -231,7 +231,6 @@ maybe = { ['FAIL', rewind_reason], 'cli_root/zpool_import/import_rewind_config_changed': ['FAIL', rewind_reason], - 'cli_root/zpool_import/import_cache_device_replaced': ['FAIL', '7765'], 'cli_root/zpool_import/zpool_import_missing_003_pos': ['SKIP', '6839'], 'cli_root/zpool_remove/setup': ['SKIP', disk_reason], 'cli_root/zpool_upgrade/zpool_upgrade_004_pos': ['FAIL', '6141'], diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am index 585f10a0b5..6f0f5d0b86 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/Makefile.am @@ -4,12 +4,12 @@ pkgdatadir = $(datadir)/@PACKAGE@/zfs-tests/tests/functional/cli_root/zpool_impo dist_pkgdata_SCRIPTS = \ setup.ksh \ cleanup.ksh \ - import_cache_device_added.ksh \ - import_cache_device_removed.ksh \ - import_cache_device_replaced.ksh \ - import_cache_mirror_attached.ksh \ - import_cache_mirror_detached.ksh \ - import_cache_shared_device.ksh \ + import_cachefile_device_added.ksh \ + import_cachefile_device_removed.ksh \ + import_cachefile_device_replaced.ksh \ + import_cachefile_mirror_attached.ksh \ + import_cachefile_mirror_detached.ksh \ + import_cachefile_shared_device.ksh \ import_devices_missing.ksh \ import_paths_changed.ksh \ import_rewind_config_changed.ksh \ diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_added.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_added.ksh similarity index 100% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_added.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_added.ksh diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_removed.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_removed.ksh similarity index 100% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_removed.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_removed.ksh diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_replaced.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_replaced.ksh similarity index 94% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_replaced.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_replaced.ksh index 3ad22433d6..f42c85b983 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_device_replaced.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_device_replaced.ksh @@ -60,6 +60,7 @@ function custom_cleanup log_must set_zfs_txg_timeout $ZFS_TXG_TIMEOUT zinject -c all + log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_DEFAULT cleanup } @@ -87,9 +88,10 @@ function test_replacing_vdevs log_must zpool export $TESTPOOL1 log_must cp $CPATHBKP $CPATH log_must zpool import -c $CPATH -o cachefile=$CPATH $TESTPOOL1 + log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_SLOW typeset device for device in $zinjectdevices ; do - log_must zinject -d $device -D 200:1 $TESTPOOL1 > /dev/null + log_must zinject -d $device -D 50:1 $TESTPOOL1 > /dev/null done log_must zpool replace $TESTPOOL1 $replacevdev $replaceby @@ -102,6 +104,7 @@ function test_replacing_vdevs # Confirm pool is still replacing log_must pool_is_replacing $TESTPOOL1 log_must zinject -c all > /dev/null + log_must set_tunable64 zfs_scan_vdev_limit $ZFS_SCAN_VDEV_LIMIT_DEFAULT log_must zpool export $TESTPOOL1 ( $earlyremove ) && log_must rm $replacevdev diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_mirror_attached.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_attached.ksh similarity index 100% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_mirror_attached.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_attached.ksh diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_mirror_detached.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_detached.ksh similarity index 100% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_mirror_detached.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_mirror_detached.ksh diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_shared_device.ksh b/tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_shared_device.ksh similarity index 100% rename from tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cache_shared_device.ksh rename to tests/zfs-tests/tests/functional/cli_root/zpool_import/import_cachefile_shared_device.ksh diff --git a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg index 20f43cefa0..ecdf0ee534 100644 --- a/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg +++ b/tests/zfs-tests/tests/functional/cli_root/zpool_import/zpool_import.cfg @@ -117,11 +117,11 @@ export DEVICE_FILE=disk export DEVICE_ARCHIVE=archive_import-test export MYTESTFILE=$STF_SUITE/include/libtest.shlib -export CPATH=/var/tmp/cachefile.$$ -export CPATHBKP=/var/tmp/cachefile.$$.bkp -export CPATHBKP2=/var/tmp/cachefile.$$.bkp2 -export MD5FILE=/var/tmp/md5sums.$$ -export MD5FILE2=/var/tmp/md5sums.$$.2 +export CPATH=$TEST_BASE_DIR/cachefile.$$ +export CPATHBKP=$TEST_BASE_DIR/cachefile.$$.bkp +export CPATHBKP2=$TEST_BASE_DIR/cachefile.$$.bkp2 +export MD5FILE=$TEST_BASE_DIR/md5sums.$$ +export MD5FILE2=$TEST_BASE_DIR/md5sums.$$.2 typeset -i num=0 while (( num < $GROUP_NUM )); do @@ -137,3 +137,6 @@ export VDEV3=$DEVICE_DIR/${DEVICE_FILE}3 export VDEV4=$DEVICE_DIR/${DEVICE_FILE}4 export ALTER_ROOT=/alter_import-test + +export ZFS_SCAN_VDEV_LIMIT_SLOW=$((128*1024)) +export ZFS_SCAN_VDEV_LIMIT_DEFAULT=$((4*1024*1024))