TESTS: create helpers for VERIFY10 and switch all tests over to use it.

This commit is contained in:
Ronnie Sahlberg
2012-12-25 15:48:11 -08:00
parent 2afb5accc4
commit 12179de245
7 changed files with 258 additions and 212 deletions

View File

@@ -16,6 +16,7 @@
*/
#include <stdio.h>
#include <string.h>
#include "iscsi.h"
#include "scsi-lowlevel.h"
#include "iscsi-test.h"
@@ -24,10 +25,10 @@ int T0130_verify10_simple(const char *initiator, const char *url, int data_loss
{
struct iscsi_context *iscsi;
struct scsi_task *task;
struct scsi_task *vtask;
struct scsi_readcapacity10 *rc10;
int ret, i, lun;
uint32_t block_size;
unsigned char *buf = NULL;
printf("0130_verify10_simple:\n");
printf("=====================\n");
@@ -68,73 +69,47 @@ int T0130_verify10_simple(const char *initiator, const char *url, int data_loss
scsi_free_scsi_task(task);
buf = malloc(256 * block_size);
if (buf == NULL) {
printf("Failed to allocate buffer.\n");
ret = -1;
goto finished;
}
printf("Read first 256 blocks.\n");
task = iscsi_read10_sync(iscsi, lun, 0, 256 * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send READ10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto finished;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("READ10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto finished;
}
memcpy(buf, task->datain.data, task->datain.size);
scsi_free_scsi_task(task);
ret = 0;
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Read+verify first 1-256 blocks ... ");
/* verify the first 1 - 256 blocks at the start of the LUN */
printf("Verify first 1-256 blocks.\n");
for (i = 1; i <= 256; i++) {
unsigned char *buf;
task = iscsi_read10_sync(iscsi, lun, 0, i * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send read10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto test2;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("Read10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
buf = task->datain.data;
if (buf == NULL) {
printf("[FAILED]\n");
printf("Failed to access DATA-IN buffer %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
vtask = iscsi_verify10_sync(iscsi, lun, buf, i * block_size, 0, 0, 1, 1, block_size);
if (vtask == NULL) {
printf("[FAILED]\n");
printf("Failed to send verify10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
if (vtask->status == SCSI_STATUS_CHECK_CONDITION
&& vtask->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& vtask->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("Opcode is not implemented on target\n");
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
ret = -2;
ret = verify10(iscsi, lun, buf, i * block_size, 0, 0, 1, 1, block_size);
if (ret != 0) {
goto finished;
}
if (vtask->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("Verify10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
goto test2;
}
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
}
printf("[OK]\n");
test2:
finished:
free(buf);
iscsi_logout_sync(iscsi);
iscsi_destroy_context(iscsi);
return ret;

View File

@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "iscsi.h"
#include "scsi-lowlevel.h"
#include "iscsi-test.h"
@@ -25,10 +26,11 @@ int T0131_verify10_mismatch(const char *initiator, const char *url, int data_los
{
struct iscsi_context *iscsi;
struct scsi_task *task;
struct scsi_task *vtask;
struct scsi_readcapacity10 *rc10;
int ret, i, lun;
uint32_t block_size;
unsigned char *buf = NULL;
printf("0131_verify10_mismatch:\n");
printf("=======================\n");
@@ -69,84 +71,54 @@ int T0131_verify10_mismatch(const char *initiator, const char *url, int data_los
scsi_free_scsi_task(task);
buf = malloc(256 * block_size);
if (buf == NULL) {
printf("Failed to allocate buffer.\n");
ret = -1;
goto finished;
}
printf("Read first 256 blocks.\n");
task = iscsi_read10_sync(iscsi, lun, 0, 256 * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send READ10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto finished;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("READ10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto finished;
}
memcpy(buf, task->datain.data, task->datain.size);
scsi_free_scsi_task(task);
ret = 0;
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Read+verify first 1-256 blocks ... ");
printf("Verify first 1-256 blocks with a miscompare.\n");
for (i = 1; i <= 256; i++) {
unsigned char *buf;
int offset = random() % (i * block_size);
task = iscsi_read10_sync(iscsi, lun, 0, i * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send read10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto test2;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("Read10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
buf = task->datain.data;
if (buf == NULL) {
printf("[FAILED]\n");
printf("Failed to access DATA-IN buffer %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
/* flip a random byte in the data */
buf[random() % task->datain.size] ^= 'X';
buf[offset] ^= 'X';
vtask = iscsi_verify10_sync(iscsi, lun, buf, i * block_size, 0, 0, 1, 1, block_size);
if (vtask == NULL) {
printf("[FAILED]\n");
printf("Failed to send verify10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
if (vtask->status == SCSI_STATUS_CHECK_CONDITION
&& vtask->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& vtask->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("Opcode is not implemented on target\n");
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
ret = -2;
ret = verify10_miscompare(iscsi, lun, buf, i * block_size, 0, 0, 1, 1, block_size);
if (ret != 0) {
goto finished;
}
if (vtask->status == SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("Verify10 command returned sense ok but the data is not matching.\n");
ret = -1;
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
goto test2;
}
if (vtask->sense.key != SCSI_SENSE_MISCOMPARE) {
printf("[FAILED]\n");
printf("Verify10 command returned wrong sense key. MISCOMPARE 0x%x expected but got key 0x%x. Sense:%s\n", SCSI_SENSE_MISCOMPARE, vtask->sense.key, iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
goto test2;
}
scsi_free_scsi_task(task);
scsi_free_scsi_task(vtask);
/* flip the byte back */
buf[offset] ^= 'X';
}
printf("[OK]\n");
test2:
finished:
free(buf);
iscsi_logout_sync(iscsi);
iscsi_destroy_context(iscsi);
return ret;

View File

@@ -17,6 +17,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "iscsi.h"
#include "scsi-lowlevel.h"
#include "iscsi-test.h"
@@ -28,6 +29,7 @@ int T0132_verify10_mismatch_no_cmp(const char *initiator, const char *url, int d
struct scsi_readcapacity10 *rc10;
int ret, i, lun;
uint32_t block_size;
unsigned char *buf = NULL;
printf("0132_verify10_mismatch_no_cmp:\n");
printf("==============================\n");
@@ -69,16 +71,20 @@ int T0132_verify10_mismatch_no_cmp(const char *initiator, const char *url, int d
scsi_free_scsi_task(task);
ret = 0;
buf = malloc(256 * block_size);
if (buf == NULL) {
printf("Failed to allocate buffer.\n");
ret = -1;
goto finished;
}
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Read 256 blocks and verify they are good ... ");
printf("Read first 256 blocks.\n");
task = iscsi_read10_sync(iscsi, lun, 0, 256 * block_size, block_size, 0, 0, 0, 0, 0);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send READ10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto test2;
goto finished;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
@@ -87,47 +93,32 @@ int T0132_verify10_mismatch_no_cmp(const char *initiator, const char *url, int d
scsi_free_scsi_task(task);
goto finished;
}
memcpy(buf, task->datain.data, task->datain.size);
scsi_free_scsi_task(task);
printf("[OK]\n");
ret = 0;
test2:
printf("Verify first 1-256 ... ");
/* read and verify the first 1 - 256 blocks at the start of the LUN */
printf("Verify first 1-256 blocks with a miscompare but BYTCHK==0.\n");
for (i = 1; i <= 256; i++) {
task = iscsi_verify10_sync(iscsi, lun, NULL, i * block_size, 0, 0, 1, 0, block_size);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto test3;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("Opcode is not implemented on target\n");
scsi_free_scsi_task(task);
ret = -2;
int offset = random() % (i * block_size);
/* flip a random byte in the data */
buf[offset] ^= 'X';
ret = verify10(iscsi, lun, buf, i * block_size, 0, 0, 1, 0, block_size);
if (ret != 0) {
goto finished;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("VERIFY10 returned sense but BYTCHK==1 means it should not check/compare the data. Sense:%s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
scsi_free_scsi_task(task);
/* flip the byte back */
buf[offset] ^= 'X';
}
printf("[OK]\n");
test3:
finished:
free(buf);
iscsi_logout_sync(iscsi);
iscsi_destroy_context(iscsi);
return ret;

View File

@@ -28,7 +28,7 @@ int T0133_verify10_beyondeol(const char *initiator, const char *url, int data_lo
int ret, i, lun;
uint32_t block_size;
uint64_t num_blocks;
unsigned char buf[4096*256];
unsigned char *buf = NULL;
printf("0133_verify10_beyond_eol:\n");
printf("========================\n");
@@ -81,48 +81,20 @@ int T0133_verify10_beyondeol(const char *initiator, const char *url, int data_lo
goto finished;
}
buf = malloc(256 * block_size);
/* verify 2 - 256 blocks beyond the end of the device */
printf("Verifying 2-256 blocks beyond end-of-device ... ");
printf("Verifying 2-256 blocks beyond end-of-device.\n");
for (i = 2; i <= 256; i++) {
task = iscsi_verify10_sync(iscsi, lun, buf, i * block_size, num_blocks, 0, 1, 1, block_size);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
goto test2;
}
if (task->status == SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("VERIFY10 command should fail when reading beyond end of device\n");
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("Opcode is not implemented on target\n");
scsi_free_scsi_task(task);
ret = -2;
ret = verify10_lbaoutofrange(iscsi, lun, buf, i * block_size, num_blocks, 0, 1, 1, block_size);
if (ret != 0) {
goto finished;
}
if (task->status != SCSI_STATUS_CHECK_CONDITION
|| task->sense.key != SCSI_SENSE_ILLEGAL_REQUEST
|| task->sense.ascq != SCSI_SENSE_ASCQ_LBA_OUT_OF_RANGE) {
printf("[FAILED]\n");
printf("VERIFY10 failed but with the wrong sense code. It should have failed with ILLEGAL_REQUEST/LBA_OUT_OF_RANGE. Sense:%s\n", iscsi_get_error(iscsi));
ret = -1;
scsi_free_scsi_task(task);
goto test2;
}
scsi_free_scsi_task(task);
}
printf("[OK]\n");
test2:
finished:
free(buf);
iscsi_logout_sync(iscsi);
iscsi_destroy_context(iscsi);
return ret;

View File

@@ -350,34 +350,24 @@ int T0370_nomedia(const char *initiator, const char *url, int data_loss, int sho
printf("Test PREFETCH10.\n");
prefetch10_nomedium(iscsi, lun, 0, 1, 1, 0);
ret = prefetch10_nomedium(iscsi, lun, 0, 1, 1, 0);
if (ret != 0) {
goto finished;
}
printf("Test PREFETCH16.\n");
prefetch16_nomedium(iscsi, lun, 0, 1, 1, 0);
printf("Test VERIFY10 ... ");
task = iscsi_verify10_sync(iscsi, lun, buf, block_size, 0, 0, 0, 1, block_size);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
ret = -1;
ret = prefetch16_nomedium(iscsi, lun, 0, 1, 1, 0);
if (ret != 0) {
goto finished;
}
if (task->status != SCSI_STATUS_CHECK_CONDITION
|| task->sense.key != SCSI_SENSE_NOT_READY
|| (task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT
&& task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_OPEN
&& task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_CLOSED)) {
printf("[FAILED]\n");
printf("VERIFY10 after eject failed with the wrong sense code. Should fail with NOT_READY/MEDIUM_NOT_PRESENT*\n");
ret = -1;
scsi_free_scsi_task(task);
printf("Test VERIFY10.\n");
ret = verify10_nomedium(iscsi, lun, buf, block_size, 0, 0, 0, 1, block_size);
if (ret != 0) {
goto finished;
}
scsi_free_scsi_task(task);
printf("[OK]\n");
}
printf("Test VERIFY12 ... ");

View File

@@ -991,6 +991,147 @@ int prefetch16_nomedium(struct iscsi_context *iscsi, int lun, uint64_t lba, int
return 0;
}
int verify10(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize)
{
struct scsi_task *task;
printf("Send VERIFY10 LBA:%d blocks:%d vprotect:%d dpo:%d bytchk:%d ... ", lba, datalen / blocksize, vprotect, dpo, bytchk);
task = iscsi_verify10_sync(iscsi, lun, data, datalen, lba, vprotect, dpo, bytchk, blocksize);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
return -1;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("VERIFY10 is not implemented on target\n");
scsi_free_scsi_task(task);
return -2;
}
if (task->status != SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("VERIFY10 command: failed with sense. %s\n", iscsi_get_error(iscsi));
scsi_free_scsi_task(task);
return -1;
}
printf("[OK]\n");
scsi_free_scsi_task(task);
return 0;
}
int verify10_nomedium(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize)
{
struct scsi_task *task;
printf("Send VERIFY10 LBA:%d blocks:%d vprotect:%d dpo:%d bytchk:%d (expecting NOT_READY/MEDIUM_NOT_PRESENT) ... ", lba, datalen / blocksize, vprotect, dpo, bytchk);
task = iscsi_verify10_sync(iscsi, lun, data, datalen, lba, vprotect, dpo, bytchk, blocksize);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
return -1;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("VERIFY10 is not implemented on target\n");
scsi_free_scsi_task(task);
return -2;
}
if (task->status != SCSI_STATUS_CHECK_CONDITION
|| task->sense.key != SCSI_SENSE_NOT_READY
|| (task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT
&& task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_OPEN
&& task->sense.ascq != SCSI_SENSE_ASCQ_MEDIUM_NOT_PRESENT_TRAY_CLOSED)) {
printf("[FAILED]\n");
printf("VERIFY10 after eject failed with the wrong sense code. Should fail with NOT_READY/MEDIUM_NOT_PRESENT*\n");
scsi_free_scsi_task(task);
return -1;
}
printf("[OK]\n");
scsi_free_scsi_task(task);
return 0;
}
int verify10_miscompare(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize)
{
struct scsi_task *task;
printf("Send VERIFY10 LBA:%d blocks:%d vprotect:%d dpo:%d bytchk:%d (expecting MISCOMPARE) ... ", lba, datalen / blocksize, vprotect, dpo, bytchk);
task = iscsi_verify10_sync(iscsi, lun, data, datalen, lba, vprotect, dpo, bytchk, blocksize);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
return -1;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("VERIFY10 is not implemented on target\n");
scsi_free_scsi_task(task);
return -2;
}
if (task->status == SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("VERIFY10 command successful but should have failed with MISCOMPARE\n");
scsi_free_scsi_task(task);
return -1;
}
if (task->sense.key != SCSI_SENSE_MISCOMPARE) {
printf("[FAILED]\n");
printf("VERIFY10 command returned wrong sense key. MISCOMPARE MISCOMPARE 0x%x expected but got key 0x%x. Sense:%s\n", SCSI_SENSE_MISCOMPARE, task->sense.key, iscsi_get_error(iscsi));
scsi_free_scsi_task(task);
return -1;
}
printf("[OK]\n");
scsi_free_scsi_task(task);
return 0;
}
int verify10_lbaoutofrange(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize)
{
struct scsi_task *task;
printf("Send VERIFY10 LBA:%d blocks:%d vprotect:%d dpo:%d bytchk:%d (expecting LBA_OUT_OF_RANGE) ... ", lba, datalen / blocksize, vprotect, dpo, bytchk);
task = iscsi_verify10_sync(iscsi, lun, data, datalen, lba, vprotect, dpo, bytchk, blocksize);
if (task == NULL) {
printf("[FAILED]\n");
printf("Failed to send VERIFY10 command: %s\n", iscsi_get_error(iscsi));
return -1;
}
if (task->status == SCSI_STATUS_CHECK_CONDITION
&& task->sense.key == SCSI_SENSE_ILLEGAL_REQUEST
&& task->sense.ascq == SCSI_SENSE_ASCQ_INVALID_OPERATION_CODE) {
printf("[SKIPPED]\n");
printf("VERIFY10 is not implemented on target\n");
scsi_free_scsi_task(task);
return -2;
}
if (task->status == SCSI_STATUS_GOOD) {
printf("[FAILED]\n");
printf("VERIFY10 command successful but should have failed with LBA_OUT_OF_RANGE\n");
scsi_free_scsi_task(task);
return -1;
}
if (task->status != SCSI_STATUS_CHECK_CONDITION
|| task->sense.key != SCSI_SENSE_ILLEGAL_REQUEST
|| task->sense.ascq != SCSI_SENSE_ASCQ_LBA_OUT_OF_RANGE) {
printf("[FAILED]\n");
printf("VERIFY10 should have failed with ILLEGAL_REQUEST/LBA_OUT_OF_RANGE. Sense:%s\n", iscsi_get_error(iscsi));
scsi_free_scsi_task(task);
return -1;
}
printf("[OK]\n");
scsi_free_scsi_task(task);
return 0;
}
int main(int argc, const char *argv[])
{

View File

@@ -261,5 +261,10 @@ int prefetch10_nomedium(struct iscsi_context *iscsi, int lun, uint32_t lba, int
int prefetch16(struct iscsi_context *iscsi, int lun, uint64_t lba, int num_blocks, int immed, int group);
int prefetch16_lbaoutofrange(struct iscsi_context *iscsi, int lun, uint64_t lba, int num_blocks, int immed, int group);
int prefetch16_nomedium(struct iscsi_context *iscsi, int lun, uint64_t lba, int num_blocks, int immed, int group);
int verify10(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize);
int verify10_nomedium(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize);
int verify10_miscompare(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize);
int verify10_lbaoutofrange(struct iscsi_context *iscsi, int lun, unsigned char *data, uint32_t datalen, uint32_t lba, int vprotect, int dpo, int bytchk, int blocksize);
#endif /* _ISCSI_TEST_H_ */