Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-tool: 0214 was reading twice from -1 #14

Merged
merged 1 commit into from Sep 5, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions test-tool/0214_read12_beyondeol.c
Expand Up @@ -106,14 +106,14 @@ int T0214_read12_beyondeol(const char *initiator, const char *url, int data_loss


test2:
/* read 1 - 256 blocks at LBA -1 */
printf("Reading 1-256 blocks at LBA -1 ... ");
/* read 1 - 256 blocks at LBA 2^31 */
printf("Reading 1-256 blocks at LBA 2^31 ... ");
if (num_blocks >= 0xffffffff) {
printf("LUN is too big, skipping test\n");
goto test3;
}
for (i = 2; i <= 257; i++) {
task = iscsi_read12_sync(iscsi, lun, -1, i * block_size, block_size, 0, 0, 0, 0, 0);
task = iscsi_read12_sync(iscsi, lun, 0x80000000U, i * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send READ12 command: %s\n", iscsi_get_error(iscsi));
Expand All @@ -122,7 +122,7 @@ int T0214_read12_beyondeol(const char *initiator, const char *url, int data_loss
}
if (task->status == SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("READ12 command should fail when reading from LBA -1\n");
printf("READ12 command should fail when reading from LBA 2^31\n");
ret++;
scsi_free_scsi_task(task);
goto test3;
Expand Down