test/vhost: Avoid globbing in the vm_exec() argument
Since the command including * was being passed unquoted, the actual pattern was being expanded on the host side. This became problematic when multiple nvme drives were installed inside the host, e.g. the command on the VM side was looking for a specific ctrl which didn't exist there. Fix that by passing the full command as a literal string. Signed-off-by: Michal Berger <michal.berger@intel.com> Change-Id: I3a3d578c735b9a07abb6e0bcefd6db0c343fc27b Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13675 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Karol Latecki <karol.latecki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
This commit is contained in:
parent
030bbebeb2
commit
7cd8de9c2b
@ -1033,7 +1033,7 @@ function vm_check_blk_location() {
|
||||
}
|
||||
|
||||
function vm_check_nvme_location() {
|
||||
SCSI_DISK="$(vm_exec $1 grep -l SPDK /sys/class/nvme/*/model | awk -F/ '{print $5"n1"}')"
|
||||
SCSI_DISK="$(vm_exec $1 "grep -l SPDK /sys/class/nvme/*/model" | awk -F/ '{print $5"n1"}')"
|
||||
if [[ -z "$SCSI_DISK" ]]; then
|
||||
error "no vfio-user nvme test disk found!"
|
||||
return 1
|
||||
|
Loading…
Reference in New Issue
Block a user