Spdk/test/unit/lib/iscsi
Shuhei Matsumoto af661f7844 ut/iscsi: Add Data-OUT PDU sequence test cases
Test scenario is as follows.

Some iSCSI initiator sends a Data-OUT PDU sequence such that the size of
the data segment of any Data-OUT PDU is not block size multiples.
Test if such complex Data-OUT PDU sequence is processed correctly.

Desired Data Transfer Length is 5 * SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2.
Number of Data-OUT PDUs is 4. Length of the data segment of the first two PDUs are
SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 - 4. Length of the data segment of the
third PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH. Length of the data segment
of the final PDU is SPDK_ISCSI_MAX_RECV_DATA_SEGMENT_LENGTH / 2 + 8.

Three data buffers should be used and three subtasks should be created and submitted.

The test scenario assume that a iscsi_conn_read_data() call could read
the required length of the data and all read lengths are 4 bytes multiples.
The latter is to verify data is copied to the correct offset by using data patterns.

Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Change-Id: I5e3939d07cd4f50fe3dcf659a18a9f8fcbe01e07
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/6584
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Community-CI: Mellanox Build Bot
2021-04-19 12:47:40 +00:00
..
conn.c lib/iscsi: Rename current_datain_offset of task by current_data_offset 2021-04-12 09:49:31 +00:00
init_grp.c test/iscsi: initialize mutex for portability 2021-02-04 08:41:56 +00:00
iscsi.c ut/iscsi: Add Data-OUT PDU sequence test cases 2021-04-19 12:47:40 +00:00
param.c lib/iscsi: return immediately from iscsi_parse_params if len is 0 2021-03-01 14:13:48 +00:00
portal_grp.c remove unneeded spdk_internal/thread.h includes 2020-12-10 14:38:04 +00:00
tgt_node.c test/unit/lib/iscsi: Add unit test stubs 2020-11-19 09:47:26 +00:00
common.c ut/iscsi: Add Data-OUT PDU sequence test cases 2021-04-19 12:47:40 +00:00
Makefile iscsi&iscsi/ut: Unify cpumask decode between iSCSI.conf and JSON-RPC 2018-01-19 15:47:57 -05:00