Storage Device Block Driver Benchmark Test for USB Device (Compact 2013)
3/26/2014
The Storage Device Block Driver Benchmark Test analyzes the performance of a storage device in reading and writing. The test scans a storage device and attempts to read from and write to every sector on the device. The test displays information about the time required to complete each operation.
You may find it useful to know the time required to complete a read or write operation if you have problems with the file system on the storage device. For example, the test may show you that one disk takes 400 milliseconds (ms) to write, passing the test, while another disk takes 1500 ms to write, failing the test.
Note:When you run the Storage Device Block Driver Benchmark Test, the Windows Embedded Compact Test Kit (CTK) temporarily copies files to the root directory of the target device. Before running the test, verify that there is at least 0.4 megabytes (MB) of free space in the root directory of the target device. If there is not sufficient space in the root directory of the target device, the test cannot run.
This test may take a long time to complete when you test a storage device with large data capacity because the test reads from and writes to each sector multiple times. Microsoft recommends that you run this test on a storage device with a data capacity of 128 MB or less.
The Storage Device Block Driver Benchmark Test communicates directly with the device drivers. The device drivers are in a layer that is below the file system layer and the file allocation table (FAT) layer. If you have problems with the file system, you may be able to isolate the problem to a specific layer.
The test cases for the Storage Device Block Driver Benchmark Test differ only by the number of sectors that are read or written during each I/O burst. The more sectors you read from or write to at one time, the faster per sector the test runs, because the overhead in running the test is distributed across a larger number of sectors. None of these test cases stress the device driver, so it is safe to choose any test case. You may attribute the failure of a test case to defective hardware. For more information about the test cases for this test, see Test Cases for the Storage Device Block Driver Benchmark Test.
The test starts by displaying basic information about the storage device. This information contains the name of the device, the handle of the device, the number of sectors on the device, and the number of bytes per sector. The test does not give information about cylinders, heads, sectors, and flags, because this information is not relevant to this test.
If the device driver does not return an error, the test then shows how many sectors it writes to and how long, in milliseconds, the operation takes to complete. A message indicates that the test is attempting to read from those sectors. If the device driver does not return an error, the test attempts to verify that the data read is correct.
If this pattern of successfully writing to and reading from sectors continues to the end of the storage device, the test outputs a report that shows access times, and then returns a passing value to Tux.exe. If the test passes, you can assume that the driver and the storage device are working properly.
Note:In running the test, anticipate that in certain situations, timing issues may arise. For example, a linear flash card requires more time to complete a write operation than other storage devices.
Test Prerequisites
Your device must meet the following requirements before you run this test.
Requirements |
Description |
---|---|
Any USB storage device |
USB storage device such as USB pendrive, USB hard drive, or USB card reader. |
The following tables show the software requirements for the Storage Device Block Driver API Test.
Requirements |
Description |
---|---|
Tux.exe |
Tux test harness, required for test execution |
Kato.dll |
Kato logging engine, required for logging test data |
rw_all.dll |
Library containing the test |
Mass storage block driver |
In the OS design, you must include a mass storage block driver that supports the mass storage device |
Subtests
The table below lists the subtests included in this test.
SubTest ID |
Description |
---|---|
1001 |
Writes to and reads from all sectors 1 sector at a time. |
1002 |
Writes to and reads from all sectors 4 sector at a time. |
1003 |
Writes to and reads from all sectors 16 sector at a time. |
1004 |
Writes to and reads from all sectors 32 sector at a time. |
1005 |
Writes to and reads from all sectors 64 sector at a time. |
1006 |
Writes to and reads from all sectors 128 sector at a time. |
1007 |
Writes to and reads from all sectors 5 sector at a time. |
1008 |
Writes to and reads from all sectors 13 sector at a time. |
1009 |
Writes to and reads from all sectors 129 sector at a time. |
Setting Up the Test
The USB storage device must be connected to the Widows Embedded Compact device and be enumerated.
The removable USB storage device must be formatted so that it will be enumerated when plugged in. There is two ways to format the USB storage device:
The storage device can be formatted using a Windows-based desktop machine's; built-in formatting application. This assumes the use of one partition.
Running the Test
Command Line Syntax
tux.exe -o -d rw_all.dll -c "-zorch [-disk DSKx:] [-profile <profile>] [-oldioctls] [-store]"
Command Line Parameters |
Description |
---|---|
-disk DSKx: |
Specifies the device name of the disk to test. If you do not specify this parameter, the test probes for a mass storage disk on devices DSK1-DSK9. Specifying this parameter overrides the automatic detection process and forces the test to use the disk that you specify. |
-profile <profile> |
Limits testing to the devices with the specified storage profile. The default storage profile is "all profiles". |
-oldioctls |
Forces the test to use the previous disk I/O control codes (IOCTLs) instead of the current set of IOCTLs. The previous IOCTLs are all prefixed with "DISK_IOCTL_" and are not Windows Embedded Compact IOCTLs. The current set IOCTLs are prefixed with "IOCTL_DISK_." Many block drivers support both previous and current IOCTLs. You can use this parameter to verify that current and previous IOCTLs work correctly. |
-store |
Specifies that the test opens a handle to the disk by using the OpenStore function instead of the CreateFile function. Notice that you are not required to open a handle by using OpenStore in order to test block driver functionality. However, it is useful for testing a storage device that Filesys.exe loads automatically if you cannot open the storage device as a stream device. For example, you can open a handle to a flash driver for ROM by using the OpenStore function. |
-zorch |
Enables the functionality of the test. Without this parameter, the test will fail. With this parameter, the test will run and destroy all data on the storage devices. |
Note:Prior to running this test, be aware that all information on the storage device is destroyed. The test writes to and reads from every sector on the storage device without preserving the contents of the storage device. The test tests each PC Card that is inserted in the system, assigning one thread to each card. Microsoft recommends that you back up data on all cards and disks that are attached to the tested device before running the test.
Verifying the Test
When the test completes running, verify that "PASS" appears in the test log for all sub-tests.
Troubleshooting the Test
* The file system driver must implement sector management.
* Since the test will take a long time to complete, you can modify the test to run 1 subtest at a time.