Defining CDB’s for the SCSI Compliance test

STB Suite | The Industry Standard in Peripheral Testing.

Introduction

The STB SCSI Command Compliance test uses ASCII text files to define the CDB’s to issue during test. This paper will describe the format of this CDB file.

Example 1

Illustration of STB Command file for compliance testing – with no expected Sense data

“## DISK ##”
“06,01,200,08,00,00,00,01,00,[READ]”
“10,01,200,28,00,00,00,00,00,00,00,01,00,[EXTENDED READ]”

This example shows two simple CDBs defined for the compliance test.

We will first look at the first CDB, turning it on its side so we can label it’s parts

06 – this is the CDB length. This is a 6-byte CDB

01 – this is the data direction. 1 = data in from device, 0= data out to device

200 -this is the data transfer length in hexadecimal. We expect this command to transfer 0x200 or 512 bytes from the device.

08,00,00,00,01,00 – these are the six bytes which make up the CDB

[READ] – this is the CDB name or title which will be printed in the output report

The second CDB is the same format but you can see that it is a 10-byte CDB

10 – this is the CDB length. This is a 6-byte CDB
01 – this is the data direction. 1 = data in from device, 0= data out to device
200 -this is the data transfer length in hexadecimal. We expect this command to transfer 0x200 or 512 bytes from the device.

28,00,00,00,00,00,00,00,01,00 – these are the ten bytes which make up the CDB

[EXTENDED READ] – this is the CDB name or title which will be printed in the output report

 

Example 2

Illustration of STB Command file for compliance testing – with expected Sense data

“06,01,200,08,00,00,00,01,00,[READ],05,24,00”

This example shows two simple CDBs defined for the compliance test.

We will first look at the first CDB, turning it on its side so we can label it’s parts

06 – this is the CDB length. This is a 6-byte CDB
01 – this is the data direction. 1 = data in from device, 0= data out to device
200 -this is the data transfer length in hexadecimal. We expect this command to transfer 0x200 or 512 bytes from the device.

08,00,00,00,01,00 – these are the six bytes which make up the CDB

[READ] – this is the CDB name or title which will be printed in the output report

05,24,00 – this is the Sense Key, Sense Code, and ASQ that you expect the drive to return if the CDB results in a CHECK CONDITION.

 

Example Output Data

Here are a few examples of the output data that will be written to the log file

 

“CDB[ILLEGAL-REZERO]= 00,00,00,00,80,00 failed Sense = 05/24/00 Expected 5/26/0 MISMATCH”

This CDB had an expected Sense Data of 05,26,00 in the CDB definition file. As shown, the CDB failed with a CHECK CONDITION, the Sense Data was retrieved – it was 05,24,00. The output file shows what was expected, what the actual Sense Data was, and if the two aren’t identical it marks the output with “MISMATCH”
“CDB[LOCK UNLOCK CACHE]= 36,00,00,00,00,00,00,00,00,00 failed Sense = 05/20/00 Expected 5/20/0 OK”

In the case of this CDB the expected Sense Data is identical to the actual Sense Data and so the output entry is marked “OK”