Commit db772436 authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

misc: Fixes targeted for latest shellcheck



Following directives are being fixed:

- SC2317
- SC2004

Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: Ia080044aa5b7c885a01556b6927933b81f98eb9d
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16025


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPawel Piatek <pawelx.piatek@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <smatsumoto@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 9fa25237
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ function create_fio_config() {
				m=$((m + 1))

				#Mark numa of n'th disk as "x" to mark it as claimed for next loop iterations
				disks_numa[$n]="x"
				disks_numa[n]="x"
			fi
			n=$((n + 1))

+0 −4
Original line number Diff line number Diff line
@@ -14,8 +14,6 @@ setup() {
}

get_meminfo() {
	xtrace_disable

	local get=$1
	local node=$2
	local var val
@@ -35,8 +33,6 @@ get_meminfo() {
		echo "$val" && return 0
	done < <(printf '%s\n' "${mem[@]}")
	return 1

	xtrace_restore
}

partition_drive() {
+1 −1
Original line number Diff line number Diff line
@@ -148,7 +148,7 @@ devids=()
# Now try to add 33 devices, max for one bus + one device on the next bus
for ((i = 0; i < 33; i++)); do
	uuid=$(rpc_cmd bdev_get_bdevs -b null$i | jq -r '.[].uuid')
	devids[$i]=$(create_device $i $uuid | jq -r '.handle')
	devids[i]=$(create_device $i $uuid | jq -r '.handle')
done

[[ $(vm_exec $vm_no "lsblk | grep -E \"^vd.\" | wc -l") -eq 33 ]]
+1 −1
Original line number Diff line number Diff line
@@ -115,8 +115,8 @@ function vm_migrate() {
	# If you need this check then perform it on your own.
	if [[ "$target_ip" == "127.0.0.1" ]]; then
		if ! vm_os_booted $target_vm; then
			fail "VM$target_vm is not running"
			cat $target_vm $target_vm_dir/cont_result
			fail "VM$target_vm is not running"
		fi
	fi

+1 −1
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ else
			vms_to_run=(${disk_cfg_vms[i]})
			for ((j = 0; j < ${disk_cfg_splits[$i]}; j++)); do
				free_mb=$(get_lvs_free_mb "$ls_guid")
				size=$((free_mb / ((${disk_cfg_splits[$i]} - j))))
				size=$((free_mb / (disk_cfg_splits[i] - j)))
				lb_name=$($rpc_py bdev_lvol_create -u $ls_guid lbd_$j $size --clear-method none)
				lvol_bdevs+=("$lb_name")
				notice "Created LVOL Bdev $lb_name on Lvol Store $ls_guid on Bdev $nvme_bdev"