Commit 7755333c authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

test/common: Allow to override rpc_cmd()'s timeout



This time tells read how long to wait for data in a pipe before
aborting. For some RPCs, which for instance try to attach to multiple
big nvme ctrls, the hard-coded timeout of 15s may be simply not
enough.

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


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <jim.harris@samsung.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 622ef521
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -561,7 +561,7 @@ function rpc_cmd() {
		return 0
	fi

	while read -t 15 -ru $RPC_PIPE_OUTPUT rsp; do
	while read -t "${RPC_PIPE_TIMEOUT:-15}" -ru $RPC_PIPE_OUTPUT rsp; do
		if [[ $rsp == "**STATUS="* ]]; then
			status[${rsp#*=}]=$rsp
			if ((++status_number == cmds_number)); then