[PATCH blktests] loop: add test for creating/deleting file-ns

Daniel Wagner dwagner at suse.de
Wed Jun 19 00:50:59 PDT 2024


On Mon, Jun 17, 2024 at 02:47:22PM GMT, Nilay Shroff wrote:
> +test() {
> +	echo "Running ${TEST_NAME}"
> +
> +	_setup_nvmet
> +
> +	local subsys="blktests-subsystem-1"

Use the default variables instead of duplicating them.

> +	local iterations="${NVME_NUM_ITER}"
> +	local loop_dev
> +	local port
> +
> +	truncate -s "${NVME_IMG_SIZE}" "$(_nvme_def_file_path)"
> +
> +	loop_dev="$(losetup -f --show "$(_nvme_def_file_path)")"
> +
> +	port="$(_create_nvmet_port "${nvme_trtype}")"
> +
> +	_nvmet_target_setup --subsysnqn "${subsys}" --blkdev "${loop_dev}"
> +
> +	_nvme_connect_subsys --subsysnqn "${subsys}"

As far I can tell this could just be:

	_nvmet_target_setup

	_nvme_connect_subsys



More information about the Linux-nvme mailing list