Here are some links to disk drive diagnostic tools offered by different drive manufactures. Some of the links are for a specific line of drives but will give you the general idea of what test are available.
These tools are helpful in clearing out all info on a drive and fixing minor problems with drives. Some of the manufactures recommend that you run there test utility before they will issue an RMA. The tools are easy to use but can take up to a couple of hours to complete depending on the test you select.
Most of these tools are windows based but I think I saw some that support Linux. They can also run off a boot disk or some will run on your desktop.