test/vhost/initiator: fix discover_bdevs usage
discover_bdevs previously took a port number for the RPC service, but
after commit 6bef902ca5
("rpc: add default UNIX domain socket listen
address"), running rpc.py with just a -p (port) parameter doesn't have
the expected effect, since the default server_addr is now a UNIX domain
socket path, and the port is ignored.
Change discover_bdevs to accept a socket path instead of a port number
to fix the issue for the vhost/initiator test; no other callers use the
disover_bdevs rpc_port argument, so this is the only instance that needs
to change.
Change-Id: I4e290f175ccc79caa3c4ef76c062641b9fe489a8
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
Reviewed-on: https://review.gerrithub.io/388283
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
834a9bb7e8
commit
ec1551c598
@ -403,7 +403,7 @@ function discover_bdevs()
|
|||||||
{
|
{
|
||||||
local rootdir=$1
|
local rootdir=$1
|
||||||
local config_file=$2
|
local config_file=$2
|
||||||
local rpc_port=$3
|
local rpc_server=$3
|
||||||
|
|
||||||
if [ ! -e $config_file ]; then
|
if [ ! -e $config_file ]; then
|
||||||
echo "Invalid Configuration File: $config_file"
|
echo "Invalid Configuration File: $config_file"
|
||||||
@ -419,10 +419,10 @@ function discover_bdevs()
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Get all of the bdevs
|
# Get all of the bdevs
|
||||||
if [ -z "$rpc_port" ]; then
|
if [ -z "$rpc_server" ]; then
|
||||||
$rootdir/scripts/rpc.py get_bdevs
|
$rootdir/scripts/rpc.py get_bdevs
|
||||||
else
|
else
|
||||||
$rootdir/scripts/rpc.py -p $rpc_port get_bdevs
|
$rootdir/scripts/rpc.py -s "$rpc_server" get_bdevs
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Shut down the bdev service
|
# Shut down the bdev service
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
[Rpc]
|
[Rpc]
|
||||||
Enable Yes
|
Enable Yes
|
||||||
Listen 127.0.0.1:5261
|
Listen /var/tmp/spdk2.sock
|
||||||
|
|
||||||
[Ioat]
|
[Ioat]
|
||||||
Disable Yes
|
Disable Yes
|
||||||
|
@ -96,7 +96,7 @@ for bdev in $bdevs; do
|
|||||||
timing_exit bounds
|
timing_exit bounds
|
||||||
|
|
||||||
timing_enter bdev_svc
|
timing_enter bdev_svc
|
||||||
bdevs=$(discover_bdevs $rootdir $testdir/bdev.conf 5261 | jq -r '.[] | select(.claimed == false)')
|
bdevs=$(discover_bdevs $rootdir $testdir/bdev.conf /var/tmp/spdk2.sock | jq -r '.[] | select(.claimed == false)')
|
||||||
timing_exit bdev_svc
|
timing_exit bdev_svc
|
||||||
|
|
||||||
if [ -d /usr/src/fio ]; then
|
if [ -d /usr/src/fio ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user