eCosPro® Reference Manual
Prev |  | Next

# Chapter 9. Tests and utilities

# Unit and functional tests

The NAND library includes a number of tests. The most useful to driver writers are `readwrite`, `rwbenchmark` and `sweccwalk`; the others are only likely to be of interest to library maintainers.

readwrite

  Performs a read-write-erase cycle on the first NAND device it finds, checking that its operations have had the expected effect on the device contents. This is a potentially destructive test; do not run it on a device containing data you care about!

rwbenchmark

  A more involved version of `readwrite`, this is a timing test which performs multiple reads, writes and erases and applies statistical techniques to the results in the same way that `tm_basic` instruments the speed of various eCos kernel functions. This is a potentially destructive test; do not run it on a device containing data you care about!

sweccwalk

  Repeatedly makes single-bit changes to a data buffer and checks that the software ECC implementation correctly repairs them.

  > Tip: This test can be adapted to test out hardware ECC implementations. The test outputs the raw ECC codes as it goes, which is useful in confirming that the bits in the computed ECC are what you think they are.

nandunit

  Some unit tests which do not require any NAND device: ECC known answer vectors, and OOB area packing/unpacking correctness.

readlimits

  Attempts to read a block outside of a partition, confirming that it doesn't work.

There are some further tests of the library which require the synthetic NAND device.

Prev | Home | Next
ECC implementation | Up | Ancillary NAND utilities