Commit d1a96e7c authored by Shuhei Matsumoto's avatar Shuhei Matsumoto Committed by Changpeng Liu
Browse files

iscsi: Fix UT failure due to uninitialized value detected by valgrind



In a test case of op_login_session_normal_test(), it is expected that
the tag of the session has any value different from the connection but
the tag of the session was not initialized.

  Fixes #826

Reported-by: default avatarlorneli <lorneli@163.com>
Signed-off-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I62f7a4bd301c5a74ad6ba10b1b448189f750b324
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/458339


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarLorne Li <lorneli@163.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
parent 94f67dd5
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -220,6 +220,7 @@ op_login_session_normal_test(void)
	g_spdk_iscsi.session[UT_ISCSI_TSIH - 1] = &sess;
	sess.tsih = UT_ISCSI_TSIH;
	rsph->tsih = UT_ISCSI_TSIH >> 8; /* to append the session */
	sess.tag = 1;
	rc = iscsi_op_login_session_normal(&conn, &rsp_pdu, UT_INITIATOR_NAME1,
					   &param, &target, 0);
	CU_ASSERT(conn.target_port == NULL);