Tests: convert tabs to 8 spaces
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>
This commit is contained in:
@@ -29,50 +29,50 @@ static int change_num;
|
||||
|
||||
static int my_iscsi_queue_pdu(struct iscsi_context *iscsi _U_, struct iscsi_pdu *pdu)
|
||||
{
|
||||
switch (change_num) {
|
||||
case 1:
|
||||
/* Set reserved bit 0x40 in byte 1 of the CDB */
|
||||
pdu->outdata.data[33] |= 0x40;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
/* Set reserved byte in the CDB */
|
||||
pdu->outdata.data[32 + change_num] = change_num;
|
||||
break;
|
||||
}
|
||||
switch (change_num) {
|
||||
case 1:
|
||||
/* Set reserved bit 0x40 in byte 1 of the CDB */
|
||||
pdu->outdata.data[33] |= 0x40;
|
||||
break;
|
||||
case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
/* Set reserved byte in the CDB */
|
||||
pdu->outdata.data[32 + change_num] = change_num;
|
||||
break;
|
||||
}
|
||||
|
||||
change_num = 0;
|
||||
return 0;
|
||||
change_num = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
void test_sanitize_block_erase_reserved(void)
|
||||
{
|
||||
int i;
|
||||
int i;
|
||||
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test SANITIZE BLOCK_ERASE Reserved bits/bytes");
|
||||
logging(LOG_VERBOSE, LOG_BLANK_LINE);
|
||||
logging(LOG_VERBOSE, "Test SANITIZE BLOCK_ERASE Reserved bits/bytes");
|
||||
|
||||
CHECK_FOR_SANITIZE;
|
||||
CHECK_FOR_DATALOSS;
|
||||
CHECK_FOR_SANITIZE;
|
||||
CHECK_FOR_DATALOSS;
|
||||
|
||||
local_iscsi_queue_pdu = my_iscsi_queue_pdu;
|
||||
local_iscsi_queue_pdu = my_iscsi_queue_pdu;
|
||||
|
||||
|
||||
logging(LOG_VERBOSE, "Send SANITIZE command with the reserved "
|
||||
"bit in byte 1 set to 1");
|
||||
change_num = 1;
|
||||
SANITIZE(sd, 0, 0, SCSI_SANITIZE_BLOCK_ERASE, 0, NULL,
|
||||
logging(LOG_VERBOSE, "Send SANITIZE command with the reserved "
|
||||
"bit in byte 1 set to 1");
|
||||
change_num = 1;
|
||||
SANITIZE(sd, 0, 0, SCSI_SANITIZE_BLOCK_ERASE, 0, NULL,
|
||||
EXPECT_INVALID_FIELD_IN_CDB);
|
||||
|
||||
for (i = 2; i < 7; i++) {
|
||||
logging(LOG_VERBOSE, "Send SANITIZE command with the reserved "
|
||||
"byte %d set to non-zero", i);
|
||||
change_num = i;
|
||||
for (i = 2; i < 7; i++) {
|
||||
logging(LOG_VERBOSE, "Send SANITIZE command with the reserved "
|
||||
"byte %d set to non-zero", i);
|
||||
change_num = i;
|
||||
|
||||
SANITIZE(sd, 0, 0, SCSI_SANITIZE_BLOCK_ERASE, 0, NULL,
|
||||
SANITIZE(sd, 0, 0, SCSI_SANITIZE_BLOCK_ERASE, 0, NULL,
|
||||
EXPECT_INVALID_FIELD_IN_CDB);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user