From dd762124294cf401c87d4ee9027ec67089504b97 Mon Sep 17 00:00:00 2001 From: Jim Harris Date: Wed, 1 May 2019 14:55:47 -0700 Subject: [PATCH] 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 Change-Id: Ic18fabb5ba637ef1f4097930423f897c76bba299 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/452806 Reviewed-by: Mike Carlin Reviewed-by: Ben Walker Reviewed-by: Changpeng Liu Reviewed-by: Shuhei Matsumoto Tested-by: SPDK CI Jenkins --- test/nvmf/host/aer.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/nvmf/host/aer.sh b/test/nvmf/host/aer.sh index 8213b37ca..c83f77043 100755 --- a/test/nvmf/host/aer.sh +++ b/test/nvmf/host/aer.sh @@ -52,17 +52,20 @@ $rpc_py get_nvmf_subsystems # trsvcid:$NVMF_PORT \ # subnqn:nqn.2014-08.org.nvmexpress.discovery" +AER_TOUCH_FILE=/tmp/aer_touch_file +rm -f $AER_TOUCH_FILE + # Namespace Attribute Notice Tests $rootdir/test/nvme/aer/aer -r "\ trtype:RDMA \ adrfam:IPv4 \ traddr:$NVMF_FIRST_TARGET_IP \ 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=$! # Waiting for aer start to work -sleep 5 +waitforfile $AER_TOUCH_FILE # Add a new namespace $rpc_py construct_malloc_bdev 64 4096 --name Malloc1