test/vhost: fix getting device traddr

Signed-off-by: Maciej Wawryk <maciejx.wawryk@intel.com>
Change-Id: Ic9f19145d8e1f0caa7880dfc70cba9796273bb4a
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/10261
Community-CI: Broadcom CI <spdk-ci.pdl@broadcom.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
This commit is contained in:
Maciej Wawryk 2021-11-17 15:45:13 +01:00 committed by Tomasz Zawadzki
parent 0b6a29d4a2
commit 3cbd2dcc6c

View File

@ -210,7 +210,7 @@ function get_traddr() {
local nvme
nvme="$($rootdir/scripts/gen_nvme.sh)"
traddr=$(jq -r ".config[] | select(.params.name == \"$nvme_name\") | .params.trtype" <<< "$nvme")
traddr=$(jq -r ".config[] | select(.params.name == \"$nvme_name\") | .params.traddr" <<< "$nvme")
[[ -n $traddr ]] || return 1
}