Comment 5 for bug 912522

Revision history for this message
Daniel Manrique (roadmr) wrote :

Hi François,

the usb/disk_detect test checks if the partitions are mounted (usb_test -l).

usb_test -t is used by usb/storage_transfer, and although the purpose is a bit vague ("This test will check your USB connection."), as Brendan mentions, we want to test that the drive can be written to without the data getting corrupted. If we're unable to write to it, we don't know either way, so the safe thing to do is assume something is amiss and fail the test. Either that, or we add a long list of heuristics to catch, for instance, the cases you mention, among others.

I agree with your idea about doing a read-only test, if we can do that without i/o errors we could take the drive to be good. But yes, detecting whether a partition is writable and doing read/write or read-only tests accordingly would be the most thorough way to test this.