TESTS: Some targets just discard a command with "unexpected" r/w flags
Set timeout for the read10 invalid test for a read10 with w flag set and fail the test if we have not received any reply at all within 3 seconds.
This commit is contained in:
@@ -239,7 +239,10 @@ test_read10_invalid(void)
|
|||||||
data.size = sizeof(buf);
|
data.size = sizeof(buf);
|
||||||
data.data = (unsigned char *)&buf[0];
|
data.data = (unsigned char *)&buf[0];
|
||||||
|
|
||||||
|
iscsi_set_noautoreconnect(iscsic, 1);
|
||||||
|
iscsi_set_timeout(iscsic, 3);
|
||||||
task_ret = iscsi_scsi_command_sync(iscsic, tgt_lun, task, &data);
|
task_ret = iscsi_scsi_command_sync(iscsic, tgt_lun, task, &data);
|
||||||
|
iscsi_set_noautoreconnect(iscsic, 0);
|
||||||
CU_ASSERT_PTR_NOT_NULL(task_ret);
|
CU_ASSERT_PTR_NOT_NULL(task_ret);
|
||||||
|
|
||||||
logging(LOG_VERBOSE, "Verify that the target returned SUCCESS");
|
logging(LOG_VERBOSE, "Verify that the target returned SUCCESS");
|
||||||
@@ -250,4 +253,5 @@ test_read10_invalid(void)
|
|||||||
CU_ASSERT_EQUAL(task->status, SCSI_STATUS_GOOD);
|
CU_ASSERT_EQUAL(task->status, SCSI_STATUS_GOOD);
|
||||||
scsi_free_scsi_task(task);
|
scsi_free_scsi_task(task);
|
||||||
task = NULL;
|
task = NULL;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user