STB Easy Command Compliance

STB Suite | The Industry Standard in Peripheral Testing.

Command Compliance Testing Software



Command compliance testing is an important engineering step in designing new storage devices. It is also important to storage integration companies for comparing drives from different vendors or for checking operability of different firmware revisions or other changes. Testing command compliance can have both a positive and a negative test approach. You need to test that legal commands are processed correctly, and you may need to test that illegal commands fail correctly. Both of these methods can be tested using the STB Suite, using either the stand-alone SCSI and SATA command compliance applications, or also by using the techniques outlined in this article to use the built-in CDB and SATA Command Sequencer features.

Using the CDB or Command Sequencer

A built-in feature of the STB Suite is the SCSI CDB Sequencer and the SATA Command Sequencer. Both features work in the exact same way to issue any SCSI or SATA command to any type of device. The commands are defined in text files which are easy to add to and edit. Both features produce the same type of output log, and both are very easy to use.

A SCSI example

For this example we will use the SCSI CDB Sequencer to do command compliance testing of a disk drive.

The first step is to create a command file with the disk commands which you want to test. You may want to create one command file with non-destructive commands and a different file with destructive commands – such as WRITE and FORMAT commands. Likewise you can create separate command files for destructive and non-destructive testing of tape drives.

The command files used by the CDB sequencer consist of entries for each command, such as:

Extended Read,10,1,200,28,00,00,00,00,00,00,00,01,00

Extended Write,10,0,200,2a,00,00,00,00,00,00,00,01,00

The first field is the name of the command,

followed by the CDB length (6,10,12,0r 16 bytes),

followed by the data direction (1=in, 0=out),

followed by the data length in hexadecimal,

followed by the bytes of the CDB, also in hexadecimal.

As simple example of a non-destructive command test file will include the commands



READ (6-byte)


And looks like this:

Test Unit Ready,6,1,00,00,00,00,00,00,00


Read6 ,6,1,200,08,00,00,00,01,00


Running the example

Select a SCSI Disk drive in the device menu, then start the SCSI CDB Sequencer by going to the top menu

Scripts and Sequences->SCSI CDB Sequencer choice. The last used command file will be named and you will be asked if that is the file you wish to use. In this case we will answer No and will browse to our non-destructive command file which we created above.


The SCSI CDB Sequencer dialog will be displayed –


And clicking on the View CDBs button will show our commands –

The first time the command compliance is run you need to execute each CDB manually, by specifying the CDB in the Command Entry window and then clicking the Execute button. This will execute the command and will also make an entry in the Command History window, which we will use to save and replay the compliance test sequence.

The easiest way to accomplish this is while the Available Commands box is displayed (from clicking theView CDBs button), just double-click on each command in the Available Commands window, bring that command into the Command Entry window. Then click Execute.



Do this for all four commands. You will now have all four commands in your Command History window, as shown here:

Now click the Save to File button and save the command history for later replay.

To replay the same test –

Select your drive and start the SCSI CDB Sequencer, again specifying your test command file. Now use the Load from File button to load your saved history (.his) file from above. Now use click and Shift-Click to select all the commands in the history window as shown here –


Now click the Execute button and all of the commands will be issued in order, with the results shown in the Commands Results window as shown here –

Use the Command Results Save to File button to save the results of each command to a log file.

Now expand your command definition file to include every command which you want to test. If you want to test illegal commands simply make an entry in your command description file which is invalid. As a quick example we will issue an illegal INQUIRY command to show the results of an illegal command –

Also – note that the CDB Sequencer lets you specify how many data bytes will be recorded to the Command Results window – the default is 8 bytes. If you need to capture more data than 8 bytes simply specify it before running the test.


Using the STB Suite CDB or ATA Command Sequencers makes command compliance testing quick and easy. You can test any device type on any interface. Keep your previous command files for regression testing, and add new or vendor-unique commands as you need for testing new device functionality.

This example used the SCSI CDB sequencer. SATA Command compliance is accomplished the exact same way but using a SATA drive connected to a native SATA motherboard port, and using the SATA Command Sequencer run from the ATA/SATA->ATA Command Sequencer menu choice.