Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question
    
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 Nov 1 '11 at 22:59
    
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. –  Adam Berkan Nov 1 '11 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 Nov 1 '11 at 23:46

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.