test/iscsi_tgt: fix trace_record rare failure
Run spdk_trace_record once iscsi_tgt is started. This movement can make sure spdk_trace_record is running before iscsi_tgt's exit. Fix issue #908 Change-Id: I4e4420fbd0f7586721c7bc8f13837c25b4470da9 Signed-off-by: Xiaodong Liu <xiaodong.liu@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/465847 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
085ade57fc
commit
f12587433a
@ -52,6 +52,11 @@ echo "iscsi_tgt is listening. Running tests..."
|
||||
|
||||
timing_exit start_iscsi_tgt
|
||||
|
||||
mkdir -p ${TRACE_TMP_FOLDER}
|
||||
./app/trace_record/spdk_trace_record -s iscsi -p ${iscsi_pid} -f ${TRACE_RECORD_OUTPUT} -q 1>${TRACE_RECORD_NOTICE_LOG} &
|
||||
record_pid=$!
|
||||
echo "Trace record pid: $record_pid"
|
||||
|
||||
RPCS=
|
||||
RPCS+="add_portal_group $PORTAL_TAG $TARGET_IP:$ISCSI_PORT\n"
|
||||
RPCS+="add_initiator_group $INITIATOR_TAG $INITIATOR_NAME $NETMASK\n"
|
||||
@ -70,11 +75,6 @@ iscsiadm -m discovery -t sendtargets -p $TARGET_IP:$ISCSI_PORT
|
||||
iscsiadm -m node --login -p $TARGET_IP:$ISCSI_PORT
|
||||
waitforiscsidevices $(( $CONNECTION_NUMBER + 1 ))
|
||||
|
||||
mkdir -p ${TRACE_TMP_FOLDER}
|
||||
./app/trace_record/spdk_trace_record -s iscsi -p ${iscsi_pid} -f ${TRACE_RECORD_OUTPUT} -q 1>${TRACE_RECORD_NOTICE_LOG} &
|
||||
record_pid=$!
|
||||
echo "Trace record pid: $record_pid"
|
||||
|
||||
trap 'iscsicleanup; killprocess $iscsi_pid; killprocess $record_pid; delete_tmp_files; iscsitestfini $1 $2; exit 1' SIGINT SIGTERM EXIT
|
||||
|
||||
echo "Running FIO"
|
||||
|
Loading…
Reference in New Issue
Block a user