libiscsi
libiscsi copied to clipboard
iSCSICmdSnTooHigh test case does not set CMDSN to MAXCMDSN+1 on OSX system
On OSX system, I used libiscsi to test a target, and it looks like a bug in iSCSICmdSnTooHigh test case.
For the first test case, it will set the CMDSN to MAXCMDSN+1 to test whether the target will ignore this invalid PDU. The test result is follow, and I used wireshark to capture the packets attached. It only found on OSX system and works well on Linux system.
Suite: iSCSIcmdsn
Test: iSCSICmdSnTooHigh ...
Test sending invalid iSCSI CMDSN
CMDSN MUST be in the range EXPCMDSN and MAXCMDSN
RFC3720:3.2.2.1 CMDSN > MAXCMDSN must be silently ignored by the target
Send a TESTUNITREADY with CMDSN == MAXCMDSN+1. Should be ignored by the target.
Send TESTUNITREADY (Expecting TIMEOUT)
[FAILED] TESTUNITREADY successful but should have failed with NO SENSE(0x00)/NO ASCQ(0x0000)
[FAILURE] We got a response from the target but SMDSN was outside of the window.
Send a TESTUNITREADY with CMDSN == EXPCMDSN. should work again
Send TESTUNITREADY (Expecting SUCCESS)
[OK] TESTUNITREADY returned SUCCESS NO SENSE(0x00) (null)(0x0000)
FAILED
1. test_iscsi_cmdsn_toohigh.c:78 - CU_ASSERT_EQUAL(ret,0)