Spdk/test/unit
Shuhei Matsumoto cdb7398dca lib/iscsi: Factor out freeing iSCSI tasks to a helper function
iSCSI target frees iSCSI tasks when exiting connection or removing
LUN.  The difference is only that the passed LUN is NULL or not.
To make the code clearer, this patch factors out freeing iSCSI
tasks from iscsi_conn_free_tasks() and _iscsi_conn_remove_lun()
into _iscsi_conn_free_tasks().

The refactoring has subtle cases and so add UT code together.

The next patch will fix the issue that secondary tasks are left
even after primary tasks are freed when exiting connection or
removing LUN, and this patch clarifies the next patch.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I18aaed6fe18a1c561ac88a0e5dc1296f9941d0e8
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/473154
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
2019-11-19 09:10:14 +00:00
..
include test/unit: remove duplicate mk/spdk.common.mk includes 2019-02-11 09:30:27 +00:00
lib lib/iscsi: Factor out freeing iSCSI tasks to a helper function 2019-11-19 09:10:14 +00:00
Makefile test: add histogram unit tests 2017-12-29 14:20:48 -05:00
unittest.sh test: fix SC2103 errors on older shellcheck. 2019-11-18 13:06:49 +00:00