次の方法で共有


Test Cases for the Storage Device Block Driver API Test (Windows Embedded CE 6.0)

1/6/2010

The following table shows the test cases for the Storage Device Block Driver API Test.

Note

During the test, all information on the storage device is destroyed. The test writes to and reads from sectors on the storage device without preserving the contents of the sectors. Microsoft recommends that you back up data on all cards and disks that are attached to the tested device before running the test.

Test case Description

4002

Format mass storage disk

Tests the functionality of the IOCTL_DISK_FORMAT_MEDIA IOCTL. If the disk supports only previous IOCTLs, use the /oldioctls command-line parameter to test the DISK_IOCTL_FORMAT_MEDIA IOCTL instead.

This test case fails if the block driver does not support the IOCTL. If the storage device does not require or support low-level formatting, the driver should immediately report success.

4003

Write, Read, Verify 1 sector at a time

Verifies that data written one sector at a time to any sector of the disk can be read back correctly.

This test case fails if data is corrupted while reading or writing. It also fails if the boundary of a read or write buffer is overwritten.

4004

Write, Read, Verify 8 sectors at a time

Verifies that data written eight sectors at a time to any sector of the disk can be read back correctly.

This test case fails if data is corrupted while reading or writing. It also fails if the boundary of a read or write buffer is overwritten.

4005

Write, Read, Verify 32 sectors at a time

Verifies that data written 32 sectors at a time to any sector of the disk can be read back correctly.

This test case fails if data is corrupted while reading or writing. It also fails if the boundary of a read or write buffer is overwritten or if the storage device does not support large reads or writes.

4006

Write, Read, Verify varying sized buffers

Verifies that reading and writing multiple sectors can be performed in a range of sizes.

This test case fails if data is corrupted while reading or writing. It also fails if the boundary of a read or write buffer is overwritten.

4007

Write, read multi-SG 2 sectors at a time

Verifies that reading scatter-gather (SG) buffers two sectors at a time behaves correctly.

This test case fails if the driver for the storage device does not support reading multiple SG buffers. It also fails if data is corrupted while reading or writing or if the boundary of a read or write buffer is overwritten.

4008

Write, read multi-SG 8 sectors at a time

Verifies that reading SG buffers eight sectors at a time behaves correctly.

This test fails if the driver for the storage device does not support reading multiple SG buffers. It also fails if data is corrupted while reading or writing or if the boundary of a read or write buffer is overwritten.

4009

Write using 2-8 SG buffers, read + verify

Verifies that writing to multiple SG buffers behaves correctly. First, this test case writes data to between 2 and 8 SG buffers of random size. Then, it reads back the same range of sectors by using a single SG buffer and compares the data read to the data written.

This test case fails if the driver for the storage device does not support multiple SG buffer writes. It also fails if the driver requires individual SG buffers to be sector aligned or if data is corrupted while reading or writing.

4010

Write, read using 2-8 SG buffers + verify

Verifies that reading multiple SG buffers behaves correctly. First, this test case writes data by using a single SG buffer. Then, it reads data by using between 2 and 8 SG buffers of random size and compares the data written to the data read.

This test case fails if the driver for the storage device does not support reading multiple SG buffers. It also fails if the driver requires individual SG buffers to be sector aligned or if data is corrupted while reading or writing.

4011

Read and write with 2 SG buffers, varying size

Verifies that SG buffers of any size work correctly.

This test case fails if the driver for the storage device does not support multiple SG buffer reads or writes. It also fails if the driver requires individual SG buffers to be sector aligned.

4012

Read buffer extends past last sector

Verifies the behavior of reading from a disk when the request extends past the last sector on the disk.

This test case fails if reading succeeds. A failure of the test case does not necessarily indicate a problem with the driver.

4013

Read starts past final sector

Verifies the behavior of reading from a disk when the request starts past the last sector on the disk.

This test case fails if reading succeeds. A failure of the test case does not necessarily indicate a problem with the driver.

4014

Write buffer extends past last sector

Verifies the behavior of writing to a disk when the request extends past the last sector on the disk.

This test case fails if writing succeeds. A failure of the test case does not necessarily indicate a problem with the driver.

4015

Write starts past final sector

Verifies the behavior of writing to a disk when the request starts past the last sector on the disk.

This test case fails if writing succeeds. A failure of the test case does not necessarily indicate a problem with the driver.

4016

Delete sector test cases

Verifies the functionality of the IOCTL_DISK_DELETE_SECTORS IOCTL when it is given parameters that are not valid.

It is not required that a driver support this IOCTL. If the driver does not support this IOCTL, the test case is skipped.

This test case fails if the IOCTL_DISK_DELETE_SECTORS IOCTL does not handle bounds cases correctly.

4017

Write using various buffer types

Verifies the ability of the driver to write from the following types of buffers:

  • Heap allocated
  • Stack allocated
  • Read only
  • DWORD aligned
  • Word aligned
  • Byte aligned

This test case fails if the driver cannot read from one of the buffer types or if the driver does not appropriately handle unaligned buffers when aligned buffers are required, for example with direct memory access (DMA) transfer.

4018

Read using various buffer types

Verifies the ability of the driver to read into the following types of buffers:

  • Heap allocated
  • Stack allocated
  • DWORD aligned
  • Word aligned
  • Byte aligned

This test case fails if the driver cannot read into one of the buffer types or if the driver does not appropriately handle unaligned buffers when aligned buffers are required, for example with DMA transfer.

See Also

Other Resources

Storage Device Block Driver API Test