You didn't say which operating system you're on...
On Windows, my workflow for burn-in testing harddisks now tends to be:
- Attach the drive as a non-system drive (i.e. attach it as a secondary drive to an existing Windows installation).
- Run Crystal Disk Info or another S.M.A.R.T tool on the drive, record most important stats on paper.
- Format the drive 2-3 times via Truecrypt as a full-disk encrypted volume. This will ensure that the drive gets completely overwritten with random (encrypted) data. Doing this from within Windows sidesteps all issues about some DOS boot disk not seeing large drives, some BIOS'es having problems with large drives, etc.
- Run the S.M.A.R.T tool again, and compare values, especially the number of re-mapped (bad) blocks. If this is significant, don't use the drive.
For Linux, @Hubert Kario's badblocks
suggestion seems a good one.
You can also use the manufacturer's "drive fitness test" or similar. Most manufacturers have this kind of tool, and it generally contains a long & data-destructive drive test which zero-fills the drive.
On the good side, the manufacturers own tool might provide an error code, which is accepted as grounds for warranty replacement. On the bad side, I just find Truecrypt faster and easier to deal with, and at least as thorough.
The Ultimate Boot CD has a collection of reasonably up to date versions of these manufacturer-specific tools, see the section "Hard Disk Diagnosis".
Nota bene: This kind of burn-in test should never be performed on SSD's. It does no good for SSD's, but causes a fair amount of wear to them.