From 817c39a1a2500d642499ac47ae23d67645813e51 Mon Sep 17 00:00:00 2001 From: Michal Berger Date: Fri, 2 Dec 2022 09:50:38 +0100 Subject: [PATCH] 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: Michal Berger Change-Id: I964bb24eeea2fc5a4c2eacbbf6c97606303b2ebd Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15762 Reviewed-by: Jim Harris Reviewed-by: Konrad Sztyber Tested-by: SPDK CI Jenkins --- test/vhost/vhost_boot/vhost_boot.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/vhost/vhost_boot/vhost_boot.sh b/test/vhost/vhost_boot/vhost_boot.sh index 20e58e8d8..64d64afba 100755 --- a/test/vhost/vhost_boot/vhost_boot.sh +++ b/test/vhost/vhost_boot/vhost_boot.sh @@ -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")