test_read6_beyond_eol: Fix an assertion failure
Avoid that running the regression tests against a LUN with size zero triggers the following assertion failure: lt-iscsi-test-cu: iscsi-support.c:1666: read6: Assertion `task != ((void *)0)' failed. Aborted Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
393165d66a
commit
5231923bc8
@@ -54,7 +54,7 @@ test_read6_simple(void)
|
||||
if (num_blocks > 0x200000) {
|
||||
CU_PASS("LUN is too big for read-at-eol tests with READ6. Skipping test.\n");
|
||||
} else {
|
||||
for (i = 1; i <= 255; i++) {
|
||||
for (i = 1; i <= 255 && i + 0U <= num_blocks; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user