## Storage Device Driver Reference

[prev][next][parent][TOC]

### Description of Test Cases

Each of the optical test cases can be executed by invoking the DDTT from either a command line, a batch file, or a REXX file. Test scripts are described below. The user is free to create additional tests or construct multi-threaded test cases after becoming familiar with the DDTT and the optical grammar files.

Test scripts generally start by opening to the optical drive and closing at completion. File operations do not require Open or Close operations as they do this internally. All test scripts log information to a log file of the same file name, but with a file name extension of .LOG. When lock status or device parameters are queried, the data is written to the DDTT's scroll output window and to the log file. Log files can be examined with a text editor after the test case has completed.

Optical cartridge sectors are addressed by cylinder, head, and sector. Head value is currently defined only for a value of 0. The maximum value for the other parameters can be found with GET_LOGICAL_PARAMS.

Test scripts currently address drives configured as removable. If an optical drive is configured as non-removable, then the fixed-disk test suite would be appropriate.

OPTISTD.SCR This script exercises all optical device related API commands, except those for file I/O. An optical cartridge supporting read and write must be mounted in the drive.

OPTIFILE.SCR This script exercises optical device file read and write commands. An optical cartridge supporting read and write must be mounted in the drive. Since file I/O is supported, the cartridge must be formatted and this script must be copied to it in order to serve as a sample file.

OPTIERR.SCR This script exercises the device driver's ability to detect errors related to invalid handle, device-not-ready, and invalid sequence conditions for an optical drive. It requires an optical cartridge to be mounted.

OPTIERR2.SCR This script exercises the device driver's ability to detect errors related to invalid head/cylinder/sector values for an optical drive. It requires an optical cartridge to be mounted.