TESTS: Fix num_blocks offset by one in the beyond-eol tests

This commit is contained in:
Ronnie Sahlberg
2013-01-21 20:27:12 -08:00
parent bfbde8b097
commit 7027ccb3b2
10 changed files with 20 additions and 20 deletions

View File

@@ -37,7 +37,7 @@ test_write16_beyond_eol(void)
for (i = 1; i <= 256; i++) {
unsigned char *buf = malloc(block_size * i);
ret = write16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 2 - i,
ret = write16_lbaoutofrange(iscsic, tgt_lun, num_blocks + 1 - i,
i * block_size, block_size,
0, 0, 0, 0, 0, buf);
free(buf);
@@ -72,7 +72,7 @@ test_write16_beyond_eol(void)
for (i = 2; i <= 256; i++) {
unsigned char *buf = malloc(block_size * i);
ret = write16_lbaoutofrange(iscsic, tgt_lun, num_blocks,
ret = write16_lbaoutofrange(iscsic, tgt_lun, num_blocks - 1,
i * block_size, block_size,
0, 0, 0, 0, 0, buf);
free(buf);