test-tool: Avoid that Valgrind complains about uninitialized data
Avoid that Valgrind reports complaints similar to the following: Syscall param writev(vector[...]) points to uninitialised byte(s) at 0x5567087: writev (writev.c:49) by 0x5265AE0: iscsi_iovector_readv_writev (socket.c:492) by 0x52666B5: iscsi_write_to_socket (socket.c:710) by 0x5266CCC: iscsi_service (socket.c:852) by 0x526751F: event_loop (sync.c:67) by 0x5269B41: iscsi_scsi_command_sync (sync.c:1153) by 0x4050F6: send_scsi_command (iscsi-support.c:245) by 0x408007: compareandwrite (iscsi-support.c:1512) by 0x40B6AD: test_compareandwrite_dpofua (test_compareandwrite_dpofua.c:69) by 0x503EC99: ??? (in /usr/lib/libcunit.so.1.0.1) by 0x503EF27: ??? (in /usr/lib/libcunit.so.1.0.1) by 0x503F2A5: CU_run_all_tests (in /usr/lib/libcunit.so.1.0.1) Address 0xffeffff10 is on thread 1's stack in frame #8, created by test_compareandwrite_dpofua (test_compareandwrite_dpofua.c:30) Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
This commit is contained in:
committed by
Ronnie Sahlberg
parent
0995b0aa2b
commit
b3783b961b
@@ -60,6 +60,7 @@ test_compareandwrite_dpofua(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test COMPAREANDWRITE with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = compareandwrite(sd, 0, buf, block_size,
|
||||
block_size, 0, 1, 0, 0,
|
||||
|
||||
@@ -30,7 +30,7 @@ test_get_lba_status_unmap_single(void)
|
||||
{
|
||||
int ret;
|
||||
uint64_t i;
|
||||
unsigned char *buf = alloca(257 * block_size);
|
||||
unsigned char *buf = alloca((256 + lbppb + 1) * block_size);
|
||||
struct unmap_list list[1];
|
||||
struct scsi_task *t = NULL;
|
||||
struct scsi_get_lba_status *lbas = NULL;
|
||||
@@ -40,7 +40,7 @@ test_get_lba_status_unmap_single(void)
|
||||
CHECK_FOR_THIN_PROVISIONING;
|
||||
CHECK_FOR_LBPU;
|
||||
|
||||
memset(buf, 'A', 257 * block_size);
|
||||
memset(buf, 'A', (256 + lbppb + 1) * block_size);
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test GET_LBA_STATUS for a single unmapped block "
|
||||
|
||||
@@ -82,6 +82,8 @@ void test_iscsi_datasn_invalid(void)
|
||||
iscsi_set_noautoreconnect(sd->iscsi_ctx, 1);
|
||||
iscsi_set_timeout(sd->iscsi_ctx, 3);
|
||||
|
||||
memset(buf, 0xa6, 2 * block_size);
|
||||
|
||||
ret = write10(sd, 100, 2 * block_size,
|
||||
block_size, 0, 0, 0, 0, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -139,6 +139,7 @@ test_nomedia_sbc(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test VERIFY10 when medium is ejected.");
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
ret = verify10(sd, 0, block_size, block_size,
|
||||
0, 0, 1, buf,
|
||||
EXPECT_NO_MEDIUM);
|
||||
|
||||
@@ -36,6 +36,7 @@ test_orwrite_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test ORWRITE 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -60,6 +60,7 @@ test_orwrite_dpofua(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test ORWRITE with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = orwrite(sd, 0, block_size,
|
||||
block_size, 0, 1, 0, 0, 0, buf,
|
||||
|
||||
@@ -37,7 +37,7 @@ test_orwrite_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test ORWRITE of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ test_orwrite_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -245,6 +245,7 @@ test_read10_invalid(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = block_size;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
data.size = block_size;
|
||||
data.data = (unsigned char *)buf;
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ test_readonly_sbc(void)
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE10 fails with WRITE_PROTECTED");
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
ret = write10(sd, 0, block_size, block_size,
|
||||
0, 0, 0, 0, 0, buf,
|
||||
EXPECT_WRITE_PROTECTED);
|
||||
|
||||
@@ -38,6 +38,7 @@ test_verify10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test VERIFY10 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -38,6 +38,7 @@ test_verify12_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test VERIFY12 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -34,6 +34,7 @@ test_verify16_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test VERIFY16 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -40,6 +40,7 @@ test_write10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE10 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -60,6 +60,7 @@ test_write10_dpofua(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE10 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = write10(sd, 0, block_size,
|
||||
block_size, 0, 1, 0, 0, 0, buf,
|
||||
|
||||
@@ -38,6 +38,7 @@ test_write10_flags(void)
|
||||
logging(LOG_VERBOSE, "Test WRITE10 flags");
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE10 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = write10(sd, 0,
|
||||
block_size, block_size, 0, 1, 0, 0, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -121,6 +121,7 @@ test_write10_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -37,7 +37,7 @@ test_write10_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE10 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ test_write10_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -40,6 +40,7 @@ test_write12_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE12 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -60,6 +60,7 @@ test_write12_dpofua(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE12 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = write12(sd, 0, block_size,
|
||||
block_size, 0, 1, 0, 0, 0, buf,
|
||||
|
||||
@@ -38,6 +38,7 @@ test_write12_flags(void)
|
||||
logging(LOG_VERBOSE, "Test WRITE12 flags");
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE12 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = write12(sd, 0,
|
||||
block_size, block_size, 0, 1, 0, 0, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -121,6 +121,7 @@ test_write12_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -36,7 +36,7 @@ test_write12_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE12 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -42,6 +42,7 @@ test_write12_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -37,6 +37,7 @@ test_write16_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE16 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -60,6 +60,7 @@ test_write16_dpofua(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE16 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = write16(sd, 0, block_size,
|
||||
block_size, 0, 1, 0, 0, 0, buf,
|
||||
|
||||
@@ -39,6 +39,7 @@ test_write16_flags(void)
|
||||
logging(LOG_VERBOSE, "Test WRITE16 flags");
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITE16 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = write16(sd, 0,
|
||||
block_size, block_size, 0, 1, 0, 0, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -121,6 +121,7 @@ test_write16_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -38,7 +38,7 @@ test_write16_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITE16 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ test_write16_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -58,6 +58,7 @@ test_writesame10_unmap(void)
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITESAME10 of 1-256 blocks at the start of "
|
||||
"the LUN");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
logging(LOG_VERBOSE, "Write %d blocks of 0xFF", i);
|
||||
memset(buf, 0xff, i * block_size);
|
||||
|
||||
@@ -39,6 +39,7 @@ test_writesame10_unmap_unaligned(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test that unaligned WRITESAME10 Unmap succeeds. LBPPB==%d", lbppb);
|
||||
memset(buf, 0xa6, block_size);
|
||||
for (i = 1; i < lbppb; i++) {
|
||||
logging(LOG_VERBOSE, "Unmap %d blocks using WRITESAME10 at LBA:%d", lbppb - i, i);
|
||||
ret = writesame10(sd, i,
|
||||
|
||||
@@ -56,7 +56,7 @@ test_writesame16_unmap(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITESAME16 of 1-256 blocks at the start of the LUN");
|
||||
buf = malloc(65536 * block_size);
|
||||
buf = calloc(65536, block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
logging(LOG_VERBOSE, "Write %d blocks of 0xFF", i);
|
||||
memset(buf, 0xff, i * block_size);
|
||||
|
||||
@@ -44,6 +44,7 @@ test_writesame16_unmap_until_end(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITESAME16 of 1-256 blocks at the end of the LUN by setting number-of-blocks==0");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
logging(LOG_VERBOSE, "Write %d blocks of 0xFF", i);
|
||||
memset(buf, 0xff, block_size * i);
|
||||
|
||||
@@ -40,6 +40,7 @@ test_writeverify10_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY10 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -39,6 +39,7 @@ test_writeverify10_flags(void)
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY10 with BYTCHK==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = writeverify10(sd, 0,
|
||||
block_size, block_size, 0, 0, 1, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -130,6 +130,7 @@ test_writeverify10_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -36,7 +36,7 @@ test_writeverify10_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY10 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ test_writeverify10_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -40,6 +40,7 @@ test_writeverify12_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY12 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -39,6 +39,7 @@ test_writeverify12_flags(void)
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY12 with BYTCHK==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = writeverify12(sd, 0,
|
||||
block_size, block_size, 0, 0, 1, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -130,6 +130,7 @@ test_writeverify12_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -36,7 +36,7 @@ test_writeverify12_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY12 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -41,6 +41,7 @@ test_writeverify12_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
@@ -36,6 +36,7 @@ test_writeverify16_beyond_eol(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY16 1-256 blocks one block beyond the end");
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -64,6 +64,7 @@ test_writeverify16_dpo(void)
|
||||
}
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY16 with DPO==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (dpofua) {
|
||||
ret = writeverify16(sd, 0, block_size,
|
||||
block_size, 0, 1, 0, 0, buf,
|
||||
|
||||
@@ -39,6 +39,7 @@ test_writeverify16_flags(void)
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY16 with BYTCHK==1");
|
||||
memset(buf, 0xa6, block_size);
|
||||
ret = writeverify16(sd, 0,
|
||||
block_size, block_size, 0, 0, 1, 0, buf,
|
||||
EXPECT_STATUS_GOOD);
|
||||
|
||||
@@ -139,6 +139,7 @@ test_writeverify16_residuals(void)
|
||||
task->xfer_dir = SCSI_XFER_WRITE;
|
||||
task->expxferlen = 10000;
|
||||
|
||||
memset(buf, 0xa6, sizeof(buf));
|
||||
data.size = task->expxferlen;
|
||||
data.data = &buf[0];
|
||||
task_ret = iscsi_scsi_command_sync(sd->iscsi_ctx, sd->iscsi_lun, task, &data);
|
||||
|
||||
@@ -37,7 +37,7 @@ test_writeverify16_simple(void)
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test WRITEVERIFY16 of 1-256 blocks at the start of the LUN");
|
||||
|
||||
memset(buf, 0xa6, 256 * block_size);
|
||||
for (i = 1; i <= 256; i++) {
|
||||
if (maximum_transfer_length && maximum_transfer_length < i) {
|
||||
break;
|
||||
|
||||
@@ -43,6 +43,7 @@ test_writeverify16_wrprotect(void)
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SBC;
|
||||
|
||||
memset(buf, 0xa6, block_size);
|
||||
if (!inq->protect || (rc16 != NULL && !rc16->prot_en)) {
|
||||
logging(LOG_VERBOSE, "Device does not support/use protection information. All commands should fail.");
|
||||
for (i = 1; i < 8; i++) {
|
||||
|
||||
Reference in New Issue
Block a user