@@ -113,9 +113,10 @@ The NVMe tests can be additionally parameterized via environment variables.
block device types can be listed with separating spaces. In this case, the
tests are repeated to cover all of the block device types specified. Default
value is "device file".
-- nvme_img_size: '1G' (default)
- Run the tests with given image size in bytes. 'm', 'M', 'g'
- and 'G' postfix are supported.
+- NVME_IMG_SIZE: '1G' (default)
+ Run the tests with given image size in bytes. 'm', 'M', 'g' and 'G' postfix
+ are supported. This parameter had an old name 'nvme_img_size'. The old name
+ is still usable, but not recommended.
- nvme_num_iter: 1000 (default)
The number of iterations a test should do.
@@ -32,7 +32,7 @@ test() {
ns=$(_find_nvme_ns "${def_subsys_uuid}")
- _run_fio_verify_io --size="${nvme_img_size}" \
+ _run_fio_verify_io --size="${NVME_IMG_SIZE}" \
--filename="/dev/${ns}"
_nvme_disconnect_subsys
@@ -25,7 +25,7 @@ test() {
local port
local iterations="${nvme_num_iter}"
- truncate -s "${nvme_img_size}" "$(_nvme_def_file_path)"
+ truncate -s "${NVME_IMG_SIZE}" "$(_nvme_def_file_path)"
local genctr=1
@@ -37,7 +37,7 @@ test() {
local loop_dev
local port
- truncate -s "${nvme_img_size}" "$(_nvme_def_file_path)"
+ truncate -s "${NVME_IMG_SIZE}" "$(_nvme_def_file_path)"
loop_dev="$(losetup -f --show "$(_nvme_def_file_path)")"
@@ -29,7 +29,7 @@ test_device() {
_nvmet_passthru_target_setup
nsdev=$(_nvmet_passthru_target_connect)
- _run_fio_verify_io --size="${nvme_img_size}" --filename="${nsdev}"
+ _run_fio_verify_io --size="${NVME_IMG_SIZE}" --filename="${nsdev}"
_nvme_disconnect_subsys
_nvmet_passthru_target_cleanup
@@ -17,7 +17,7 @@ requires() {
}
device_requires() {
- _require_test_dev_size "${nvme_img_size}"
+ _require_test_dev_size "${NVME_IMG_SIZE}"
}
set_conditions() {
@@ -35,7 +35,7 @@ test_device() {
_nvmet_passthru_target_setup
nsdev=$(_nvmet_passthru_target_connect)
- if ! _xfs_run_fio_verify_io "${nsdev}" "${nvme_img_size}"; then
+ if ! _xfs_run_fio_verify_io "${nsdev}" "${NVME_IMG_SIZE}"; then
echo "FAIL: fio verify failed"
fi
@@ -19,7 +19,7 @@ def_hostnqn="nqn.2014-08.org.nvmexpress:uuid:${def_hostid}"
export def_subsysnqn="blktests-subsystem-1"
export def_subsys_uuid="91fdba0d-f87b-4c25-b80f-db7be1418b9e"
_check_conflict_and_set_default NVMET_TRTYPES nvme_trtype "loop"
-nvme_img_size=${nvme_img_size:-"1G"}
+_check_conflict_and_set_default NVME_IMG_SIZE nvme_img_size 1G
nvme_num_iter=${nvme_num_iter:-"1000"}
nvmet_blkdev_type=${nvmet_blkdev_type:-"device"}
NVMET_BLKDEV_TYPES=${NVMET_BLKDEV_TYPES:-"device file"}
@@ -159,10 +159,10 @@ _require_nvme_test_img_size() {
local nvme_img_size_mb
require_sz_mb="$(convert_to_mb "$1")"
- nvme_img_size_mb="$(convert_to_mb "${nvme_img_size}")"
+ nvme_img_size_mb="$(convert_to_mb "${NVME_IMG_SIZE}")"
if ((nvme_img_size_mb < require_sz_mb)); then
- SKIP_REASONS+=("nvme_img_size must be at least ${require_sz_mb}m")
+ SKIP_REASONS+=("NVME_IMG_SIZE must be at least ${require_sz_mb}m")
return 1
fi
return 0
@@ -909,7 +909,7 @@ _nvmet_target_setup() {
esac
done
- truncate -s "${nvme_img_size}" "$(_nvme_def_file_path)"
+ truncate -s "${NVME_IMG_SIZE}" "$(_nvme_def_file_path)"
if [[ "${blkdev_type}" == "device" ]]; then
blkdev="$(losetup -f --show "$(_nvme_def_file_path)")"
else