Commit 817c39a1 authored by Michal Berger's avatar Michal Berger Committed by Konrad Sztyber
Browse files

test/vhost_boot: Use string to check for disk device



The check if $id is a block device was being performed on the host's
side instead of the VM's. Replace that with a string matching the
target device on the VM.

Fixes issue #2810

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


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 1f4a8945
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -108,7 +108,7 @@ timing_exit setup_vm
start_part_sector=0 drive_size=0
while IFS=":" read -r id start end _; do
	start=${start%s} end=${end%s}
	[[ -b $id ]] && drive_size=$start
	[[ $id == /dev/sda ]] && drive_size=$start
	[[ $id =~ ^[0-9]+$ ]] && start_part_sector=$((end + 1))
done < <(vm_exec "$vm_no" "parted /dev/sda -ms unit s print")