removable_storage_test detecting non-removable devices as removable
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Checkbox Provider - Base |
Expired
|
Undecided
|
Unassigned |
Bug Description
The removable_
https:/
The /dev/sdb device on this system is an internal (non-removable) SSD, which the test identifies as removable. The test passes, so it doesn't jump out as a problem in this specific case, but the test script could conceivably run on the wrong device(s) in other cases. On my own laptop, for instance, when I insert an SD card, the test runs against both the SD card (/dev/mmcblk0p1) and against two partitions on the internal SSD (/dev/sda1 and /dev/sda3).
To further complicate matters, I was looking into using the contents of /sys/class/ block/{ devicename} /removable to filter out non-removable devices, but it doesn't look quite reliable enough. It works correctly to identify removable SD card slots on two machines I've tested (a MacBook Air and a desktop with a PCI-based third-party media-card reader), but on another laptop (a Samsung Notebook 7 Spin), an SD card shows up as being non-removable via this test. I don't know how common this sort of failure is in client devices. On the server side, servers with SD card slots are extremely rare, and we don't happen to have any in-house.