Commit 92244508 authored by Michal Berger's avatar Michal Berger Committed by Jim Harris
Browse files

test/sma: Call waitforlisten() with proper socket argument



Currently, the test is not waiting for all the spdk_tgt instances,
but just the single one ($tgtpid). This emposes a race where first
rpc calls targeted for $t1sock may fail due to the target being
not available.

Avoid that by requesting waitforlisten() to check proper sockets.

Change-Id: I73398b14da1d5101b37057009a05363599233f38
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/21426


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarKarol Latecki <karol.latecki@intel.com>
Reviewed-by: default avatarSebastian Brzezinka <sebastian.brzezinka@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent cedcbfc3
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -152,8 +152,9 @@ $rootdir/scripts/sma.py -c <(
) &
smapid=$!

waitforlisten $t1pid
waitforlisten $t2pid
waitforlisten $tgtpid
waitforlisten $t1pid "$t1sock"
waitforlisten $t2pid "$t2sock"

# Prepare the targets.  The first one has a single subsystem with a single volume and a single
# discovery listener.  The second one also has a single subsystem, but has two volumes attached to