TESTS: fix bug in read 0 blocks at end of device.
rc16->returned_lba is the lba of the last block which can be accessed on the device, not the first block beyond the end of the device
This commit is contained in:
@@ -79,7 +79,7 @@ int T0203_read16_0blocks(const char *initiator, const char *url)
|
|||||||
printf("[OK]\n");
|
printf("[OK]\n");
|
||||||
|
|
||||||
printf("Read16 0blocks at LBA:<end-of-disk> ");
|
printf("Read16 0blocks at LBA:<end-of-disk> ");
|
||||||
task = iscsi_read16_sync(iscsi, lun, num_blocks - 1, 0, block_size, 0, 0, 0, 0, 0);
|
task = iscsi_read16_sync(iscsi, lun, num_blocks, 0, block_size, 0, 0, 0, 0, 0);
|
||||||
if (task == NULL) {
|
if (task == NULL) {
|
||||||
printf("[FAILED]\n");
|
printf("[FAILED]\n");
|
||||||
printf("Failed to send read16 command: %s\n", iscsi_get_error(iscsi));
|
printf("Failed to send read16 command: %s\n", iscsi_get_error(iscsi));
|
||||||
@@ -96,7 +96,7 @@ int T0203_read16_0blocks(const char *initiator, const char *url)
|
|||||||
printf("[OK]\n");
|
printf("[OK]\n");
|
||||||
|
|
||||||
printf("Read16 0blocks at LBA:<beyond end-of-disk> ");
|
printf("Read16 0blocks at LBA:<beyond end-of-disk> ");
|
||||||
task = iscsi_read16_sync(iscsi, lun, num_blocks , 0, block_size, 0, 0, 0, 0, 0);
|
task = iscsi_read16_sync(iscsi, lun, num_blocks + 1, 0, block_size, 0, 0, 0, 0, 0);
|
||||||
if (task == NULL) {
|
if (task == NULL) {
|
||||||
printf("[FAILED]\n");
|
printf("[FAILED]\n");
|
||||||
printf("Failed to send read16 command: %s\n", iscsi_get_error(iscsi));
|
printf("Failed to send read16 command: %s\n", iscsi_get_error(iscsi));
|
||||||
|
|||||||
@@ -79,7 +79,7 @@ int T0213_read12_0blocks(const char *initiator, const char *url)
|
|||||||
printf("[OK]\n");
|
printf("[OK]\n");
|
||||||
|
|
||||||
printf("Read12 0blocks at LBA:<end-of-disk> ");
|
printf("Read12 0blocks at LBA:<end-of-disk> ");
|
||||||
task = iscsi_read12_sync(iscsi, lun, num_blocks - 1, 0, block_size, 0, 0, 0, 0, 0);
|
task = iscsi_read12_sync(iscsi, lun, num_blocks, 0, block_size, 0, 0, 0, 0, 0);
|
||||||
if (task == NULL) {
|
if (task == NULL) {
|
||||||
printf("[FAILED]\n");
|
printf("[FAILED]\n");
|
||||||
printf("Failed to send read12 command: %s\n", iscsi_get_error(iscsi));
|
printf("Failed to send read12 command: %s\n", iscsi_get_error(iscsi));
|
||||||
@@ -96,7 +96,7 @@ int T0213_read12_0blocks(const char *initiator, const char *url)
|
|||||||
printf("[OK]\n");
|
printf("[OK]\n");
|
||||||
|
|
||||||
printf("Read12 0blocks at LBA:<beyond end-of-disk> ");
|
printf("Read12 0blocks at LBA:<beyond end-of-disk> ");
|
||||||
task = iscsi_read12_sync(iscsi, lun, num_blocks , 0, block_size, 0, 0, 0, 0, 0);
|
task = iscsi_read12_sync(iscsi, lun, num_blocks + 1, 0, block_size, 0, 0, 0, 0, 0);
|
||||||
if (task == NULL) {
|
if (task == NULL) {
|
||||||
printf("[FAILED]\n");
|
printf("[FAILED]\n");
|
||||||
printf("Failed to send read12 command: %s\n", iscsi_get_error(iscsi));
|
printf("Failed to send read12 command: %s\n", iscsi_get_error(iscsi));
|
||||||
|
|||||||
Reference in New Issue
Block a user