test/nvmf: utilize waitforfile for aer test
We need to wait for the aer application to be ready to handle an AER completion - so instead of blindly waiting for 5 seconds, instead wait for the aer application to touch a file indicating it's ready to receive an AER event. On my system, this took about 1 second. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: Ic18fabb5ba637ef1f4097930423f897c76bba299 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452806 Reviewed-by: Mike Carlin <mikefcarlin@protonmail.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
00a6c491d2
commit
dd76212429
@ -52,17 +52,20 @@ $rpc_py get_nvmf_subsystems
|
|||||||
# trsvcid:$NVMF_PORT \
|
# trsvcid:$NVMF_PORT \
|
||||||
# subnqn:nqn.2014-08.org.nvmexpress.discovery"
|
# subnqn:nqn.2014-08.org.nvmexpress.discovery"
|
||||||
|
|
||||||
|
AER_TOUCH_FILE=/tmp/aer_touch_file
|
||||||
|
rm -f $AER_TOUCH_FILE
|
||||||
|
|
||||||
# Namespace Attribute Notice Tests
|
# Namespace Attribute Notice Tests
|
||||||
$rootdir/test/nvme/aer/aer -r "\
|
$rootdir/test/nvme/aer/aer -r "\
|
||||||
trtype:RDMA \
|
trtype:RDMA \
|
||||||
adrfam:IPv4 \
|
adrfam:IPv4 \
|
||||||
traddr:$NVMF_FIRST_TARGET_IP \
|
traddr:$NVMF_FIRST_TARGET_IP \
|
||||||
trsvcid:$NVMF_PORT \
|
trsvcid:$NVMF_PORT \
|
||||||
subnqn:nqn.2016-06.io.spdk:cnode1" -n 2 &
|
subnqn:nqn.2016-06.io.spdk:cnode1" -n 2 -t $AER_TOUCH_FILE &
|
||||||
aerpid=$!
|
aerpid=$!
|
||||||
|
|
||||||
# Waiting for aer start to work
|
# Waiting for aer start to work
|
||||||
sleep 5
|
waitforfile $AER_TOUCH_FILE
|
||||||
|
|
||||||
# Add a new namespace
|
# Add a new namespace
|
||||||
$rpc_py construct_malloc_bdev 64 4096 --name Malloc1
|
$rpc_py construct_malloc_bdev 64 4096 --name Malloc1
|
||||||
|
Loading…
Reference in New Issue
Block a user