2

I'm trying to test a Linux driver, and I need a test like bonnie or dbench, but I need it to send random data. I'm trying to find corruption bugs, and if every write is all zeros I can't tell when I serve stale data. Even writing something as simple as a timestamp would be enough for this test.

Does anyone know of a good test that uses random data?

3
  • Your request may be misguided. "Corruption bugs" are often triggered by specific (rather than random) data patterns. All ones, all zeros and alternating ones & zeros are typical early-pass data patterns to test with. If you actually test with "random" (as opposed to pseudo-random) data, then you will have to keep a copy of that data somewhere else for comparison later.
    – sawdust
    Commented Nov 1, 2011 at 22:59
  • 1
    I guess I wasn't all that clear. My driver is actually a cache, and so I can go to the backing device to get another copy of the data. It should always be the same, unless my cache metadata is corrupt, or one of the devices is corrupt. Commented Nov 1, 2011 at 23:14
  • You may have to write your own test, or at least use something else as a starting point. If you're testing the disk cache functionality rather than the bit/byte/word reliability of the underlying HW, then you have the whole sector to use as a data entity. Rather than "random" data, you could write unique data (including drive, cylinder, head, and sector information along with a full date&time-stamp) in each sector. You have enough space (in each sector) to do all this in ASCII text for easy readability when you do data dumps.
    – sawdust
    Commented Nov 1, 2011 at 23:46

0

You must log in to answer this question.

Browse other questions tagged .