Testing of userspace intel iscsi initiator using utest
1. Text response fails due to StatSN not
being equal to the session's ExpStatSN.
This is because the ExpStatSN is
incremented before being checked.
ExpStatSN should be incremented
after the check.
2. login_response_i() incorrectly
initializes ExpStatSN When the login
response goes to full feature phase,
there is a line of code:
sess->ExpStatSN = login_rsp.StatSN++;
This is a bug.
Code should read:
sess->ExpStatSN = login_rsp.StatSN + 1;
3. RETURN_NOT_EQUAL("StatSN", logout_rsp.StatSN, sess->ExpStatSN++, -1);
is incorrect. By the time the error
message is printed, the ExpStatSN has
already been incremented.
Code should be:
RETURN_NOT_EQUAL("StatSN", logout_rsp.StatSN, sess->ExpStatSN, -1);
4. scsi_read_data_i() When 'S' bit set,
cmd->status is not updated and is always
left at it's initialized value of -1 thus
causing the cmd to fail.
5. scsi_rt2_t() ExpStatSN is incorrectly
incremented. R2T does not advance StatSN -
so ExpStatSN cannot be incremented.